First i have added appsetting part in config file of my windows application and set key value as url:
="1.0"="utf-8"
<configuration>
<appSettings>
<add key="MyWebServiceURL" value="http://localhost/WebService2/Service1.asmx"/>
</appSettings>
</configuration>
then included web service in my dll and change its behavior to dynamic
and made changes in its service.cs in constructor as given below.
Setting this.url from app.config.
public Service1() {
this.Url = System.Configuration.ConfigurationManager.AppSettings["MyWebServiceURL"];
}
then added dll in windows form.
Now this.Url picks up the url from windows application app config.
so i can directly change the url and run the application.
Thanx