Form based authentication question

M

M2Web

I understand that in the web.config file I can have the following:
<location path="MembersOnly">
<system.web>
<authorization>
<allow users="myaccount" />
<deny users="*" />
</authorization>
</system.web>
</location>
My question is, how is the user name myaccount checked against the
web.config file? Is it done with the
FormsAuthentication.RedirectFromLoginPage Method? For example,
FormsAuthentication.RedirectFromLoginPage("myaccount", false)

Thanks
 
C

Colin Turner

Have done mine through a custom component talking to SQL Server database
table containing usernames and encrypted passwords.

If you're using the config file, I think you use the
FormAuthentication.Authenticate method. The RedirectFromLoginPage method
writes out the forms authentication cookie containing your username and
redirects you to the page you originally wanted to navigate to.

Regards
Colin
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,537
Members
45,021
Latest member
AkilahJaim

Latest Threads

Top