How do I provide security to my ASPx page?

How do I provide security to the aspx page I am developing (without using login page, registration page, database....)?

You can use the the , and

 <authentication mode="Windows" />
 <deny users="?" />
 <allow users="*" />

Here we allow all non-anonymous users to use the site. Then you can add any number of <location> elements to specify more granular behavior:

<location path="SecurePages/Secure.aspx">
             <deny users="*" />
   <allow users="MYDOMAINJohn" />

Here we restricted the Secure.aspx page to John, user of the Windows domain MYDOMAIN. IIS should be configured accordingly to allow either Windows integrated (most secure but users must belong to the domain) or basic/digest authentication modes. Definitely, anomymous should NOT be the only option, because nobody will ever be prompted for credentials.

This was first published in September 2003

Dig deeper on Win Development Resources

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.



Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to: