Reputation: 436
This is my web.config and i want to change iis with it, but in localhost it breaks my site with error 500.
<staticContent>
<mimeMap fileExtension=".json" mimeType="application/json" />
</staticContent>
Upvotes: 12
Views: 10006
Reputation: 5742
Without the description of the error you are getting I can only presume you are adding a mimetype that already exists in the IIS server.
In these cases or where you are not sure, you can remove the extension prior to adding it, in your configuration file.
<staticContent>
<remove fileExtension=".json" />
<mimeMap fileExtension=".json" mimeType="application/json" />
</staticContent>
Upvotes: 8
Reputation: 745
Buetto, just add this line to your web.config:
<staticContent>
**<remove fileExtension=".json" />**
<mimeMap fileExtension=".json" mimeType="application/json" />
</staticContent>
It will change the iis configuration of your server (localhost).
Upvotes: 20