title: How To Get Silverlight To Play A .WMA File on IIS 6 When The .WMA Extn. Is Mapped To Asp.Net
body: <p>I seem to have hit a bit of a wall on this one - although everything works fine on XP Pro IIS5.1, on IIS 6 I have tried everything over the last few days to get silverlight to simply play a .wma file when the .wma file extension is mapped to .Net in IIS (via Home Directory > configuration, map the extension to c:\windows\microsoft.net\framework\v2.0.50727\aspnet_isapi.dll. ) -  without success !!  The file plays ok so long as the .wma file-type isn't mapped to .net, but as soon as it is, I keep getting a generic "System.Exception - 3137" error message -  which I believe is a file not found/file inaccessible message.</p>
  
  <p>The .wma file that won't play is not compiled as a resource into the silverlight .xap - I am attempting to access it with it just being a normal part of the folder/file structure on the server. I have tried many different combinations of path, but presumably the path is correct as the file plays ok when the .wma extension isn't mapped to .net. The code within the SL app setting the source is :
       mediaPlayer.Source = new Uri("http://www.thedomainname.org.uk/radio/featuredartistsplaylists/poprock.wma", UriKind.Absolute);
  - although I have also tried relative paths from the .xap file (with and without a leading '/'), the absolute path using the ip address rather than the domain  name (which gave a network error) and relative file system path in back\slash format (which gave a network error).
  - for authentication, anonymous access is enabled on IIS for windows user account IUSR_HOST-7418 and as well as not setting the  mode in web.config at all I have tried setting it to mode="none" and mode="windows"</p>
  
  <p>My web-hosting set-up is a VPS running Windows Server 2003 Standard. I don't really know what I am doing, but I have tried the following to no effect :</p>
  
  <pre><code>- In the IIS configuration mapping dialogue, trying with the 'verify that file exists' checkbox checked and unchecked
  
  - adding a &lt;httpHandlers&gt; entry for .wma in the &lt;system.web&gt; tag of web.config as follows :
      &lt;path "*.wma" verb="*" type="System.Web.UI.PageHandlerFactory" validate="false" /&gt;
  (and tried it with validate="true")
  
  - running the request with and without a global.asax and with a code-free Application_BeginRequest event - in case my code in global.asax was blocking access to the .wma
  
  - granted Read &amp; Execute rights on the folder containing the .wma to both the Internet Guest Account(HOST-7418\IUSR_HOST-7418) and Users(HOST-7418/Users) Account.
  </code></pre>
  
  <p>At this point, beyond suspecting that it is some sort of file/folder access issue rather than a path issue, I am pretty much out of ideas - not least because I encountered an identical problem on a Windows Server 2008 (IIS 7) VPS set-up - with .wma files again only playing when not mapped to .net (using compiled handlers/modules), otherwise refusing to play due to "System.Exception : 2210 AG_E_INVALID_ARGUMENT" error code.</p>
  
  <p>Any help would be very much appreciated.</p>