Solved

Restricting access to page or directory in ASP.NET

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

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

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

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…
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…
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…

805 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