Question

Hi my application is MVC, have a view with windows media player, it plays on my local host but not on the hosting server, MIME is set up correct. Here is my script:

<object codebase="http://www.apple.com/qtactivex/qtplugin.cab" 
        classid="clsid:6BF52A52-394A-11d3-B153-00C04F79FAA6" 
        type="application/x-oleobject"> 
        <param name="url" value="../../Video/1.wmv"/> 
        <embed src="../../Video/1.wmv" 
            type="application/x-mplayer2" 
            pluginspage="http://www.microsoft.com/Windows/MediaPlayer/"></embed> 
    </object> 

I tried same script in a simple HTML file, it worked well on the server.

I get 500 Internal Server Error (shown in Fiddler). Any suggestions.

Was it helpful?

Solution

Try using a helper:

<param name="url" value="@Url.Content("~/Video/1.wmv")" /> 
<embed src="@Url.Content("~/Video/1.wmv")" 

This will ensure that a correct url to the video file is generated. In this example I suppose that you have a Video sub-directory and the file is inside this directory.

As far as the 500 error is concerned, I suppose it is not related to the code snippet you have shown. Try looking at the server's EventLog where unhandled exceptions are traced.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top