Login | Register   
RSS Feed
Download our iPhone app
Browse DevX
Sign up for e-mail newsletters from DevX

By submitting your information, you agree that devx.com may send you DevX offers via email, phone and text message, as well as email offers about other products and services that DevX believes may be of interest to you. DevX will process your information in accordance with the Quinstreet Privacy Policy.

Tip of the Day
Language: .NET
Expertise: Intermediate
Mar 5, 2007



Building the Right Environment to Support AI, Machine Learning and Deep Learning

Quickly Updating the URL in a Web Service

One common problem in Web service development occurs when the URL for a Web service changes. It would be ideal if you could configure this through a config file instead of having to update the Web reference and recompile the project.

.NET provides a way to do this. All you have to do is change the URL Behaviour default property in the proxy class (Reference.cs). Simply change it from Static to Dynamic.

Once you're done, you'll see that the Reference.cs file's Constructor reflects your changes, adding the URL as a key-value in the appSettings section in the project configuration file.

Lastly, change that key's value to reflect the new URL. It's that easy

Srinath MS
Comment and Contribute






(Maximum characters: 1200). You have 1200 characters left.



Thanks for your registration, follow us on our social networks to keep up-to-date