Modify 9 References to Deploy Web Site?

Last post 05-22-2008 1:13 PM by RogerRabbit. 10 replies.

Sort Posts:

  • Modify 9 References to Deploy Web Site?

    05-16-2008, 10:22 AM
    • Loading...
    • hc1
    • Joined on 02-06-2008, 2:08 PM
    • Posts 25

    I built my simple application by following the Walkthrough sample in MSDN Library.  My web service is on localhost, so my website application Add Web Reference is referring to localhost.

    My Visual Web Developer 2008 Express Edition has no Build/Publish option, only Build/Build Page, Build Web Site and Rebuild Web Site.  So I simply copy the files to the actual web server.

    I change 9 references in the files (web.config -1, service.disco - 4, service.discomap - 2, service.wsdl - 2) from localhost to the actual host hosting the web service.  It works.  Is this the right method?  Is there a simpler method?

    Thanks.

    Smile

     

  • Re: Modify 9 References to Deploy Web Site?

    05-19-2008, 5:33 AM

    Hi hc1,

    As far as I know, just copy to actual web server folder or virtual folder, it is ok, you have no need to change other setting.

    Best regards,
    Guang-Ming Bian - MSFT

    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
  • Re: Modify 9 References to Deploy Web Site?

    05-19-2008, 8:48 AM
    • Loading...
    • hc1
    • Joined on 02-06-2008, 2:08 PM
    • Posts 25

    Will it work?

    When I developed the front end website on the same PC as the backend application, all the 9 references in the four files are named as localhost.  My machine is called mozart.  If I copy the files to another web server, surely the localhost references will all result in error.  No?  Who will magically convert the localhost references to become mozart?

     hc1

  • Re: Modify 9 References to Deploy Web Site?

    05-20-2008, 6:11 AM
    Answer

    Hi hc1,

    Firstly, Web application include web.config file, just change related url to your hostname, you don't need to change all the  other links.

    You can also remove current web reference and add web reference again with url like http://hostname , not http://localhost. If so, you can copy your client to other pc, it will also visit web service.

    Best regards,
    Guang-Ming Bian - MSFT

    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
  • Re: Modify 9 References to Deploy Web Site?

    05-20-2008, 10:18 AM
    • Loading...
    • hc1
    • Joined on 02-06-2008, 2:08 PM
    • Posts 25

    Thank you Guang-Ming

    Guang-Ming Bian - MSFT:

    Firstly, Web application include web.config file, just change related url to your hostname, you don't need to change all the  other links.

    You mean to say that it will still work even if those references inside the other files remain as pointing to localhost?  Perhaps they are not used?

     

    Guang-Ming Bian - MSFT:

    You can also remove current web reference and add web reference again with url like http://hostname , not http://localhost. If so, you can copy your client to other pc, it will also visit web service.

    But this will also have to change if hostname is not my final application server.

    Thanks.

     

     

  • Re: Modify 9 References to Deploy Web Site?

    05-20-2008, 10:17 PM

    Hi hc1,

    Please try to change web.config file, you will know how it works. Smile

    Best regards,
    Guang-Ming Bian - MSFT

    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
  • Re: Modify 9 References to Deploy Web Site?

    05-21-2008, 8:24 AM
    • Loading...
    • hc1
    • Joined on 02-06-2008, 2:08 PM
    • Posts 25

    Thanks Guang-Ming, but my question is still not answered.

    I would like to know the official answer as published in the specifications of those four files.

    To recap: I find 9 instances of "localhost" in four files.  Do I change just the one in web.config and leave the others alone?  I don't want to spend my time testing out 512 permutations of those nine references just to find out the answer.

    Initially I was expecting ready answers from the world.  I can't believe that no one has developed a front end application on one PC and deployed it on another machine.

  • Re: Modify 9 References to Deploy Web Site?

    05-21-2008, 8:32 AM
    • Loading...
    • hc1
    • Joined on 02-06-2008, 2:08 PM
    • Posts 25

    I just realized that my original message might be confusing.  The first sentence should read:

    I built my first simple web service application using the Walkthrough sample in MSDN Library.

  • Re: Modify 9 References to Deploy Web Site?

    05-21-2008, 11:49 AM

    Yes.  Just change the URL in the web.config file.  There is no need to change the other files.  The other files are only used at "design time".  These files are only used to generate your client proxy code to the web service.  You can safely change the URL to point to another server provided that the new server implements the same interface as described in the WSDL.  The actual service location URL is unimportant.  The namespace, element names and attribute names are important.  These are also described in the WSDL and should be the same on the new server. 

  • Re: Modify 9 References to Deploy Web Site?

    05-22-2008, 9:49 AM
    • Loading...
    • hc1
    • Joined on 02-06-2008, 2:08 PM
    • Posts 25

    Thank you.  That's what I wanted to know.

    So does that mean the App_WebReferences folder need not be copied over to the web server?

    Thanks

  • Re: Modify 9 References to Deploy Web Site?

    05-22-2008, 1:13 PM
    Answer

    You do not need to copy the web references folder (it won't be used in any case).

Page 1 of 1 (11 items)