Solved

Restricting access to page or directory in ASP.NET

Posted on 2011-09-08
2
203 Views
Last Modified: 2012-05-12
Is there a simple way to restrict access to a page or directory. I tried using the code below in web.config but I can't specify a password and I'm not sure where it's looking for credentials. IIS?
TIA
<location path="secure">
    <system.web>
      <authorization>
        <deny users="?" />
        <allow users="myuser" />
      </authorization>
    </system.web>
  </location>

Open in new window

0
Comment
Question by:Mike Miller
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 20

Accepted Solution

by:
Daniel Van Der Werken earned 500 total points
ID: 36505478
You have to use Forms Authentication.
http://support.microsoft.com/kb/301240
0
 
LVL 14

Expert Comment

by:binaryevo
ID: 36505855
Impersonation / locking down on the server could be an option depending on your context.
0

Featured Post

Instantly Create Instructional Tutorials

Contextual Guidance at the moment of need helps your employees adopt to new software or processes instantly. Boost knowledge retention and employee engagement step-by-step with one easy solution.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
asp.net figure out error 3 47
Starting to use Git with Visual  Studio Online 1 71
SQL Server Serialization error 8 47
How do i create a simple array in a public class? 6 37
Problem Hi all,    While many today have fast Internet connection, there are many still who do not, or are connecting through devices with a slower connect, so light web pages and fast load times are still popular.    If your ASP.NET page …
Prologue It is often required to host multiple websites on a single instance of IIS, mostly in development environments instead of on production servers. I am sure it is not much a preferred solution on production servers but this is at least a pos…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

751 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