Wrox Programmer Forums
|
BOOK: Professional ASP.NET 3.5 SP1 Edition: In C# and VB
This is the forum to discuss the Wrox book Professional ASP.NET 3.5 SP1 Edition: In C# and VB by Bill Evjen, Scott Hanselman, and Devin Rader; ISBN: 9780470478264
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Professional ASP.NET 3.5 SP1 Edition: In C# and VB section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old August 19th, 2009, 02:40 AM
Registered User
 
Join Date: Aug 2009
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Authenticating Specific Files and Folders

In the chapter on Authenticating Specific Files and Folders, the example given protects web pages. How would I change the code to protect everthing in a membersonly folder?

I have a number of webpages and pdf files that the visitor must login to see.

Thanks Ahead of time for your help...

Take Care,
Rich

Last edited by homepagestore; August 19th, 2009 at 02:43 AM..
 
Old December 13th, 2009, 01:30 AM
Friend of Wrox
 
Join Date: Nov 2009
Posts: 156
Thanks: 13
Thanked 16 Times in 16 Posts
Default

you could not give the path of your file to others. for example if your fileis located in /pdf/mypdf.pdf you can create a aspx web page to download the book, for example /download.aspx?bookId=12, now you should read from /pdf/mypdf.pdf using a SreamReader object and send to user by a StreamWriter object. you can find samples in codeproject site
 
Old December 13th, 2009, 01:50 AM
Registered User
 
Join Date: Aug 2009
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks, I will try that.

Wishing You and Your love ones a very Safe and Merry Christmas,
Rich





Similar Threads
Thread Thread Starter Forum Replies Last Post
connect to files from different folders lcyean ASP.NET 2.0 Basics 1 May 11th, 2007 07:23 AM
Copy Files and Folders on Local Network rupakroy5 VB.NET 2002/2003 Basics 1 May 22nd, 2006 10:09 AM
hide files/folders under window 98? Help me....!!! datphat Visual C++ 4 November 23rd, 2005 09:47 AM
Check For Existing Folders & Files zandermax Access VBA 2 September 30th, 2005 11:43 AM
Including files across folders dsunmedia Beginning PHP 3 July 26th, 2004 04:17 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.