Active InfoActive Info  Display List of Info MembersMemberlist  Search The InfoSearch  HelpHelp
  RegisterRegister  LoginLogin
ASPProtect Full 7.x Support (Info Locked Info Locked)
 CJWSoft Support Info : ASPProtect Full 7.x Support
Subject Info: Protecting files with stream_download A d d  -  P o s tAdd P o s t
Author
Message << Prev Info | Next Info >>
pgplast
New User
New User


Joined: January/10/2007
Location: United States
Online Status: Offline
Info: 30
Added: December/27/2007 at 9:50am | IP Logged Quote pgplast

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 View pgplast's Profile Search for other info by pgplast
 
cwilliams
Admin Group
Admin Group
Avatar
CJWSoft Web Software Developer

Joined: April/06/2004
Online Status: Offline
Info: 1769
Added: December/27/2007 at 10:27am | IP Logged Quote cwilliams

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 View cwilliams's Profile Search for other info by cwilliams Visit cwilliams's Homepage
 
cwilliams
Admin Group
Admin Group
Avatar
CJWSoft Web Software Developer

Joined: April/06/2004
Online Status: Offline
Info: 1769
Added: December/27/2007 at 10:34am | IP Logged Quote cwilliams

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 View cwilliams's Profile Search for other info by cwilliams Visit cwilliams's Homepage
 
pgplast
New User
New User


Joined: January/10/2007
Location: United States
Online Status: Offline
Info: 30
Added: December/27/2007 at 11:20am | IP Logged Quote pgplast

Response.write(FilePath) returns the correct path:

d:\Customers\user1243858\allied_files\MedicalClearanceTestin g.doc

Back to Top View pgplast's Profile Search for other info by pgplast
 
cwilliams
Admin Group
Admin Group
Avatar
CJWSoft Web Software Developer

Joined: April/06/2004
Online Status: Offline
Info: 1769
Added: December/27/2007 at 11:23am | IP Logged Quote cwilliams

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 View cwilliams's Profile Search for other info by cwilliams Visit cwilliams's Homepage
 
pgplast
New User
New User


Joined: January/10/2007
Location: United States
Online Status: Offline
Info: 30
Added: December/27/2007 at 11:44am | IP Logged Quote pgplast

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 View pgplast's Profile Search for other info by pgplast
 
cwilliams
Admin Group
Admin Group
Avatar
CJWSoft Web Software Developer

Joined: April/06/2004
Online Status: Offline
Info: 1769
Added: December/27/2007 at 11:54am | IP Logged Quote cwilliams

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 View cwilliams's Profile Search for other info by cwilliams Visit cwilliams's Homepage
 

Sorry, you can NOT post info.
This info has been locked by a info administrator.

  A d d  -  P o s tAdd P o s t
Printable version Printable version

Info Jump
You cannot add new info in this area
You cannot add to info in this area
You cannot delete your info in this area
You cannot edit your info in this area
You cannot create polls in this area
You cannot vote in polls in this area


Active Server Pages asp search engine active server page asp application components tutorial CJWSoft ASPProtect ASPBanner ASPClassifieds www.aspprotect.com, www.powerasp.com,www.aspclassifieds.com,www.aspphotogallery.com,www.codewanker.com