I have a web application deployed in production which references an external web service. Looking at the source code in Visual Studio, I see that the web referebce was statically linked. In the proxy reference.cs, it is hardcode to the url. this.Url = ‘http://server/WebService/Service.asmx‘;
I can change the url. But, I would like the proxy to pick up the url from web.config file. How do I enhance proxy code without using Visual Studio to set url behavior to dynamic? would love to get some code samples in C#.
You can use the same code generated by Visual Studio when you change the behavior to dynamic: