PDA

Click to See Complete Forum and Search --> : Updating Web References ..


spoiledkid
Aug 8th, 2005, 12:30 PM
Hi,

We do all our development in Dev environment. Testing in Test, then internet applications are promoted to Staging environment for users to see and finally to production.

How do you guys update all your web references when you go to staging or production since in that environment developers has no access. Is there a automatic way or are you guys manually updating the references in test before it gets promoted to staging to point to staging web services and same for production ?? I do not understand how this entire thing works ???

plenderj
Aug 9th, 2005, 10:00 AM
For web services we only have 2 locations - staging and live; purely because it's a pain to have to keep updating web references. Once it's working from the stage - to which all development is done, it then goes onto live.

mendhak
Aug 9th, 2005, 11:15 AM
I keep the server name in the web.config file for the web service (the constructor for the proxy class). I don't have the VS.NET IDE open right now, but it looks something like this:

Me.Url = ConfigurationSettings.AppSettings("SERVERNAME").ToString() & "/servicename.asmx"

This way, whenever I install the web service or the application on a new machine, I simply change the machine name in the config file and voila! I'm done.

axion_sa
Aug 9th, 2005, 12:30 PM
Perhaps a little more work than absolutely necessary, but we have custom configuration handlers that allow us to configure URL, proxy settings, caller identity impersonation and so forth.

For just URL changing, if you select your webservice in the IDE, you'll find there's a property named "URL Behavior". When changing it to "Dynamic", it will generate an entry in the appSettings configuration section that you can use to store the URL to the web service. The framework will automatically set the web service URL when you instantiate it.

Have a look in MSDN under "web references > dynamic" for a touch more information.

spoiledkid
Aug 10th, 2005, 09:05 AM
Perhaps a little more work than absolutely necessary, but we have custom configuration handlers that allow us to configure URL, proxy settings, caller identity impersonation and so forth.

For just URL changing, if you select your webservice in the IDE, you'll find there's a property named "URL Behavior". When changing it to "Dynamic", it will generate an entry in the appSettings configuration section that you can use to store the URL to the web service. The framework will automatically set the web service URL when you instantiate it.

Have a look in MSDN under "web references > dynamic" for a touch more information.

I figured it out finally. This works fine for us. Now we have to worry about changing just one file (web.config) that changing other references.