Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / General / October 2005

Tip: Looking for answers? Try searching our database.

Authorization

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Andrew Robinson - 24 Oct 2005 22:06 GMT
I have a single web page and associated PDF that I need to protect within a
larger web site. What is the easiest way to do that. Go gain access, users
will go to a page and enter a password. This is for a promotion that we are
doing and I don't need to assign or track usernames. Everyone uses the same
password that is supplied via a usps mailing.

I can place the page and PDF in a sub directory if that helps.

-Andrew
Steven Cheng[MSFT] - 25 Oct 2005 04:02 GMT
Hi Andrew,

Welcome to ASPNET newsgroup.
From your description, you have a certain pdf file which need to be exposed
to client users through asp.net web page. And you also need to protect the
pdf file from being accessed by unauthenticated users, yes?

If so, I think we can just put the user login UI on the web page so let the
user input username password and in the submit button's postback event, do
the user validation. If the user is a valid user, we just retrieve the PDF
file's binary stream and write it out to the page's response stream.

We can store the PDF file on physical dir as a pdf file or in database.
Anyway, it's better not to put the file in web application's virtual dir so
as to prevent it be browsed by unexpected users. Here is a kb article
mentioned streaming out binary file (on disk) to asp.net page's resposne.

#How To Write Binary Files to the Browser Using ASP.NET and Visual C# .NET
http://support.microsoft.com/?id=306654

Hope helps. Thanks,

Steven Cheng
Microsoft Online Support

Signature

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)


--------------------
| From: "Andrew Robinson" <nemoby@nospam.nospam>
| Subject: Authorization
[quoted text clipped - 10 lines]
| Path: TK2MSFTNGXA01.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP09.phx.gbl
| Xref: TK2MSFTNGXA01.phx.gbl
microsoft.public.dotnet.framework.aspnet:133569
| X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
|
[quoted text clipped - 7 lines]
|
| -Andrew
Steven Cheng[MSFT] - 27 Oct 2005 10:06 GMT
Hi Andrew,

How are you doing on this issue, does the suggestions in my last reply
helps a little? If there're anything else we can help, please feel free to
post here. Thanks,

Steven Cheng
Microsoft Online Support

Signature

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)


--------------------
| X-Tomcat-ID: 55613072
| References: <e0EqQ7N2FHA.3876@TK2MSFTNGP09.phx.gbl>
[quoted text clipped - 11 lines]
| Path: TK2MSFTNGXA01.phx.gbl
| Xref: TK2MSFTNGXA01.phx.gbl
microsoft.public.dotnet.framework.aspnet:133627
| NNTP-Posting-Host: TOMCATIMPORT1 10.201.218.122
|
[quoted text clipped - 58 lines]
| |
| | -Andrew

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.