WMPLib not functioning on server but in debug? RRS feed

  • Question

  • Hello,

    I am working on a program which ought to play a web stream using WMPLib: As long as i execute the code in the debug mode inside Visual Studio, everything works fine. However, as soon as the application is published to IIS on the same machine, it does not start playing the stream anymore. This is the code I use:

    WindowsMediaPlayer WMPPlayer = new WindowsMediaPlayer();
    WMPPlayer.URL = "http://bbcwssc.ic.llnwd.net/stream/bbcwssc_mp1_ws-einws";

    So far, I have tried multiple streams, publishing in both Debug and Release mode and deactivating the firewall in case any calls were blocked. Could you please help me solve this problem?

    Any suggestions are appreciated, thanks in advance!

    Michael Heribert

    Friday, March 3, 2017 7:16 PM

All replies

  • What credential(user) does your "application pool" runs on? Does that user have activation right for the control?

    Btw, what exactly are you trying to do? It doesn't sound useful to have webpage that plays music on the sound system of server. And because of the audio stack separation and "Session 0 isolation", if the production system is Vista/Win2008 or later, it will not be able to play music at all. (In Vista or later, audios are played to the "login session" instead of to driver directly. That's why you can connect to another machine via "remote desktop", play some music on the remote system and be able to listen to it on local system. Generally, the audio interface on session 0 is not connected to anything.)

    Also note that WMP control is expected for running on normal Winform application (i.e.: STA thread), running on MTA thread which is default for web worker process can lead to problem like this. There is simple workaround through.
    Monday, March 6, 2017 2:43 AM