Play *.wav files on a server side.

Posted on 2002-04-01
Last Modified: 2008-02-26
I build a site with many WAV files and i want that these
files will not be downloadable.
How can i prevent user from doing this using ASP ?
I would like that these WAV files will be played
only on the server side.
Question by:dsmarket
LVL 11

Expert Comment

ID: 6909944
i'm not sure what you really want...
playing a wav file serverside doesn't makes a lot of sense...
you would just here the sound in the server room...

if you're searching for a possibility to play a sound on the client side without letting the surfer download the file, then there's no easy possibility to do this 100% secure...

every sound that is played on a computer can be recorded by such a simple tool like the windows sound recorder...

so, what exactly are you trying to do?

LVL 20

Expert Comment

ID: 6909992
You need to understand the http protocol, everything is sent to the client and stored in the internet temp directory only then processed by the browser.. so there is no such thing like playing or running a file on the server side.. the server only processes requests and serves files, so it is impossible to hide a file from the client.. the only way you can do is to popup the wav in a window without menues and with a custom title.. disable in it the right mouse click.. or flush the file using binarywrite:

set objBinaryFile = Server.CreateObject("BinaryFileStream.Object")
Response.BinaryWrite objBinaryFile.GetFileBytes(CStr(strFileName))
set objBinaryFile = nothing

BinaryFileStream object dll can be found here:

but anyways.. this will only hide your files from novice users.. an expert user will delete before all his temporary internet files view your wave file page.. then search in the temporary internet files for a new wav file.. and it will be that file.. your best bet is to copyright your material..

LVL 19

Expert Comment

ID: 6910258
Put a copyright notice on your pages, and use streaming media rather than wav files.

While it's not impossible to capture streaming audio, it's a lot harder since the file isn't stored in the same way. It's also faster -- the sound starts playing almost immediately, so the user doesn't have to wait for it to download.

Playing them on the server side doesn't do anything but amuse whoever might be in the server room at the time ;-)
Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.


Expert Comment

ID: 6910724
I agree with webwoman. I would convert all files to WMA format. Mind that WAV is not really the perfect audio format for Internet. If the server's OS is Win 2000 Server, Windows media services can be installed with no problem (Add/Remove Windows components). Then you will be able to make the files accessible for listening online. You should find all necessary info in the attached documentation. As an example, check I know that you can "preview" some songs through streaming media (WMA/Real). Check it out and see if that is what you want.
PS: I did not intend to promote the mentioned site. Just for demonstration purposes :)

Author Comment

ID: 6912105
Hi webwoman !
"Put a copyright notice on your pages"
How ?


LVL 11

Accepted Solution

ASPGuru earned 150 total points
ID: 6912323
dsmarket, how about something like this:

All material appearing on <sitename> is copyrighted by <your (company) name here> and cannot be reused without permission.

LVL 20

Expert Comment

ID: 6917516
well this is not fair.. I said the same thing and explained why in my post (.. your best bet is to copyright your material..)

Please Explain to me your decision.
LVL 20

Expert Comment

ID: 6917525
Besides I showed the code and examples of what webwomen said also...
LVL 11

Expert Comment

ID: 6918504
i agree... partially...
the comment that was graded neither is an answer to the question nor really provides new information...

anyway... i was the first that stated that it's not possible to have an 100% secure wav solution...

i' also not very happy with the grade B...
The Question was fully answered, so why not give an A?

Silver5, i think you deserve 1/2 of the points, so i will post 150 points for you, so everbody is happy... I will also grade this with an B...

LVL 20

Expert Comment

ID: 6918542
ASPGuru.. a moderator should resolve this issue..
your answer was flu: "..there's no easy possibility to do this 100% secure.."
it's like you said no but that's not a full answer.. you should state why.. but I'll agree with you for a split and an A for both..
LVL 11

Expert Comment

ID: 6918573
ok... contact a moderator...

Expert Comment

ID: 6919176
I've changed the points in this question to reflect a split, as requested by Experts.

Silvers5: points for you at

Grading at EE is like the "10-point Must" system in boxing, rather than like the grades you get in school; you should always give an A unless you have a reason not to (you have to do more research, you don't get a complete answer, things like that). Rather than give a C, you should always explain to the Experts why their responses are insufficient, and give them the opportunity to improve.

CS Moderator

Featured Post

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Dreamweaver server behavior gone 6 135
UTC (timezone) without using an API 16 46
App wrap my classic asp based webpages (running on mysql database)? 3 118
Select2 jquery help 9 88
Hello, all! I just recently started using Microsoft's IIS 7.5 within Windows 7, as I just downloaded and installed the 90 day trial of Windows 7. (Got to love Microsoft for allowing 90 days) The main reason for downloading and testing Windows 7 is t…
I was asked about the differences between classic ASP and ASP.NET, so let me put them down here, for reference: Let's make the introductions... Classic ASP was launched by Microsoft in 1998 and dynamically generate web pages upon user interact…
In this video I am going to show you how to back up and restore Office 365 mailboxes using CodeTwo Backup for Office 365. Learn more about the tool used in this video here: (…
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …

813 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now