Geeks With Blogs

Tim Huffam Dotting the I and crossing the T of I.T.
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:
 
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 7, 2008 2:48 AM C# .NET , OS/Networking/Misc Apps , ASP.NET | Back to top


Comments on this post: ASP.NET error running web app: HTTP Error 403 - You are not authorized to view this page

# re: ASP.NET error running web app: HTTP Error 403 - You are not authorized to view this page
Requesting Gravatar...
It was really helpful. Thanks
Left by Dee on Oct 14, 2008 7:18 PM

# re: ASP.NET error running web app: HTTP Error 403 - You are not authorized to view this page
Requesting Gravatar...
thx, great explaination!
Problem solved!
Left by jay on Jul 24, 2009 7:42 AM

# Very good piece of information
Requesting Gravatar...
Thanks. you saved me a lot of trouble.
Left by Mohammad Vaqqas on May 05, 2010 4:27 AM

# re: ASP.NET error running web app: HTTP Error 403 - You are not authorized to view this page
Requesting Gravatar...
how to solve please help me

re: ASP.NET error running web app: HTTP Error 403 - forbiddion runat on server
Left by yash on Dec 21, 2010 5:47 AM

# ASP.NET error running web app: HTTP Error 403 - You are not authorized to view this page
Requesting Gravatar...
how to solve please help me
ASP.NET error running web app: HTTP Error 403 - forbiddion runat on server
Left by yash on Dec 21, 2010 5:48 AM

# re: ASP.NET error running web app: HTTP Error 403 - You are not authorized to view this page
Requesting Gravatar...
Hi,

Good information from your post.Its really time saving stuff you mentioned above in ASP.NET.I am very happy to knew about it.

http://godwinsblog.cdtech.in/2010/12/application-attempted-to-perform.html
Left by srinisha on Dec 23, 2010 5:50 AM

# re: ASP.NET error running web app: HTTP Error 403 - You are not authorized to view this page
Requesting Gravatar...
I am glad to find your great blog! It give me more knowledge! Thanks!
Left by Vietnam Travel Forum on Dec 18, 2011 1:29 AM

# re: ASP.NET error running web app: HTTP Error 403 - You are not authorized to view this page
Requesting Gravatar...
One little thing you left off, that will take one or two years off your life if you ignore it: there is a little "Enable/Disable" toggle link off to the right under "Actions". If you can get to the page by fully qualifying the url, but get the 403 when you dont, chances are its Disabled.
Left by Mark on Feb 16, 2013 1:51 PM

Your comment:
 (will show your gravatar)


Copyright © Tim Huffam | Powered by: GeeksWithBlogs.net