C# SoundPlayer Web 上传到服务器后不能播放Wav文件
在单机可以!代码: private SoundPlayer Player = new SoundPlayer();
private void playmusic(string soundpath)
{
try
{
Player.SoundLocation = soundpath;
Player.Load();
Player.Play();
}
catch (Exception ex)
{
SystemTools.displayTips(ex.Message + " " + soundpath, 0, lblInfoMsg);
}
}
在单机可以!代码: private SoundPlayer Player = new SoundPlayer();
private void playmusic(string soundpath)
{
try
{
Player.SoundLocation = soundpath;
Player.Load();
Player.Play();
}
catch (Exception ex)
{
SystemTools.displayTips(ex.Message + " " + soundpath, 0, lblInfoMsg);
}
}
这个路径都有权限,也是正确的!
sp.SoundLocation = "http://localhost/Audio.wav";
sp.Load();
sp.Play();
调试时有声音
真正运行时没有
操作系统 win7 asp.net4.0 iis7 什么目录权限都设过也不行 在网上也找不到答案.