To Overcome "HTTP Error 404.3 Not Found" Error While Playing Videos In ASP.NET

In this article, I will give you the solution to overcome the “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.” error in ASP.NET.

Developers may face this error in many situations but I faced this error when I tried to play different formats of  video (.MP4, .SWF, .MPEG, .MOV, .AVI).

My code base: ASP.NET with localhost of IIS.

This is my code:

  1. <video>  
  2.    <source src=”FILEPATH.mp4” type=”video/mp4”>  
  3.    <source src=”FILEPATH.mov” type=”video/quicktime”>  
  4.    <source src=”FILEPATH.mpeg” type=”video/mpeg”>  
  5.    <source src=”FILEPATH.swf” type=”application/x-shockwave-flash”>  
  6. </video>  

When I run this code, the screen appears but the video doesn't play and when I inspect the page, it shows the following error:

“Failed to load resource: the server responded with a status of 404 (Not Found)”. I clicked the error link it shows the error “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.”

From that error, I noticed “ADD A MIME MAP”.

MIME- Multipurpose Internet Mail Extensions Types, is a type which identifies the types of content that can be served to a browser or a mail client from web server. At first, I thought I have already given that MIME type inside the tag,
  1. <source src=”FILEPATH.mp4” type=”video/mp4”>  
  2. <source src=”FILEPATH.mov” type=”video/quicktime”>  

Then, I came to know that we have to add these MIME types in IIS localhost too. Basically, IIS has the common MIME types (file extension types) inside. If we are using any new or latest file type, then we need to add that new file extension in MIME types, so that we can overcome this error.

The following screenshots show how to add new MIME type in IIS.

  • Select MIME Types in the Features View window.

    Error Zone

  • In MIME Types window, you can see the default or common MIME Types which already exist. Select "Add" option.

    Error Zone

  • Now, add the file extension and MIME type. Note: if you don’t know the MIME type for the particular file extension, just Google it.

    Error Zone

  • Restart the IIS.

    Error Zone

Reference

Error Zone

Source

technet.microsoft.com

Note

This error will arise mostly in older versions of Windows (Windows7, Windows8).

http://www.c-sharpcorner.com/forums/asp-net-swp-video-not-playing

I hope this article is very useful. Thank you.


Similar Articles