It is easy to add web service references in 2.0. But how do I set the web service address during release and installation?
In winform, set the reference to dynamic (dynamic) reference. vs automatically adds a configuration in app. config, and changes the address in this configuration. However, this configuration menu cannot be found in the asp. net2.0 project.
I checked some information and found it in asp.net.
Specific configuration methods are found on the website.
Suppose we have introduced a webservice named myService, which contains a class of WebService.
Method 1: You can specify the web service address in the program.
For example:
MyService. WebService service = new
MyService. WebService ();
Service. url = "http: // localhost/myservice/webservice. asmx ";
......
Method 2: Configure web. config directly
In
Add the following section to the appseeting configuration section:
<Add name = "myService. WebService"
Value = "http: // localhost/myservice/webservice. asmx"/>
It's that simple.
Here is an english blog can refer to the http://weblogs.asp.net/bradleyb/archive/2006/05/04/445133.aspx