Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to understand the problem of WCF Service first pass

2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/02 Report--

This article mainly introduces "how to understand the WCF Service first pass problem". In the daily operation, I believe that many people have doubts about how to understand the WCF Service first pass problem. The editor consulted all kinds of materials and sorted out a simple and easy-to-use method of operation. I hope it will be helpful for you to answer the doubt of "how to understand the WCF Service first pass question"! Next, please follow the editor to study!

The WCF Service integrated development environment includes many new and improved features to improve productivity. IDE has also been redesigned to provide developers with direct access to .NET Framework components.

In the development process of our project, because all businesses must be published as WCF Service services. And our WCF service is deployed on Windows Service, in the actual environment, we deployed a total of two Windows Service, one Service Host most of the WCF Service, the other Service Host a search WCF Service, but after the release, found in the front desk to use the search service often reported TimeOut errors, at first thought that the code was not updated, after many forced acquisition of the code There will always be a successful call to the service.

After a check of the local code, it is found that the code is * *, but the published service still has a "TimeOut" error message, and it is always successful when testing locally. Since our WCF service is published on WCF Service, there is no way to trace and debug in this case. We can only trace the code in segments and find that the problem occurs in the method of * calling search.

In order to confirm whether the problem is on the search method or on the WCF Service, we did a test code that simply wrote a statement calling the search method and found that the problem still existed. It means that there should be no problem with calling the search method that we have written. WCF is also published on Console, and the test returns are very fast, and there is no "TimeOut" problem. This indicates that there should be a problem when Host the WCF service on the Windows Service.

By comparing the difference between Console and Windows Service, we think that the Console program is called by the local user, while the Windows Service we write is called by the Local System user, and the Local System user is the system System user by default (you will see a lot of processes started by System in the task manager), not the current login user, try to change the startup account of the service to the current login user, problem solved.

When deploying WCF Service, you must pay attention to whether there are user permission requirements. If so, you must start the service with the relevant user, otherwise, insufficient permissions or timeout may occur when calling the methods in Service.

At this point, the study of "how to understand the question of WCF Service first" is over. I hope to be able to solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report