Results 1 to 5 of 5

Thread: Updating Web References ..

  1. #1

    Thread Starter
    Hyperactive Member spoiledkid's Avatar
    Join Date
    Oct 2002
    Location
    Canada
    Posts
    437

    Updating Web References ..

    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 ???

  2. #2
    Retired VBF Adm1nistrator plenderj's Avatar
    Join Date
    Jan 2001
    Location
    Dublin, Ireland
    Posts
    10,359

    Re: Updating Web References ..

    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.
    Microsoft MVP : Visual Developer - Visual Basic [2004-2005]

  3. #3
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Re: Updating Web References ..

    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.

  4. #4
    Frenzied Member axion_sa's Avatar
    Join Date
    Jan 2002
    Location
    Joburg, RSA
    Posts
    1,724

    Re: Updating Web References ..

    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.

  5. #5

    Thread Starter
    Hyperactive Member spoiledkid's Avatar
    Join Date
    Oct 2002
    Location
    Canada
    Posts
    437

    Re: Updating Web References ..

    Quote Originally Posted by axion_sa
    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width