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 asp.net 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!
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.
No related posts.
Leave a comment
- What is the easiest way to upgrade my existing Perl 5.14 to Perl 5.16 on FreeBSD 9 using the ports system?
- Know if mysql has done its job
- Redirect https .com to https .co.uk without a valid SSL cert on .com without DNS change
- Why is it a bad idea to use customer email as from address
- 100% packets dropped on first RX queue on 3/5 raid6 iSCSI NAS devices using intel igb (resolved)