| Author |
|
pgplast New User

Joined: January/10/2007 Location: United States
Online Status: Offline Info: 30
|
| Added: December/27/2007 at 9:50am | IP Logged
|
|
|
I created a directory outside my web for holding files for protected download. I set up a page at the web root with a link to a file in that directory such as:
<a href="stream_download.asp?filename=MedicalClearanceTesting.d oc">Medical Clearance Testing</a>
I have placed the stream_download file at the root of my web as well and placed the physical path to the download directory into your code. I have checked for typos and path errors multiple times, but find none.
When I click the link I always get "Error: No such file exists."
I see in the conditional statement in your code that
"If objFSO.FileExists(FilePath)" must be evaluating false. Is it possible that the web host has server settings that are preventing this from evaluating true?
Thanks.
|
| Back to Top |
|
| |
cwilliams Admin Group

CJWSoft Web Software Developer
Joined: April/06/2004
Online Status: Offline Info: 1769
|
| Added: December/27/2007 at 10:27am | IP Logged
|
|
|
I really dont know If you want me look PM the site details.. I can monkey around with it for a little bit and see if anything is wrong.
__________________
Best Regards,
Christopher Williams
www.CJWSoft.com
|
| Back to Top |
|
| |
cwilliams Admin Group

CJWSoft Web Software Developer
Joined: April/06/2004
Online Status: Offline Info: 1769
|
| Added: December/27/2007 at 10:34am | IP Logged
|
|
|
Disabling the streaming code and response.writing out the path on "stream_download.asp" woud probably help too to see if what it is coming up with looks valid and correct.. my guess is your final path to the file just has to be wrong ?
__________________
Best Regards,
Christopher Williams
www.CJWSoft.com
|
| Back to Top |
|
| |
pgplast New User

Joined: January/10/2007 Location: United States
Online Status: Offline Info: 30
|
| Added: December/27/2007 at 11:20am | IP Logged
|
|
|
Response.write(FilePath) returns the correct path:
d:\Customers\user1243858\allied_files\MedicalClearanceTestin g.doc
|
| Back to Top |
|
| |
cwilliams Admin Group

CJWSoft Web Software Developer
Joined: April/06/2004
Online Status: Offline Info: 1769
|
| Added: December/27/2007 at 11:23am | IP Logged
|
|
|
well try taking out the
If objFSO.FileExists(FilePath)
and the end if that goes with it
Maybe your host has the filesystem object disabled ? Did you try this in a directory in your web?
__________________
Best Regards,
Christopher Williams
www.CJWSoft.com
|
| Back to Top |
|
| |
pgplast New User

Joined: January/10/2007 Location: United States
Online Status: Offline Info: 30
|
| Added: December/27/2007 at 11:44am | IP Logged
|
|
|
That's it, Chris.
It does work if a directory inside the web is used. I'll need to have them disable browsing for that and stay inside.
Thanks for your help.
|
| Back to Top |
|
| |
cwilliams Admin Group

CJWSoft Web Software Developer
Joined: April/06/2004
Online Status: Offline Info: 1769
|
| Added: December/27/2007 at 11:54am | IP Logged
|
|
|
ok, If your web has frontpage or expression web access connecting via frontpage explorer or expression web and right clicking on a folder / propertiesallows you to do that on your own..
__________________
Best Regards,
Christopher Williams
www.CJWSoft.com
|
| Back to Top |
|
| |