Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

LS,

When I try to access an URL that points to a directory that doesn't contain a Default Document, IIS 7.0 sends me this response:

HTTP/1.1 200 OK
Server: Microsoft-IIS/7.0
X-Powered-By: ASP.NET
Date: Tue, 23 Feb 2010 07:36:47 GMT
Content-Length: 0

I was wondering, is there any way to make it output a 404?

Kind regards,

Matthias Vance

share|improve this question
    
@Matthias Vance: do you have directory browsing enabled or disabled for the directory in question? –  MattB Feb 23 '10 at 17:18
    
I haven't enabled directory browsing for any directory, including this one. –  user215361 Feb 25 '10 at 8:03
    
sorry, no ideas from me then - what you are seeing is not the default behavior from IIS7. The default behavior with no default document and directory browsing disabled is a 403.14 (forbidden) error. I'm wondering if you have a module enabled that is changing the behavior? –  MattB Mar 4 '10 at 16:07
    
Did anyone ever figure this out? We have the same problem. –  Andrew Csontos Mar 29 '13 at 20:47

1 Answer 1

up vote 1 down vote accepted

What i discovered is that you have to have the Directory Browsing feature installed in IIS.

If it is installed and disabled in the web.config file (which is the default), then IIS will throw a 403.14 error.

If you do not install the Directory Browsing feature at all, then you get a 200 with no response.

I haven't been able to convince anyone it is a bug, but it sure seems like one.

I'd expect IIS to return a 404.

http://forums.iis.net/t/1196744.aspx/1?IIS+returns+null+response+when+it+can+t+find+a+default+document+and+directory+browsing+is+not+installed

share|improve this answer
    
I agree that this is a "bug". You would not expect a web server to return 200 when a resource is not found. Good find, I will accept this as an answer. –  user215361 Apr 5 '13 at 7:24

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.