Hi All,
I'm trying to get the duration for an audio file in c#. I got the following code to work on my local machine but when I deploy it to a windows server 2008 box it always returns a duration of 0 for .avi and .wav files.
WindowsMediaPlayerClass wmp = new WindowsMediaPlayerClass();
IWMPMedia mediaInfo = wmp.newMedia(filePath);
return mediaInfo.durationString
I have windows media player 11 installed on the server.
Any help would be most appreciated