Taís, If your site provides the playback of songs (audio) and you want to block the download of them (by source code, for example), you will need a script (in your case, aspx I imagine) intercepting the request of ". mp3" to check the reference (or any other validations) releasing or not the continuation of the binary "dump" of the media file.
Ex.: seu-site-de-musica.com/player.aspx?musica=10
Where 10
is the music ID in the bank and player.aspx
checks the request reference (e.g.: if it is not from the host your-website-music.com, then block the access).
Or else, to make the web.config
block access to. mp3 files (or other extensions):
web config.:
<system.web>
<httpHandlers>
<add verb="*" path="*.mp3" type="System.Web.HttpForbiddenHandler" />
</httpHandlers>
</system.web>
More information:
http://www.iis.net/configreference/system.webserver/security/requestfiltering
Can you describe your application? How it works, where are the music files, how this direct access can be done.
– Leonel Sanches da Silva
It is understood that downloading is more than opening the download manager, the download is even playing a file online in a player using the tag
<audio>
, you want when the person click on the music he open the player directly? Or you want to protect the access of the music against copies?– Guilherme Nascimento
Hi guys, I wanted to block access against copies... I have the Jplayer player in an html that calls the songs that way
<audio id="jp_audio_0" preload="metadata" src="player/musicas/minha_musica.mp3" title=""></audio>
, i tried to use the security setting of web.config only that then neither the player plays the songs anymore.– Tais
First of all, thank you so much for helping me. I ended up finding this answer: (http://answall.com/questions/25820/comor- evitar-que-um-users-storageos-archives-mp3-evitando-assim-que-os-po) and the conclusion is that it is impossible to prevent the download of the songs, what I can do is give a difficult... Thanks.
– Tais