IIS doesn't serve certain file extensions
Posted
by Alekc
on Server Fault
See other posts from Server Fault
or by Alekc
Published on 2010-01-20T14:02:02Z
Indexed on
2010/03/15
1:10 UTC
Read the original article
Hit count: 387
iis
Hi, i have this weird issue on Win 2k3 server and IIS:
Iis has several sites, in one of them i need to create a subdir and set up it as web application. I've noticed that if i create new directory and put some .js/.txt file into it, they will not be served by iis (IE gives an error Internet Explorer cannot display the webpage).
If i put the same files in another old site's subdirectory it will show correctly.
By sniffing traffic i've seen that iis reply connection state 200 and then drop completely any connection
http://domain.com/test2/prova.txt
GET /test2/prova.txt HTTP/1.1
Host: domain.com
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.7) Gecko/20091221 Firefox/3.5.7 (.NET CLR 3.5.30729)
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Connection: keep-alive
HTTP/1.x 200 OK
If i rename file prova.txt in prova.asp for example it showing without problems so it shouldn't be permissions issue.
After making some researches I've found out that it can be caused by missing mime types, I've checked out .txt and .js are present and served by aspnet_isapi.dll. And here comes another weird thing: if i remove mime mapping from directory's properties it's served correctly, but the same thing doesn't work with js.
I'm really beginning to be out of ideas, is there someone who have some hint?
Thanks in advance.
© Server Fault or respective owner