SoundPlayer 클래스를 사용하여 웨이브 파일을 재생하는 응용 프로그램이 있습니다. 그러나 IIS에서 응용 프로그램을 게시 할 때 파일이 재생되지 않습니다. 참조 windows.dll을 추가 한 SoundPlayer 클래스를 사용하려면 방해가 될 수 있습니까?클라이언트에서 .wav를 실행하는 방법. ASP.NET
public void PlaySound()
{
try
{
while (1 == 1)
{
List<string> distinctMusic = GetMusicFile.Distinct().ToList();
for (int i = 0; i < 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());
}
}
아무도 도와 줄 수 있습니까? Thx!
이 링크를 참조하시기 바랍니다? –
System.Media.SoundPlayer player = new System.Media.SoundPlayer(); – user1792343
클라이언트 측에서 서버 측 재생 사운드를 혼동합니다. http://stackoverflow.com/questions/12342519/how-to-play-sound-by-clicking-button-in-asp-net/12342639#12342639 – Aristos