title: How to run a .wav in client. ASP.NET
body: <p>I have an application that plays a wave file using the SoundPlayer class. However, when I publish the application in IIS, the file will not play.
  To use the SoundPlayer class I added a reference windows.dll, it may interfere?</p>
  
  <pre><code> public void PlaySound()
      {
          try
          {
              while (1 == 1)
              {
                  List&lt;string&gt; distinctMusic = GetMusicFile.Distinct().ToList();
  
                  for (int i = 0; i &lt; distinctMusic.Count; i++)
                  {
                      player.SoundLocation = distinctMusic[i];
                      player.Play();
                      Thread.Sleep(GetMusicDuration[i] * 1000);
                      player.Stop();
                  }
                  player.Dispose();
              }
          }
          catch (Exception e)
          {
              //log.LogTxt(e.ToString());
          }
      }
  </code></pre>
  
  <p>Can anyone help me?
  Thx !</p>