locked
I can't get staticContent mimeMap to work RRS feed

  • Question

  • User-1928628111 posted

    The docs say you can add the following to my web.config file, but httpsniff shows that my mp4 file is still being returned as application/octet-stream.  Anyone know why the StaticFilehandler is not honoring my mimeMap confication?

    <configuration>
      <system.webServer>    
        <staticContent>
          <mimeMap fileExtension=".mp4" mimeType="video/mp4"/>            
        </staticContent>
        <handlers accessPolicy="Read, Write, Script, Execute"> 
          <add name="mp4" path="*.mp4" verb="*" type="System.Web.StaticFileHandler" resourceType="Unspecified" preCondition="integratedMode" />      
        </handlers>            
      </system.webServer>
    </configuration>    
    
    
    

     

    Wednesday, January 9, 2013 6:01 AM

Answers

  • User-166373564 posted

    Hi clovett

    It seems  there isn't anything wrong with the codes above, you could learn Handlers <handlers> and  <system.webServer> below,

    Handlers <handlers>

    <system.webServer>  

    I think you could have a try add the codes below to your web.config file

    <?xml version="1.0"?>

    <configuration>

        <system.webServer>

          <staticContent>

            <mimeMap fileExtension=".mp4" mimeType="video/mp4"/>

          </staticContent>

        </system.webServer>

    </configuration>

    Please check whether helpful to you.

    Kind regards

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, January 15, 2013 3:00 AM

All replies

  • User-166373564 posted

    Hi clovett

    It seems  there isn't anything wrong with the codes above, you could learn Handlers <handlers> and  <system.webServer> below,

    Handlers <handlers>

    <system.webServer>  

    I think you could have a try add the codes below to your web.config file

    <?xml version="1.0"?>

    <configuration>

        <system.webServer>

          <staticContent>

            <mimeMap fileExtension=".mp4" mimeType="video/mp4"/>

          </staticContent>

        </system.webServer>

    </configuration>

    Please check whether helpful to you.

    Kind regards

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, January 15, 2013 3:00 AM
  • User1957418580 posted

    Can you make sure that you have this in the applicationHost.config:

                <section name="staticContent" overrideModeDefault="Allow" />

    Do you happen to have a link that we can browse to so that we can check the response for ourselves?

     

    Tuesday, January 15, 2013 6:08 AM