Solved

Basic Authentication IIS  .NET web application question

Posted on 2007-11-23
2
175 Views
Last Modified: 2013-11-26
Hi Experts,
   I have a situation where I have a .net asp intranet application that generates PDF reports from Crystal Reports rpt files, stores the PDFs in a directory on the web server.  My problem is that I need the intranet application to access these .PDFs but I don't want to give the users the abilty to navigate to the reports directly by url.  Therefore Anonymous Authentication is not and option and I also do not want to maintain a separate list of users on the web server either (Integrated Security)  Now Im left with basic Authentication which requires the users to supply credentials via a prompt.  

What I would like to do is hard code some credentials in the web app and when making the http request pass the "Basic Authentication" credentials to the web server.  Is this possible?  How?  and/or If you have a better solution please shine some light.  Thanks
0
Comment
Question by:dbedoo
2 Comments
 
LVL 15

Accepted Solution

by:
spprivate earned 500 total points
Comment Utility
You need to make use of HTTP modules and handlers for customer autherization.
http://msdn2.microsoft.com/en-us/library/wce3kxhd(VS.80).aspx
Also there is a KB explaining your scenario.

http://support.microsoft.com/?id=893662

Here is the quotes from this link:

Full content protection is the ability to force a user to be validated when the user requests any content from the Web server. By default, only .aspx pages require you to be validated when using forms authentication. If you have a .pdf file or a .jpg file, the URL can be sent in an e-mail or copied and pasted into a browser, and the content will be served regardless of whether or not you have been validated.
0
 
LVL 1

Author Comment

by:dbedoo
Comment Utility
Thanks, I did find an alternative solution ... the files no longer need to reside in the wwwroot so i plan on streaming the pdfs.  Good articles  thanks!!
0

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Wouldn’t it be nice if you could test whether an element is contained in an array by using a Contains method just like the one available on List objects? Wouldn’t it be good if you could write code like this? (CODE) In .NET 3.5, this is possible…
How to install Selenium IDE and loops for quick automated testing. Get Selenium IDE from http://seleniumhq.org (http://seleniumhq.org) Go to that link and select download selenium in the right hand columnThat will then direct you to their downlo…
The viewer will learn how to use NetBeans IDE 8.0 for Windows to connect to a MySQL database. Open Services Panel: Create a new connection using New Connection Wizard: Create a test database called eetutorial: Create a new test tabel called ee…
The viewer will learn how to use and create keystrokes in Netbeans IDE 8.0 for Windows.

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now