I added a .NET 2.0 web reference with the Visual Studio IDE, but for this specific case it can't be configured using the app.config file.
So I tried to initialize it this way:
var service = new MyWebservice
{
Url = config.MyWebserviceUrl
};
But I get the following exception:
Value cannot be null. Parameter name: uriString
config.MyWebserviceUrl
contains a valid web address.
What is the correct way to configure and initialize a webservice programatically?