IIS 7 settings (MIME) overwritten on publish

Discussion in 'General troubleshooting' started by jonj, Mar 9, 2011.

  1. It seems that when I publish, my IIS 7 MIME headers get rewritten. Can I change something to fix this? Happens on both FTP and Web Deploy. I have .manifest set to text/cache-manifest and it reverts every time...! :confused:
     
  2. All the setting changes you make through IIS7 are actually written in your web.config, which you have on the web server. So whenever you update your application, and overwrite the web.config, it's removing these settings.

    I would recommend making the IIS changes, and then downloading the web.config which is on the web server. Now, whenever you make changes to your application, you'll be uploading a web.config with the MIME changes already in it.
     
  3. Teach a man to fish ;)

    Thanks! That saves me from making the change in IIS 7 MIME for the 100th time!

    :rolleyes:

    FYI to others, just put this in system.webServer

    <staticContent>
    <remove fileExtension=".manifest" />
    <mimeMap fileExtension=".manifest" mimeType="text/cache-manifest" />
    </staticContent>
     

Share This Page