SgDotNet
Singapore Professional .NET User Group -For Cool Developers

How To Change Webservice/Webserver Programmatically/At Runtime

rated by 0 users
This post has 2 Replies | 0 Followers

Top 500 Contributor
Posts 3
sid.alpay Posted: 10-30-2006 8:08 PM

hi,

I have a windows application accessing 3 asmx files residing in one server in one web folder. I usually set their url at app.config of the windows application, individually. Is thare a way to set their URL at run time so that i could simplify deployment? I tried the following:

My.WebServices.SVC_Employees.Url = "HTTP://MyWebServer/MyWebservice/SVC_Employees.asmx"

the My.WebServices.SVC_Employees.Url changed, but it doesn't seems working because when i tried to view the runtime value of my.Settings.SVC_Employees_And_Something it doesn't changed.

Any suggestions/help will be greatly appreciated.

thanks,

sid 

 

Top 10 Contributor
Posts 1,096

Won't setting the url to the webservices be kept easier to change if you kept it at app.config or web.config?

microlau Blog: http://community.sgdotnet.org/blogs/microlau

Top 100 Contributor
Posts 17

Instead of letting VS.NET IDE to do the work of creating proxy class to use the webservice. You can create one for your self and change the URL of the webservice or do anything your heart desires.

Check System.Web.Services.Protocols and  SoapHttpClientProtocol to get started

 Hope this helps

Page 1 of 1 (3 items) | RSS
Copyright SgDotNet 2004-2008
Powered by Community Server (Commercial Edition), by Telligent Systems