Normally, one can specify a service binding using the app.config file, and the system will automatically rea开发者_开发知识库d from there. But what if my program is only a library (non-executable dll)? It can't have an app.config, and I can't change the main app code or config file. I can specify service binding using code, but this is not a good idea because I don't want to have to recompile each time binding changes.
My idea is having the complete tag in a text file, my dll will read it and parse it to an WSHttpBinding object, and my code will use this object to create the service client.
How do I do the parsing?
I think, this posts are related:
- How can I specify an alternate config file for a WCF client?
- Loading WCF config (for server + client) from custom source (not standard XML)
Check out the source code in this forum post
- Config Hosting multiple WCF services in one NT service
精彩评论