play mp3 saved in a folder outside root directory
-
I hope someone can help me out with this one. I am working on a web application that plays mp3s. The mp3 player I'm using is PseudoMP3, the free .net mp3 player server control by A Boisen. My problem is that i'm trying to secure the mp3 files by saving them in a folder outside of my root, but I can't access the files from my application. My site is hosted by an ISP. My syntax for getting the files is: PseudoMP3Pick.Src = @"d:\websites\sampleDomain\mp3s\Superman.mp3"; The root directory is "d:\websites\sampleDomain\http\" This is how I choose the mp3 file to be played. When the page loads, the player says "Buffering..." and never stops. When I play mp3 files within the root, the player would say "Buffering..." for a few seconds and then starts playing the song. I'm using C#. Thanks for the help!
-
I hope someone can help me out with this one. I am working on a web application that plays mp3s. The mp3 player I'm using is PseudoMP3, the free .net mp3 player server control by A Boisen. My problem is that i'm trying to secure the mp3 files by saving them in a folder outside of my root, but I can't access the files from my application. My site is hosted by an ISP. My syntax for getting the files is: PseudoMP3Pick.Src = @"d:\websites\sampleDomain\mp3s\Superman.mp3"; The root directory is "d:\websites\sampleDomain\http\" This is how I choose the mp3 file to be played. When the page loads, the player says "Buffering..." and never stops. When I play mp3 files within the root, the player would say "Buffering..." for a few seconds and then starts playing the song. I'm using C#. Thanks for the help!
You cant do that, when you save your files (Anyone) outside the root site, you must to use at absolute path to get it, In development time you know the exactly drive where you arre saving the files (thats the reason why you application works locally), but your ISP have a diferent System Files (even the D: label doesnt exist or could be the CD Drive), So you must to save your files inside the root, and using relative path to play them)try to secure your application hiding the user address bar. :)
keep Learning and you never will be out of date...
-
You cant do that, when you save your files (Anyone) outside the root site, you must to use at absolute path to get it, In development time you know the exactly drive where you arre saving the files (thats the reason why you application works locally), but your ISP have a diferent System Files (even the D: label doesnt exist or could be the CD Drive), So you must to save your files inside the root, and using relative path to play them)try to secure your application hiding the user address bar. :)
keep Learning and you never will be out of date...
Thanks for your reply, Britney. That path is actually the ISP's file system. So I know that the directory d:\websites\sampleDomain\mp3s\ exists on the server. I tested it by having my application read a .txt file saved in that same folder. And it works. I just can't seem to access the mp3 file. I don't know if I have to convert it to another data type in order to read it. Thanks for the help!