Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 218
  • Last Modified:

Restricting access to page or directory in ASP.NET

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
Mike Miller
Asked:
Mike Miller
1 Solution
 
Daniel Van Der WerkenIndependent ConsultantCommented:
You have to use Forms Authentication.
http://support.microsoft.com/kb/301240
0
 
binaryevoCommented:
Impersonation / locking down on the server could be an option depending on your context.
0
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

Featured Post

Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

Tackle projects and never again get stuck behind a technical roadblock.
Join Now