Login | Register   
Twitter
RSS Feed
Download our iPhone app
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   FORUMS  |   TIP BANK
Browse DevX
Sign up for e-mail newsletters from DevX


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

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.

 

 

Sitemap