简体   繁体   中英

Server error while playing a video: HTTP Error 404.3

i have an application where i require to upload a video as:

html

<iframe id="frame1" runat="server" visible="false"
       style="height: 222px; width: 482px;"></iframe>

Code

Finalpath = filepath + filename;
frame1.Visible = true;
frame1.Attributes.Add("src", Finalpath);

but when i load the video Extension Mp4 it shows the error in Iframe

HTTP Error 404.3 - Not Found

The page you are requesting cannot be served because of the extension configuration. If the page is a script, add a handler. If the file should be downloaded, add a MIME map.

how to handle this Server Error and what type(extension) of video i can upload? thanks for any assistance..

You should add MIME type for .MP4 format on IIS or in web.config file In Web.Config For IIS 7 you can add this section in configuration.

<system.webServer>
    <staticContent>
        <mimeMap fileExtension=".mp4" mimeType="video/mp4" />
    </staticContent>
</system.webServer>

You can use HTML 5 <video> tag to display your .mp4 video

<video width="320" height="240" controls="controls">
  <source src="movie.mp4" type="video/mp4">
  Your browser does not support the video tag.
</video> 

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM