Click here to Skip to main content
15,892,298 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
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();
Posted
Comments
Emad Al Hawary 8-Jan-15 3:46am    
check this:

http://www.codeproject.com/Questions/369186/How-to-Play-audio-Video-Files-in-Asp-net
Member 9409254 8-Jan-15 3:51am    
Thanks for quick responce.
My code is working fine in local.
But not working in IIS.

what may be the reason?
Emad Al Hawary 8-Jan-15 3:48am    
http://aspsnippets.com/Articles/Save-MP3-Audio-Files-to-database-and-display-in-ASPNet-GridView-with-Play-and-Download-option.aspx
Emad Al Hawary 8-Jan-15 3:50am    
check MIME :

http://technet.microsoft.com/en-us/library/bb742440.aspx
Emad Al Hawary 8-Jan-15 3:50am    
http://blogs.iis.net/bills/archive/2008/03/25/how-to-add-mime-types-with-iis7-web-config.aspx

1 solution

Put This code in web con fig.

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


Refer thiz link for future reference: click here
 
Share this answer
 
Comments
Member 9409254 8-Jan-15 4:13am    
When i add the above tag in <system.webserver>
Its giving error
Member 9409254 8-Jan-15 4:14am    
Error : Unable to start debugging on web server
Member 9409254 8-Jan-15 4:36am    
.wav already added in IIS, but its not playing in IIS. Any reason?
any solution?
[no name] 8-Jan-15 4:56am    
<remove fileextension=".wav"> put this line above mimeMap line
http://msdn.microsoft.com/en-us/library/dwesw3ee.aspx

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month


CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900