Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Static files served empty from IIS 7

Tags:

iis-7

I'm trying to serve static files JSON files from my IIS 7.5 on my Windows 7 machine (localhost).

Having mapped the .JSON file extension to the StaticFileModule (under Handler Mappings), I am able to GET a file from a URL such as http://localhost/english.json but the file always comes up empty = Content-Length: 0.

A few more details: I've tried both "Integrated" and "Classic" managed pipline mode. I've added "application/x-javascript" as the MIME-type for .json files.

What else do I need to do to get this working?

like image 786
urig Avatar asked May 02 '11 10:05

urig


1 Answers

The problem was with my definitions in Handler Mappings. They were not needed at all and once removed, I can now see receive the file and its content from the server. The definition under MIME Types is required however.

like image 56
urig Avatar answered Oct 15 '22 17:10

urig