do I need to publish my website to be able to access it via server name?

Last post 10-15-2007 2:50 AM by Benson Yu - MSFT. 3 replies.

Sort Posts:

  • do I need to publish my website to be able to access it via server name?

    10-10-2007, 12:15 AM
    • Member
      11 point Member
    • programthat
    • Member since 03-28-2007, 8:37 PM
    • Menomonie, WI
    • Posts 26

    Hi All,

     I've been searching for a while and can't seem to find the answer I'm looking for so I'm going to post these questions. 

    I have a simple web application that builds a tree view based on a folder structure it retreives from another application via COM.  I am fairly new to VSS 2005 and I dont like the whole localhost:portnumber thing it chooses for me when I create the application.  In all my response.redirects I have to use localhost:1130/page.aspx or I get page not found.  Can I get rid of this and just use localhost?  If so how do I set this up?

    I would like to be able to test this web app by accessing it from another machine via http://servername/website_name.  When I try this I get the error below.  Do I need to publish this site to be able to access it that way?  Is it all related to the localhost:portnumber?

     

    Any help would be greatly appreciated,

     

    Regards,

     

    Russell 

     

    Configuration Error

    Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.

    Parser Error Message: It is an error to use a section registered as allowDefinition='MachineToApplication' beyond application level.  This error can be caused by a virtual directory not being configured as an application in IIS.

    Source Error:

    Line 49:             ASP.NET to identify an incoming user. 
    Line 50:         -->
    Line 51: 		<authentication mode="Windows"/>
    Line 52: 		<!--
    Line 53:             The <customErrors> section enables configuration 

    Source File: c:\inetpub\wwwroot\lfconnect\web.config    Line: 51

     

    Programthat

    Please click "Mark as Answer" for posts that were helpful to you.
  • Re: do I need to publish my website to be able to access it via server name?

    10-10-2007, 4:56 AM
    • Star
      9,030 point Star
    • HosamKamel
    • Member since 01-19-2006, 6:49 PM
    • Egypt
    • Posts 1,307

    Please try to make sure that you have only one web.config file in your application directory. 

    Hosam Kamel

    Remember to click on Mark as answer on the post that helped you
  • Re: do I need to publish my website to be able to access it via server name?

    10-10-2007, 11:11 AM
    • Member
      11 point Member
    • programthat
    • Member since 03-28-2007, 8:37 PM
    • Menomonie, WI
    • Posts 26

    I do only have one web.config file.  I know in all the posts I have read on other sites it says the above error is because the directory is not set up as an application in IIS.  This is true it is not.  I have already tried once with another project to click the create button in IIS and set the default application name.  This does not work either.  I can get t the index page, but not the second page of my application.  This is because of the localhost:port number thing in vss 2005.  I want to be able to call my pages via http://servername/page.aspx   HELP PLEASE!!

    Programthat

    Please click "Mark as Answer" for posts that were helpful to you.
  • Re: do I need to publish my website to be able to access it via server name?

    10-15-2007, 2:50 AM
    Answer

    Hi Programthat,

    Based on my understanding, you have created a simple web project. The issue is when you browse the page, the url always displays as http://localhost:portnumber/project/page.aspx. In addition, you encountered “beyond application level” error. If I have misunderstood your concern, please let me know.

    The port number exists in the url because you are using ASP.NET Development Server to host the web page. When you use the url: http://localhost/project/page.aspx without port number, IIS has the responsibility for host the page. However, the project are file system based and not registered with IIS, so you get the “beyond application level” error.

    To resolve this issue, please create a virtual directory for your project in IIS, and then modify the project to use IIS as web server:

    For web application project:
        1. Right click the project in Solution Explorer, and then select “Properties”.
        2. Click the “Web” tab.
        3. Choose “Use IIS Web server” instead of “Use Visual Studio Development Server”.
        4. Input http://servername/website_name in the “Project Url” textbox, and then click “Create” Virtual Directory” button.

    For web site project:
        1. Create virtual directory for current project.

    Please follow steps in this link:
    How To Create a Virtual Directory in Internet Information Services (IIS)
    http://support.microsoft.com/kb/172138/en-us

        2. Right click the project in Solution Explorer, and then select “Property Pages”.
        3. Click the “Start Options” tab.
        4. Choose “Use custom server” instead of “Use default Web server”.
        5. Input http://servername/website_name in the “Base URL” textbox.

    In addition, when you want to create web application with IIS next time, choose “HTTP” as the location instead of “File System” in the new project dialog.

     

    Sincerely,
    Benson Yu
    Microsoft Online Community Support

    Please remember to mark the replies as answers if they help and unmark them if they provide no help. This can be beneficial to other community members reading the thread.
Page 1 of 1 (4 items)