Solved

My website .asp pages give a directory listing (or Directory Listing Denied)

Posted on 2010-08-31
16
728 Views
Last Modified: 2012-05-10
Up until recently, my websites had been working properly for years.  Suddenly, two of the websites on the same server (Windows 2003 IIS 6) began to experience the same problem at the same time.  It is possible that I or a co-worker unintentionally changed a server setting to cause this problem.

I'll substitute my actual website domains with www.example.com and www.example2.com

Whenever any visitor goes to www.example.com/index.asp or www.example.com/someOtherPage.asp, they get a directory listing instead of the actual page.  The same is true with my other asp site, www.example2.com.  This happens for every .asp page on both website.  .html pages work fine.  Also, we have some .NET websites on the server and their .aspx pages are working fine too.  Only .asp pages are giving directory listings.

From within the webserver, I have tried accessing the pages using a local internal (10.100...) IP address.  I still get a directory listing, so I can safely rule out the firewall as somehow being responsible.

There is one more unusual twist, which is that the sites will display a .asp page correctly as a default document.  In other words, if I go to www.example.com/ then I will actually see index.asp displayed correctly (if index.asp is the default document) and the asp code runs properly!  But if I go to www.whatever.com/index.asp, I get a directory listing.

Thank you very much!
0
Comment
Question by:jessla13
  • 9
  • 3
  • 2
  • +2
16 Comments
 
LVL 30

Expert Comment

by:Wayne Barron
ID: 33571582
seen this happen before.
Here are some links, hopefully one will help you

http://classicasp.aspfaq.com/general/why-won-t-my-asp-pages-work-in-iis-6-0.html
http://www.experts-exchange.com/Q_23020371.html

Good Luck
Carrzkiss
0
 

Author Comment

by:jessla13
ID: 33571961
carrzkiss:
None of the suggestions in the first link seem to describe my problem, but I decided to follow through anyway and I pursued the following:
-I tried resyncing the IWAM account by running the cscript synciwam.vbs command
-I made sure that Active Server Pages was set to Allow under Web Service Extensions (it was)
-I very briefly tried setting all extensions to Allow, but it still didn't work.  I changed the unknown extensions, internet data connecter, and webdav back to prohibit after trying this.


In the 2nd link, I followed the suggestion of adding permissions to the Internet Guest Account and to the Network Service account.  That didn't resolve the issue.  I then went a step forward and gave "Full Control" to the "Everyone" group as a way to completely rule out a permissions issue.  I still got Directory Listings when requesting .asp pages.

The 2nd link also suggested checking permissions on any files being referenced that were outside of the web directory (for example, DLL files elsewhere on the server).  In order to rule out this problem, I have been testing on a file I created called testpage.asp which does not reference any other files.  It merely contains the text "hello this is a test page" and nothing else.  Everyone has Full Control on this page.  Even this page gives me a directory listing.

To summarize, I feel that the first link was not applicable and that I have sufficiently exhausted the advice from the 2nd link.  Any other suggestions?
0
 

Author Comment

by:jessla13
ID: 33571985
Oops, the last sentence of my previous post doesn't make sense.  I meant to say that the first link didn't seem applicable, but I followed the troubleshooting steps anyway.  I also followed the troubleshooting steps of the 2nd link, and haven't had luck with either.
0
 
LVL 30

Expert Comment

by:Wayne Barron
ID: 33572404
I had it when some works for one situation, but not for someone elses.
If I can think of anything else I will let you know.

p.s.
A sure fire way to fix the issue (In nearly 99% of the cases)
A reinstall of IIS.

If you are on a production server, then this might be something that you want to check in on especially if you have sites that need to be online NOW...

Remember to do a backup of the sites before you do this.
Right click on computer name is IIS and choose
Tasks | Backup and Restore

That is the only thing that I can think of that I know almost always works.

Good Luck
Carrzkiss
0
 
LVL 9

Expert Comment

by:shalabhsharma
ID: 33573377
Directory Listing Denied error is generated when there is no Index file (default page) in the requested directory. For example, if a user types http://forexample-domain.com in their browser, and there is not an Index file in the requested directory, the user will receive the Directory Listing Denied error.
0
 
LVL 30

Expert Comment

by:Wayne Barron
ID: 33573463
you are correct shala
BUT, in this case, I doubt that he or the other tech deleted their default files from the directories.
0
 

Author Comment

by:jessla13
ID: 33577326
shalabhsharma: We are not getting a directory listing denied error.  This is what is happening:

index.asp is the default document for the website.

www.example.com/index.asp displays a directory listing
www.example.com/someOtherPage.asp displays a directory listing
www.example.com/ displays the default document, index.asp, correctly!
I hope you would agree that under no circumstances should a request for a specific page name (index.asp or someOtherPage.asp) result in a directory listing.  They should either display the page or give a 404 error, or some other error, but never a directory listing.
 
carrzkiss: I will try backing up my sites and reinstalling IIS tonight if I do not get any other suggestions.
0
 
LVL 2

Expert Comment

by:FEOX
ID: 33577914
You may want to check the Custom Errors properties of your website.  It is possible to make a custom error show the directory listing of a folder if that custom error was set to show that instead.  Setting error message 404 to a URL that is allowed directory listing may list that directory instead of showing the actual 404 error message.

