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 / General / December 2007

Tip: Looking for answers? Try searching our database.

dynamically change web service URL based on environment

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
steven - 12 Dec 2007 14:27 GMT
hi

as many web developers do, i sniff the URL of my app and toggle things
like the db connection string, default email recipients, etc
dynamically based on what i find (ie. dev.mysite.com, qa.mysite.com,
mysite.com). this way, i don't have to worry about updating my
web.config file everytime i want to deploy my app from DEV to QA to
PRODUCTION. however, there doesn't seem to be a way to do this with
the web service URL property in VS. i can set the URL property for my
web services to dynamic, but this just means the URL will be loaded
from the web.config file. this means i'm having to maintain separate
web.config files for my three hosting environments.

has anybody got a more elegant way of toggling the web service URL
based on the environment their site is running under?

tks.
Peter Bromberg [C# MVP] - 12 Dec 2007 15:34 GMT
the Webservice client proxy class generated by a WebReference has a Url
properrty that you can set.
-- Peter
Site: http://www.eggheadcafe.com
UnBlog: http://petesbloggerama.blogspot.com
MetaFinder: http://www.blogmetafinder.com 

> hi
>
[quoted text clipped - 13 lines]
>
> tks.
steven - 12 Dec 2007 18:33 GMT
On Dec 12, 10:34 am, Peter Bromberg [C# MVP]
<pbromb...@yahoo.NoSpamMaam.com> wrote:
> the Webservice client proxy class generated by a WebReference has a Url
> properrty that you can set.

exactly what i was looking for. tks.

> -- Peter
> Site:http://www.eggheadcafe.com
[quoted text clipped - 20 lines]
>
> - Show quoted text -

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.