locked
http://localhost- Why port #? RRS feed

Answers

  • User509596457 posted

    Is this happening when browsing the site through VS or by just going to localhost/mysite1 in a browser?

    I would check the path in IIS to ensure it is pointing toward the correct folder. Do you have other sites hosted locally on this machine?

     

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, February 26, 2008 5:58 PM

All replies

  • User509596457 posted

    First of all the port number should not affect an image reference in your code. The page will still look in the same location with or without a port specification. Visual Studio has an internal web server that is used when your site is loaded from the file system. This web server runs on a random port so as not to confict with your local IIS if you have it running. Here is an alternative: you could install your site to the local IIS and then open from local IIS instead of opening it from the file system. Then when you browse a page in that site through VS, it will not specify a port. Hope this helps.

    Tuesday, February 26, 2008 11:01 AM
  • User1817128440 posted

    thanks for the reply Josh.. I did what you said but now I am getting the following error. any thoughts?

    Server Error in '/' Application.

    The resource cannot be found.

    Description: HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable.  Please review the following URL and make sure that it is spelled correctly.

    Requested URL: /MySite1/Default.aspx


    Version Information: Microsoft .NET Framework Version:2.0.50727.1433; ASP.NET Version:2.0.50727.1433

     

    <!-- [HttpException]: The file '/StreamingGIF/Default.aspx' does not exist. at System.Web.UI.Util.CheckVirtualFileExists(VirtualPath virtualPath) at System.Web.Compilation.BuildManager.GetVPathBuildResultInternal(VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile) at System.Web.Compilation.BuildManager.GetVPathBuildResultWithNoAssert(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile) at System.Web.Compilation.BuildManager.GetVirtualPathObjectFactory(VirtualPath virtualPath, HttpContext context, Boolean allowCrossApp, Boolean noAssert) at System.Web.Compilation.BuildManager.CreateInstanceFromVirtualPath(VirtualPath virtualPath, Type requiredBaseType, HttpContext context, Boolean allowCrossApp, Boolean noAssert) at System.Web.UI.PageHandlerFactory.GetHandlerHelper(HttpContext context, String requestType, VirtualPath virtualPath, String physicalPath) at System.Web.UI.PageHandlerFactory.System.Web.IHttpHandlerFactory2.GetHandler(HttpContext context, String requestType, VirtualPath virtualPath, String physicalPath) at System.Web.HttpApplication.MapHttpHandler(HttpContext context, String requestType, VirtualPath path, String pathTranslated, Boolean useAppConfig) at System.Web.HttpApplication.MapHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) -->

    Tuesday, February 26, 2008 11:51 AM
  • User509596457 posted

    Is this happening when browsing the site through VS or by just going to localhost/mysite1 in a browser?

    I would check the path in IIS to ensure it is pointing toward the correct folder. Do you have other sites hosted locally on this machine?

     

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, February 26, 2008 5:58 PM