inheritance - With IIS 10 on Windows Server 2022, MIME type is NOT being inherited - Stack Overflow

admin2025-05-01  1

I was adding MIME types for .webm and .mp4 and a couple of other file types recently, and I did it in IIS at the server level so that (in theory!) all the domains on the server would inherit those MIME types. However, one domain did not inherit any of the new MIME types I added (there were six in all added to the server level).

The other domains under the server did inherit. Is there a reason one domain did NOT inherit? Could that be caused by a conflict between an existing server MIME type and one defined locally in the domain? The domain that is doing this does have many inherited MIME types, so it IS inhering some of them, but not the ones I recently added. TIA.

I ended up adding the missing MIME types to the domain, so the corresponding website is now working, but I would rather maintain at the server level, but this domain is the exception to making that work out.

I was adding MIME types for .webm and .mp4 and a couple of other file types recently, and I did it in IIS at the server level so that (in theory!) all the domains on the server would inherit those MIME types. However, one domain did not inherit any of the new MIME types I added (there were six in all added to the server level).

The other domains under the server did inherit. Is there a reason one domain did NOT inherit? Could that be caused by a conflict between an existing server MIME type and one defined locally in the domain? The domain that is doing this does have many inherited MIME types, so it IS inhering some of them, but not the ones I recently added. TIA.

I ended up adding the missing MIME types to the domain, so the corresponding website is now working, but I would rather maintain at the server level, but this domain is the exception to making that work out.

Share Improve this question asked Jan 2 at 22:26 PlanetThoughtsPlanetThoughts 13 bronze badges 3
  • 1 The description contains some typical misunderstanding of IIS configuration system. At IIS site/application levels, server level settings might be inherited but can also be denied if <clear> or <remove> tags are used. So when you feel something doesn't work the way you wanted, the first step is to review all related configuration files and see what exactly the settings are. Too early to post such to this site. – Lex Li Commented Jan 2 at 22:29
  • as mentioned in the post stackoverflow.com/a/367372 it might be because the <clear /> in the web.config file. If the specific site has its own local MIME type definitions, these could be overriding the server-level settings. Even though the site is inheriting some MIME types, it's possible that certain MIME types like the newly added ones are either explicitly defined locally or there is a conflict preventing them from being inherited. so could you share which mime type you are trying to add to the site which is not working and your web.config file with us. – Jalpa Panchal Commented Jan 3 at 3:02
  • Thank you both for pointing to configuration files. I was depending on IIS too much. In web.config, I saw that the fileExtension entries were being removed then added back. When I deleted those lines, inheritance started working. I am not sure why one person said it is "Too early to post such to this site." I was not familiar with web.config and had searched both the Internet and stackoverflow for guidance before making the post here. So you did give good advice, I just do not understand the judgment that you added, and I would like to comply with expectations of stackoverflow community. – PlanetThoughts Commented Jan 3 at 11:41
Add a comment  | 

1 Answer 1

Reset to default 0

I had to go to the web.config file, where I found that some MIME types were being removed and then added back locally. I edited it to get rid of the remove and corresponding mimeMap lines, so that the domain could inherit the definitions set up at the server level.

转载请注明原文地址:http://anycun.com/QandA/1746094114a91580.html