Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

This is probably a fundamental question concerning IIS 7. I currently have a website running on IIS 7 on my local machine. I've noticed that when I type in a URL of the form http://localhost/styles/default.css, my web browser will open up the css file in notepad. However, if I use an imaginary nonexistant file extension, IIS tries to hand off the request to my website, which happens to be an mvc application. Because the resource does not exist, the web application throws an error. I know that Request Filtering in IIS can block specified file extensions. However, if the file extension is not being explicitly blocked, how does IIS know whether it is a static resource vs routing it to the website for that particular binding?

One possibility is that IIS tries to locate the resource with the unknown file extension first, and, if it fails to do so, hands the request off to the web application (err... http handler, I guess that's the same thing...). Not sure if this is what's happening...

Many thanks in advance!

share|improve this question
up vote 1 down vote accepted

What you want to check out is MIME types. Right Click on your server in IIS and goto properties. At the bottom is mime types. Thes are all the file extensions that IIS knows how to handle.

Here is link to stuff about configuring MIME types

This should get you started.

share|improve this answer
Excellent, thanks! I was able to confirm by removing the MIME type for .css files, which caused the website to return an HTTP 404.3 error instead of opening the file in notepad. Good to know how that works:) – Andrew May 4 '12 at 10:31

Your Answer


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.