Also, depending on the settings of your website, "http://www.example.com/" may not be showing index.asp but rather default.asp, default.htm, index.htm, index.html, iisstart.asp.

So a possibility on what is happening here is that:

1. index.asp and someOtherPage.asp has an error and that custom page for that error was set to list the folder instead.

2. When accessing "http://www.example.com/", it is showing default.asp (or default.htm or index.htm or index.html) instead.

To correct this problem, check the Custom Errors page first if they are all correct (set to default if necessary). Then see if index.asp will show the actual error.

Hope this helps you find the problem.
0
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 

Author Comment

by:jessla13
ID: 33578887
Hello FEOX:  I appreciate your advice.  It makes a lot of sense given the information I have provided.

I will start right off by saying that I have just went into IIS, went to Custom Errors, and set all error messages to default.  It did not repair the problem or change any of my results.

Another thing I have tried in my testing is making a directory with a single file in it, like this:

www.example.com/testFolder/index.asp

There are no other files in testFolder.  The index.asp file in the testFolder contains no code at all.  Just plain text that says "This is a test index page".

www.example.com/testFolder/ displays "This is a test index page"
www.example.com/testFolder/index.asp displays a directory listing

Therefore, the index.asp file in testFolder is working properly and is not generating an error message to bring about the directory listing.  Even so, I did set all custom errors to default as per your suggestion.  It did not work but at least we are ruling some things out.
0
 

Author Comment

by:jessla13
ID: 33582838
I have just reinstalled IIS 6.0 completely and it did not resolve the problem.  Does anyone have any other advice?
0
 
LVL 2

Expert Comment

by:FEOX
ID: 33583029
Another place to look is your Application Configuration: Mappings (Web Sites Properties: Home Directory: Configuration: Mappings).  What are the settings for ".asp"?  Mine is "C:\WINDOWS\system32\inetsrv\asp.dll".  Maybe some other DLL or EXE is processing your ".asp" files.
0
 
LVL 14

Expert Comment

by:wolfman007
ID: 33586381
I agree with FEOX you should check you Classic ASP script Mapping.

Right click on the website, then select properties.

Click the appropriate tab: Home Directory, Virtual Directory, or Directory

In the Application settings area, click Configuration, and then click the Mappings tab.

Scroll down until you find .asp and then check that you are seeing "C:\WINDOWS\system32\inetsrv\asp.dll" with the verbs GET,HEAD,POST,TRACE

see the following website for further info

Setting Application Mappings in IIS 6.0 (IIS 6.0)
http://www.microsoft.com/technet/prodtechnol/WindowsServer2003/Library/IIS/4c840252-fab7-427e-a197-7facb6649106.mspx?mfr=true

If the .asp mapping is correct then you might want to check that someone has not added a wildcard mapping that is overriding everything.

On the Mappings tab check the box area marked Wildcards, under the mappings area to see if there are any wildcards set up.

see

Installing Wildcard Application Mappings (IIS 6.0)
http://www.microsoft.com/technet/prodtechnol/WindowsServer2003/Library/IIS/5c5ae5e0-f4f9-44b0-a743-f4c3a5ff68ec.mspx?mfr=true
0
 

Author Comment

by:jessla13
ID: 33587484
Hello FEOX and wolfman007:

Thank you for the suggestion regarding Application Configuration mappings.  Unfortunately, my .asp is already mapped to C:\WINDOWS\system32\inetsrc\asp.dll with GET,HEAD,POST,TRACE

The wildcard box is empty.  Any other suggestions?
0
 

Author Comment

by:jessla13
ID: 33587573
By the way, since all of my websites are affected (not just 1 website), I do not particularly expect to the find the answer under the IIS properties of a single website.

In addition to the 2 ASP websites that I already had, I have tried creating .asp pages in my other sites.  They also give the same problem, so this is really a server-wide issue and not limited to just 1 or 2 sites.

I have decided to reveal one such URL: http://www.idpconsulting.com/something.asp will give you a DIrectory Listing Denied page.  If I was to allow directory listings on that site, you would actually see the directory listing instead.  The contents of something.asp is simply "this is a page"
0
 

Author Comment

by:jessla13
ID: 33587629
Also note that your exact error message varies slightly by browser.  Internet Explorer 8 displays "The website declined to show this webpage" instead of "Directory Listing Denied".  Firefox will give you "Directory Listing Denied".  They mean the same thing in this case, although the IE8 message can mean other things in other situations.
0
 

Accepted Solution

by:
jessla13 earned 0 total points
ID: 33618244
The issue was an ISAPI filter.  Even though the invidivual websites did not have any ISAPI filters, the parent "Web Sites" node (IIS6) can also contain ISAPI filters.  Clearing one of the filters and performing an IISRESET fixed the problem.
0

Featured Post

Control application downtime with dependency maps

Visualize the interdependencies between application components better with Applications Manager's automated application discovery and dependency mapping feature. Resolve performance issues faster by quickly isolating problematic components.

Join & Write a Comment

Hello, all! I just recently started using Microsoft's IIS 7.5 within Windows 7, as I just downloaded and installed the 90 day trial of Windows 7. (Got to love Microsoft for allowing 90 days) The main reason for downloading and testing Windows 7 is t…
Have you ever needed to get an ASP script to wait for a while? I have, just to let something else happen. Or in my case, to allow other stuff to happen while I was murdering my MySQL database with an update. The Original Issue This was written…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

758 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now