Microsoft
Software
Hardware
Network
Question : How can I dynamically switch web service addresses in .NET without a recompile?
hi,
I was trying to follow the steps described in the link below to dynamically set the URL of a web service.
http://stackoverflow.com/q
uestions/1
25399/how-
can-i-
dyna
mically-sw
itch-web-s
ervice-add
resses-in-
net-withou
t-a-
recomp
ile
It worked fine and created the below section in app.config file. It used to work fine.
<applicationSettings>
<ServiceMob.My.MySettings>
<setting name="WatcherService_serve
r1_ThWS" serializeAs="String">
<value>
http://server1:3033
/ThWS.asmx
</value>
</setting>
</ServiceMob.My.MySettings
>
</applicationSettings>
But for some reason when I tried to change the <value> to some other server it is not working. It is still pointing to the URL that was specified in "Web Reference URL" property of the web service under Web References section. The "URL Behavior" was set to Dynamic.
Can anybody please let me know why it can happen. Thanks very much for any help.
Answer : How can I dynamically switch web service addresses in .NET without a recompile?
Use the URL property for web service object to dynamically change the address.
Random Solutions
Eclipse and mylyn-3.4.0.v20100608-0100
-e3.4
Help needed to troubleshoot "(DUP!)" packets in ping
View data when passing mouse over chart
Nbstat and ARP commands
Ati Graphic Card - Model/Driver Clarification
SQL Reporting hide null data
FTP Error - timeout when attempting to connect to site/port for GetFileList function
SQL 2005 script to backup database
Email Server Software used in conjuction with SQL Server or MySQL database
Liveupdate failure