Have you configured your virtual directory to allow the directory browsing rights? If you want to see the direectory listing, you have to enable this permission in the IIS.
Normally when you access some URL, for example http://yoursite/folder this will try to find the default document in that folder which are configured in the IIS and are index.htm, default.htm, default.aspx, index.aspx etc.
Make sure that when you click on the sub menu, you are accessing a page, not a folder. OR allow the virtual directory to display directory browsing.
asp .net 2.0
Please Mark As Answer if it helped.
MCPD ASP.NET 4.0 and 3.5, MCTS WSS, MOSS, SharePoint 2010, MCT
Microsoft Community Contributor Award 2011
In my case it was because ISP changed my IP, w/o me knowing about it (hosting from my PC), and do some redirecting using a free subdomain. Although apparently unrelated to the error, this is what fixed it (was thrown off that localhost was doing it, had
forgotten about the redirects - site began working instantaneously after i updated the IP subdomain map). Going through a checklist of prerequisites needed for the site to work weeded out the problem. Error message was absolutely unhelpful.
ravesoft
Member
91 Points
162 Posts
Directory Listing Denied This Virtual Directory does not allow contents to be listed
Feb 21, 2010 06:54 AM|LINK
Hi Expert,
Directory Listing Denied This Virtual Directory does not allow contents to be listed with url rewriting in asp.net.
In Win server 2008 and iiS 7. when are look main page its can viewable, when we are click sub menu. we got this error.
Please help me.
thnak you
RRaveen
www.codegain.com
adeelehsan
All-Star
18297 Points
2740 Posts
Re: Directory Listing Denied This Virtual Directory does not allow contents to be listed
Feb 21, 2010 08:11 AM|LINK
Hi
Have you configured your virtual directory to allow the directory browsing rights? If you want to see the direectory listing, you have to enable this permission in the IIS.
Normally when you access some URL, for example http://yoursite/folder this will try to find the default document in that folder which are configured in the IIS and are index.htm, default.htm, default.aspx, index.aspx etc.
Make sure that when you click on the sub menu, you are accessing a page, not a folder. OR allow the virtual directory to display directory browsing.
asp .net 2.0
MCPD ASP.NET 4.0 and 3.5, MCTS WSS, MOSS, SharePoint 2010, MCT
Microsoft Community Contributor Award 2011
ravesoft
Member
91 Points
162 Posts
Re: Directory Listing Denied This Virtual Directory does not allow contents to be listed
Feb 22, 2010 03:35 PM|LINK
Hi
Thank you buddy, for your great answerr, but when click my sub menu, i'm doing url rewriting internally.
like say
http://xxxxx.webhost4life.com/cgmart/ --- > http://xxxxx.webhost4life.com/subfolder/list.aspx?ID=0987
this acutlly we doing internally,so how we can solve this?
thank you once again.
RRaveen
www.codegain.com
night_dog
Member
418 Points
93 Posts
Re: Directory Listing Denied This Virtual Directory does not allow contents to be listed
Feb 23, 2010 05:32 AM|LINK
Here is a nice article which describes the problem: http://www.codeproject.com/KB/aspnet/extensionless.aspx
ravesoft
Member
91 Points
162 Posts
Re: Directory Listing Denied This Virtual Directory does not allow contents to be listed
Feb 23, 2010 07:45 AM|LINK
Hi thank, but there is no ant hint about IIS 7 and this issue.
Please give me working solutions
thank you
RRaveen
www.codegain.com
night_dog
Member
418 Points
93 Posts
Re: Directory Listing Denied This Virtual Directory does not allow contents to be listed
Feb 23, 2010 08:20 AM|LINK
Which Url rewriting module are you using? Here are some more links
You can make it work like iis6 using a wildcard map:
http://improve.dk/blog/2006/12/11/making-url-rewriting-on-iis7-work-like-iis6
Or you can check the Url rewrite module:
http://learn.iis.net/page.aspx/460/using-url-rewrite-module/
There are also other options:
http://improve.dk/blog/2009/10/14/how-to-do-url-rewriting-on-iis-7-properly
w0lfshad3
Member
2 Points
16 Posts
Re: Directory Listing Denied This Virtual Directory does not allow contents to be listed
Oct 08, 2010 01:14 PM|LINK
In my case it was because ISP changed my IP, w/o me knowing about it (hosting from my PC), and do some redirecting using a free subdomain. Although apparently unrelated to the error, this is what fixed it (was thrown off that localhost was doing it, had forgotten about the redirects - site began working instantaneously after i updated the IP subdomain map). Going through a checklist of prerequisites needed for the site to work weeded out the problem. Error message was absolutely unhelpful.