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

I created a certain number of static JSON files with no extension in a subfolder of my site. I want to use them for tests.

The problem is that IIS is refusing to serve them because :

HTTP Error 404.17 - Not Found

The requested content appears to be script and will not be served by the static file handler.

The folder is a subfolder of an ASP.NET application and I can't create an application just for it, neither can I change the parent application's application pool. Actually, I don't have access to the IIS configuration other than through the web.config file in the folder in question.

I assume there must be a way to get a web server to serve static files, right?

share|improve this question
Any progress on this? Facing a similar problem serving extensionless image files on a shared host. – Joel Purra Oct 22 '12 at 23:02
there is a hotfix , but it didn't help me :( – thorn Apr 17 '13 at 16:32

Simply add an extension and set the mimetype. If you need extensionless urls then use a URL rewriter to hide the extensions

share|improve this answer

There are all sorts of ways to handle this (by directory, by editing the handler map - just off the top of my head), not the least of which is to simply add an extension. Review this technet document on Configuring handler mapping, and determine which option best fits your needs. See this article on about on entries to web.config

share|improve this answer
If adding an extension was an option, it would be easy, indeed, but it's not. Handlers don't appear to be the right approach either since I'm serving static files and they're being handled by the static file handler, so I don't know what could be done there. – madd0 Mar 26 '12 at 19:53
adding an extension isn't an option? If you don't want the files to be run as javascript and would prefer them to be processed as static files then you should remove the script code and ensure that there is only HTML code (thus not making them JSON files). Otherwise, I'm not sure it's possible to server javascript without configuring a webserver (any webserver forget IIS) the type of file you are trying to get the browser to see. Have yuo set any type of mime type? – Jim B Mar 26 '12 at 21:38

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.