Click here to Skip to main content
15,744,304 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:

I have a dll which plays audio files. I have developed a website in ASP.Net which has mp3 files stored in a sql database in binary format. I know how to retrieve mp3 files from the database and provide a link for the user to download them.

My problem is, my dll which is implemented through vbscript on the aspx page can play only the mp3 files stored on the client's computer. I cannot find a way to download the file into temp folder and then hook the url to the dll to play the file without the "file download" dialog. My application is supposed to be playing the file right after clicking on the repective link.

Also, please note that my webpage is loaded through a WebBrowser control in a vb6 application (I thought this might be helpful in manipulating the dialogs). My webasite is also developed in ASP.Net environment with VB.Net language.

I would really appreciate it if anyone could help me out.
Kenneth Haugland 15-Jul-12 9:10am    
THere is a thing called Isolated storag, I havent used it my self so it would only be a suggestion...
WoodenLegNamedSmith 17-Jul-12 14:26pm    
If you actually have you're customers permission to run VBScript as a client-side service then you could looking into the FileSystemObject using the ActiveX invocation CreateObject("Scripting.FileSystemObject")

EDIT: You might actually benefit better from trying to accomplish this through Flash, would be much simpler.
rezann 18-Jul-12 2:43am    
Thanks for the reply. But I'd rather not use flash since I live in Iran and we are sactioned by Adobe Company. So, I don't really want to use a product whose owner does not want me to implement.

Actually I have figured out something, but haven't had the opportunity to test it yet. I could send the binary data as string in a hidden field to the client's browser which is hosted in a vb6 webbrowser control. Then, I can read the string and convert it back to binary and somehow store it as an MP3 file on the client's machine using vb6 windows application. Of course, this is only at theoretical stage and any help in this regard is highly appreciated.
WoodenLegNamedSmith 18-Jul-12 9:29am    
The only thing I could really recommend and it would be by way of ActiveX would be to write a DLL that both downloads the file and also plays it.
I say that only because if you use a regular HTML link then you have lost control of where a user will store the file and therefore no simple way to read that file back to the MP3 player through code. If you wrote a "Sound Browser" type of app that could be invoked ActiveX I'd say you'd be well on your way to a satisfied customer.
Prasad J 25-Jul-12 8:00am    
Can your dll play the mp3 if you specify the URL (save the mp3 file in server/localhost and specify its URL)?

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

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