|
code
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
ASP.NET absolute path to fileHi,
I want to play a MIDI file in browser, but I must give a full path to WMP control... In that case everyone can simple type full path in browser and save my midi file... I do not like it... I wont thet they can listen miti, but that is not possible save it... How I can do taht in ASP.NET / VB.NET... Thanks! Jovo Mirkovic *** Sent via Developersdex http://www.developersdex.com *** You can have a special page that acts as a gateway to the file.
Put the midi file in a secured folder, then from within your special page (after you've determined the user is authorized) use Response.Writefile to send the midi file to the browser. Code something along these lines should work: Response.Clear() Response.ContentType = Whatever Response.Writefile("c:\song.midi") Response.AddHeader("Content-Disposition", _ "inline;filename=song.midi") Response.End() Here's more info on Response.WriteFile http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfsystemwebhttpresponseclasswritefiletopic.asp Show quoteHide quote "Jovo Mirkovic" <nospam@sezampro.yu> wrote in message news:%23s2GIqhYFHA.3188@TK2MSFTNGP09.phx.gbl... > > Hi, > > I want to play a MIDI file in browser, but I must give a full path to > WMP control... In that case everyone can simple type full path in > browser and save my midi file... I do not like it... I wont thet they > can listen miti, but that is not possible save it... > > How I can do taht in ASP.NET / VB.NET... > > Thanks! > > Jovo Mirkovic > > *** Sent via Developersdex http://www.developersdex.com *** "Jovo Mirkovic" <nospam@sezampro.yu> wrote in message Not sure you know this...:news:OKXGpGiYFHA.3152@TK2MSFTNGP14.phx.gbl... > > Thanks Steve! > > *** Sent via Developersdex http://www.developersdex.com *** Fictional Situation : 1.) I am a hacker. 2.) You place the file on the server and have a page write the file to the client: 3.) I write a program that requests this page and saves it to a file. Purpose Defeated. Anywho, the answer is, if someone can listen to it remotely on their machine, then it can always be saved to disk. I don't like that as much as anyone else, but it is the truth...for now... Mythran This is why I specified that he allow the file to be downloaded only after
he's authenticated the user. Show quoteHide quote "Mythran" <kip_potter@hotmail.comREMOVETRAIL> wrote in message news:eYrObGxYFHA.3300@TK2MSFTNGP14.phx.gbl... > > "Jovo Mirkovic" <nospam@sezampro.yu> wrote in message > news:OKXGpGiYFHA.3152@TK2MSFTNGP14.phx.gbl... >> >> Thanks Steve! >> >> *** Sent via Developersdex http://www.developersdex.com *** > > Not sure you know this...: > > Fictional Situation : > > 1.) I am a hacker. > 2.) You place the file on the server and have a page write the file to the > client: > 3.) I write a program that requests this page and saves it to a file. > > Purpose Defeated. > > Anywho, the answer is, if someone can listen to it remotely on their > machine, then it can always be saved to disk. I don't like that as much > as anyone else, but it is the truth...for now... > > Mythran > "Steve C. Orr [MVP, MCSD]" <St***@Orr.net> wrote in message Yes, you are right :)news:e5$I6VBZFHA.2400@TK2MSFTNGP10.phx.gbl... > This is why I specified that he allow the file to be downloaded only after > he's authenticated the user. > > -- > I hope this helps, > Steve C. Orr, MCSD, MVP > http://SteveOrr.net > Mythran
DATASET DATAGRID ITEMINDEX DATASETINDEX
How can I get selected Checklistbox Items to Literal in Placeholde FindControl by type? ASP.NET Tree View Control howto: bubble-up events Problems with HTMLInputFile Control Type.GetType("System.Web.UI....) Web server controls not shown on a web form Datagrid Listbox please help Problem using Response.Redirect from a User Control |
|||||||||||||||||||||||