I have - again - a problem in my WebAPI application.
I am trying to deploy on different versions of IIS (7, 7.5, 8). Newer versions seem to have a global MIME handler for .json, while older versions don't.
When IIS finds no MIME handler, the file does not exist. So, for the older version I made a local MIME handler in web.config. The tricky part is: if it finds two of them (one global and one local), it stops working - even if they both are the same, IIS does not know which one to choose (wtf!?) and only throws errors.
Is there a switch I can apply in web.config which states that the MIME is only to be used if there is no other MIME for this extension available?
If not, can I tell VisualStudio to deploy different versions of web.config, depending on the deployment profile - and/or can I apply a IIS-version-based switch in web.config?