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.