Solved

Restricting access to page or directory in ASP.NET

Posted on 2011-09-08
2
200 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:mwmiller78
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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Just a quick little trick I learned recently.  Now that I'm using jQuery with abandon in my asp.net applications, I have grown tired of the following syntax:      (CODE) I suppose it just offends my sense of decency to put inline VBScript on a…
Running classic asp applications under Windows Server 2008 R2 (x64) and IIS 7 is not as easy as one may think. It took me a while to figure it out while getting error 8002801d a few times. After you install the OS you will need to install the fol…
This tutorial demonstrates a quick way of adding group price to multiple Magento products.
I designed this idea while studying technology in the classroom.  This is a semester long project.  Students are asked to take photographs on a specific topic which they find meaningful, it can be a place or situation such as travel or homelessness.…

919 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

14 Experts available now in Live!

Get 1:1 Help Now