当我把我的网站放在Iis音频文件不在Asp.Net播放 [英] When I Put My Website In Iis Audio File Is Not Playing In Asp.Net

查看:120
本文介绍了当我把我的网站放在Iis音频文件不在Asp.Net播放的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在asp.net c#中开发了一个网页。



当我在客户端运行时工作正常。



但是当我把我的网站放在IIS中时,音频没有出来,但音频正在播放。



你可以给任何一些内容吗? >


File =Excercise.wav;

SoundPlayer mplayer = new SoundPlayer();

mplayer.SoundLocation = File ;

mplayer.Play();

I developed a web page in asp.net c#.

It is working fine when i run in client side.

But when i put my website in IIS, Audio not coming out, but audio is playing.

Can u give any sugessions

File="Excercise.wav";
SoundPlayer mplayer = new SoundPlayer();
mplayer.SoundLocation = File;
mplayer.Play();

推荐答案

将此代码放入网络中。



Put This code in web con fig.

<configuration>
<system.webServer>
<staticContent>
<mimeMap fileExtension=".wav" mimeType="audio/wav" />
</staticContent>
</system.webServer>
</configuration>





请参考thiz链接以供将来参考:点击这里


这篇关于当我把我的网站放在Iis音频文件不在Asp.Net播放的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