Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. Can't get MP4 video to play on IIS 7.5

Can't get MP4 video to play on IIS 7.5

Scheduled Pinned Locked Moved ASP.NET
questionhtmldatabasesysadminwindows-admin
6 Posts 4 Posters 6 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    David Mujica
    wrote on last edited by
    #1

    The exact same web application is deployed on our IIS 8.5 server and runs correctly. Here is what is on my .aspx page ....

    This is what is in my code behind ...

    embed1.Attributes("src") = "Videos\" & sVideoName
    embed1.Attributes("type") = "video/mp4"

    I set the source and type of the HTML5 player in the code behind because the video name is passed as a query string parameter. On the IIS 7.5 server, I have added the MIME type, ".mp4 video/mp4" and the Windows 2008 R2 server has the "Desktop Experience" feature installed. What am I missing to get this to work on my IIS 7.5 server ? :confused: BTW: I am using IE 11.

    Richard DeemingR K 2 Replies Last reply
    0
    • D David Mujica

      The exact same web application is deployed on our IIS 8.5 server and runs correctly. Here is what is on my .aspx page ....

      This is what is in my code behind ...

      embed1.Attributes("src") = "Videos\" & sVideoName
      embed1.Attributes("type") = "video/mp4"

      I set the source and type of the HTML5 player in the code behind because the video name is passed as a query string parameter. On the IIS 7.5 server, I have added the MIME type, ".mp4 video/mp4" and the Windows 2008 R2 server has the "Desktop Experience" feature installed. What am I missing to get this to work on my IIS 7.5 server ? :confused: BTW: I am using IE 11.

      Richard DeemingR Offline
      Richard DeemingR Offline
      Richard Deeming
      wrote on last edited by
      #2

      If you request the video file directly within the browser, rather than loading your aspx page, do you get the video, or do you get an error? If you get an error, then try opening the video file in a browser running on the server. IIS should give you a much more detailed error message for a local request.


      "These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer

      "These people looked deep within my soul and assigned me a number based on the order in which I joined" - Homer

      D 1 Reply Last reply
      0
      • Richard DeemingR Richard Deeming

        If you request the video file directly within the browser, rather than loading your aspx page, do you get the video, or do you get an error? If you get an error, then try opening the video file in a browser running on the server. IIS should give you a much more detailed error message for a local request.


        "These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer

        D Offline
        D Offline
        David Mujica
        wrote on last edited by
        #3

        I've made a new .aspx page with no code behind and discovered the following: 1) If I move the .MP4 file to the root of the website and reference it like this ...

        The video plays correctly. However, if I mode the video to a subfolder on the website (/Videos) and reference it like this ...

        The video does not play. It must be the syntax of the "src" attribute, but what is the correct syntax ? :wtf:

        Z 1 Reply Last reply
        0
        • D David Mujica

          I've made a new .aspx page with no code behind and discovered the following: 1) If I move the .MP4 file to the root of the website and reference it like this ...

          The video plays correctly. However, if I mode the video to a subfolder on the website (/Videos) and reference it like this ...

          The video does not play. It must be the syntax of the "src" attribute, but what is the correct syntax ? :wtf:

          Z Offline
          Z Offline
          ZurdoDev
          wrote on last edited by
          #4

          Try /Videos/QA.mp4. Assuming videos is at the root.

          There are only 10 types of people in the world, those who understand binary and those who don't.

          D 1 Reply Last reply
          0
          • Z ZurdoDev

            Try /Videos/QA.mp4. Assuming videos is at the root.

            There are only 10 types of people in the world, those who understand binary and those who don't.

            D Offline
            D Offline
            David Mujica
            wrote on last edited by
            #5

            Tried that. The error message I get is: "Unsupported video type or invalid file path" The weird thing is that if I reference the video from the root, everything works fine. Ugh. I'm considering deploying the website with the videos stored at the root and just move on.

            1 Reply Last reply
            0
            • D David Mujica

              The exact same web application is deployed on our IIS 8.5 server and runs correctly. Here is what is on my .aspx page ....

              This is what is in my code behind ...

              embed1.Attributes("src") = "Videos\" & sVideoName
              embed1.Attributes("type") = "video/mp4"

              I set the source and type of the HTML5 player in the code behind because the video name is passed as a query string parameter. On the IIS 7.5 server, I have added the MIME type, ".mp4 video/mp4" and the Windows 2008 R2 server has the "Desktop Experience" feature installed. What am I missing to get this to work on my IIS 7.5 server ? :confused: BTW: I am using IE 11.

              K Offline
              K Offline
              K SIS
              wrote on last edited by
              #6

              Try MIME type, ".mp4 video/mpeg"

              1 Reply Last reply
              0
              Reply
              • Reply as topic
              Log in to reply
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes


              • Login

              • Don't have an account? Register

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • World
              • Users
              • Groups