Solved

Restricting access to page or directory in ASP.NET

Posted on 2011-09-08
2
199 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 19

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

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

Suggested Solutions

Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
When it comes to showing a 404 error page to your visitors, you do not want that generic page to show, and you especially do not want your hosting provider’s ad error page to show either. In this article, I will show you how to enable the custom 40…
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…

757 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

21 Experts available now in Live!

Get 1:1 Help Now