Basic Authentication IIS  .NET web application question

Posted on 2007-11-23
Medium Priority
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
Question by:dbedoo
LVL 15

Accepted Solution

spprivate earned 2000 total points
ID: 20341093
You need to make use of HTTP modules and handlers for customer autherization.
Also there is a KB explaining your scenario.


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.

Author Comment

ID: 20341538
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!!

Featured Post

Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Hello there! As a developer I have modified and refactored the unit tests which was written by fellow developers in the past. On the course, I have gone through various misconceptions and technical challenges when it comes to implementation. I would…
This installment of Make It Better gives Media Temple customers the latest news, plugins, and tutorials to make their Grid shared hosting experience that much smoother.
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
The viewer will learn how to synchronize PHP projects with a remote server in NetBeans IDE 8.0 for Windows.

597 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