Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / Web Services / September 2006

Tip: Looking for answers? Try searching our database.

how to change url for webservice

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
DBC User - 01 Sep 2006 15:43 GMT
I have an app I developed and tested everything using one url provided
to me. Now the web service people came back and told me they changed
the url. How can I change the code to reflect the new url without major
change to my code. I have the url in my config file so I can change the
url there but how about the proxy that get generated?

Also is it possible to have the code pointed to multiple urls based on
some other configuration?

Thanks.
Michael - 01 Sep 2006 18:22 GMT
The address is hardcoded in the web service proxy. You'll see a line like
"this.URL = """. Just change it here.

if you want to change the url at runtime, create an instance of your proxy,
then change the url... ws.URL = "<new url>"

Mike
http://www.seeknsnatch.com

>I have an app I developed and tested everything using one url provided
> to me. Now the web service people came back and told me they changed
[quoted text clipped - 6 lines]
>
> Thanks.
John Saunders - 01 Sep 2006 23:26 GMT
> The address is hardcoded in the web service proxy. You'll see a line like
> "this.URL = """. Just change it here.
>
> if you want to change the url at runtime, create an instance of your
> proxy, then change the url... ws.URL = "<new url>"

Note that it's also possible to set the "URL behavior" to "Dynamic" in the
properties of the web reference. When you do this, an entry will be made in
the client applications's configuration file. Then, it will only be
necessary to change the config file when you want to change server URL.

John

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.