Shrage Smilowitz
Shrage Smilowitz

Reputation: 25172

How to force VS to use appSettings value instead of My.Settings for WebService Reference

In visual studio 2008 when you add a web service reference, and set the Url behavior to dynamic it will create a My.Settings.Namespace.Webservice setting in a special My.Settings section in the web.config i do not like this style, i want to keep using the appSettings>value for this. how can i tell visual studio to use appSettings instead of My.Settings?

Upvotes: 1

Views: 683

Answers (2)

Richard Anthony Hein
Richard Anthony Hein

Reputation: 10650

Just change it to static, remove the My.Settings stuff you don't want, and load it from the appSettings section in your code.

Upvotes: 1

Paul van Brenk
Paul van Brenk

Reputation: 7559

Don't think you can tell VS to do the right thing. But you can tell the generated client object to use a different URL by setting the URL property of the client object.

Upvotes: 0

Related Questions