Tim Huffam

Dotting the I and crossing the T of I.T.

  Home  |   Contact  |   Syndication    |   Login
  129 Posts | 0 Stories | 874 Comments | 677 Trackbacks

News

Archives

Post Categories

Interesting Blogs/Links

This error occurs when attempting to view an asp.net application (using the Run button or right clicking on the project and selecting 'View in browser').  
 
This usually occurs because the browser is looking for something that does not exist.  For example, when using the project name 'MyProject', VS opens a browser with the following URL:
http://localhost/MyProject/
 
Although this points to a project (virtual directory/application within IIS), it does not point to a specific resource.  In my case I just want it to point to the default page 'default.aspx'. 
 
Normally, if a specific resource is not specified, IIS will look for a default resource - in this case however the name of the page I want to use (default.aspx) is not registered as a default document.
 
To fix:
1) Start IIS management tool (either from 'Computer Management' or Control Panel - Administrative Tools - Internet Information Services).
2) Right click on your projects virtual directory and select Properties.
3) Select the Documents tab.
4) Click on the 'Add...' button.
5) Enter 'default.aspx' (without quotes) and click OK, then click OK back on the Properties dialog.
 
This will add default.aspx to the list of default documents IIS will look for - but only within your app's virtual directory.  To set this globally (eg for all apps/virtual directories within IIS), do the same - but for step 2) right click on the website ('Default Web Site' on Windows XP) instead of your virtual directory.
HTH
Tim
posted on Thursday, February 07, 2008 2:48 AM

Feedback

# re: ASP.NET error running web app: HTTP Error 403 - You are not authorized to view this page 10/14/2008 7:18 PM Dee
It was really helpful. Thanks

Post Feedback

Title:
Name:
Email: (never displayed)
Url:
Comments: 
Please add 7 and 3 and type the answer here: