Changing a web project from http://localhost to a named site

Last post 05-02-2008 8:45 PM by wz2zf@163.com. 2 replies.

Sort Posts:

  • Changing a web project from http://localhost to a named site

    04-29-2008, 2:36 PM
    • Loading...
    • Manaxus
    • Joined on 04-29-2008, 5:02 PM
    • Posts 4

    Hello all I have a VS.NET 2005 web project that a developer on our team created that references http://localhost. I wish to change this to the actual named site that we utilize in production as defined by the HOSTS file on a Windows 2003 Server. For example in my HOSTS file I have 192.168.200.200 mywebsite. The error I am getting is an error stating that "Could not find a Web server at 'http://mywebsite'. Check to make sure that the Web server name is valid and your proxy settings are set correctly." I have read on other posts that sound similar to my own issue is that I need to change it from referencing the Local Web server to a remote one but I cannot find where I do that at.

    The reason we do this is because we have multiple websites where each has a unique IP on our CorpNet but the server has only a single NIC and IP of its own. I can browse the website perfectly fine in IIS Manager. 

    Here is the first part of the SLN file I am trying to load.

    Microsoft Visual Studio Solution File, Format Version 9.00
    # Visual Studio 2005
    Project("{E24C65DC-7377-472B-9ABA-BC803B73C61A}") = "http://mywebsite/", "http://mywebsite", "{C695CE70-3634-47E5-AB46-2BF82A39A26E}"
     ProjectSection(WebsiteProperties) = preProject
      ProjectReferences = "{40EE3854-5308-4CF8-A442-1F22D31B50E3}|xxx.dll;{84238D11-C220-4027-BEA1-F1B3516C3857}|xxx.dll;{F504DD90-7326-449D-A3E6-E5B2633BCEEC}|xxx.dll;{855B4C91-6333-40D7-9EC5-837357753571}|xxx.dll;"
      Debug.AspNetCompiler.VirtualPath = "/mywebsite"
      Debug.AspNetCompiler.PhysicalPath = "..\..\..\..\..\..\Inetpub\wwwroot\"
      Debug.AspNetCompiler.TargetPath = "PrecompiledWeb\mywebsite\"
      Debug.AspNetCompiler.Updateable = "true"
      Debug.AspNetCompiler.ForceOverwrite = "true"
      Debug.AspNetCompiler.FixedNames = "false"
      Debug.AspNetCompiler.Debug = "True"
      Release.AspNetCompiler.VirtualPath = "/mywebsite"
      Release.AspNetCompiler.PhysicalPath = "..\..\..\..\..\..\Inetpub\wwwroot\"
      Release.AspNetCompiler.TargetPath = "PrecompiledWeb\mywebsite\"
      Release.AspNetCompiler.Updateable = "true"
      Release.AspNetCompiler.ForceOverwrite = "true"
      Release.AspNetCompiler.FixedNames = "false"
      Release.AspNetCompiler.Debug = "False"
      SlnRelativePath = "..\..\..\..\..\..\Inetpub\wwwroot\"
     EndProjectSection
    EndProject

     

    Any ideas how to make this work?

  • Re: Changing a web project from http://localhost to a named site

    05-01-2008, 6:30 AM
    Answer

    Hi,

    Based on your description above, I guess your project is ASP.NET website project.

    If you want to open the website on remote server, you cannot change the solution file to map to remote site because this website is created on the local IIS. In this case, you can try to copy this website project to this remote site and then open it using Visual Studio 2005 via Remote Site option.

    If you want to open this local website using domain name (mywebsite), you can try to configure your local IIS to replace Localhost using the name you want. For more information, see http://support.microsoft.com/kb/308163/en-us

     

    If this doesn’t help you, please feel free to let me know.


    I hope this helps.

    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.
  • Re: Changing a web project from http://localhost to a named site

    05-02-2008, 8:45 PM

    MarkStick out tongue

    Filed under: ,
Page 1 of 1 (3 items)
Microsoft Communities
Page view counter