In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-20 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
Editor to share with you how to solve the WCF client configuration problem, I believe that most people do not know much about it, so share this article for your reference, I hope you can learn a lot after reading this article, let's go to know it!
After a long period of development of WCF, many users have a good understanding of WCF client configuration. Here I would like to publish my personal understanding and discuss it with you. The client needs to know where the service is located and use the same binding as its service; of course, the service contract is also imported in the form of a proxy. In essence, this is exactly the same as the information captured at the end of the service. To reflect this information, the client profile contains information about the target endpoint and even uses the same pattern as the host.
For example, the list (see the corresponding download source code in this article) shows the client profile needed to interact with a service whose host is configured according to the list. Note that the contract type (and namespace) in this WCF client configuration file is the imported type (and namespace, if any) generated by SvcUtil, not the service type and namespace. The client profile can list as many endpoints as the service supports, and the client can use any one of them to interact with the service. The list (see the corresponding download source code for this article) shows the WCF client profile-which matches the host profile displayed in the list.
By default, SvcUtil also automatically generates a client configuration file, output.config. You can use the / config switch to specify a configuration file name:
SvcUtil http://localhost:8002/MyService/MEX/out:Proxy.cs / config:App.Config
Also, you can use the / noconfig switch to compress the generated configuration file:
SvcUtil http://localhost:8002/MyService/MEX/out:Proxy.cs / noconfig
To support in-process hosting, the application configuration file should list the service and client sections. Note that NetNamedPipeBinding is used for in-process calls. WCF provides a profile editor SvcConfigEditor.exe that can edit host and client configuration files (see figure). At the time of writing, SvcConfigEditor only generates some unreadable configuration files, so you should edit this file manually before correcting this problem.
These are all the contents of the article "how to solve WCF client configuration problems". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!
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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.