Forms Security Authentication.

D

Daren Hawes

Hi I have done all the plumbing for a Forms Authentication system.

My user logs in, I chek password with ADO.NET to a database with 2
fields.

IE
enteredUsername = dbUsername
enteredPassword = dbPassword

so I get say

bolAutheticated = true

How do I manually authenticate this user for example

If bolAutheticated Then
FormsAuthentication.???????
Else
lblStatus.text = "Login Failed"
End IF

I have seen demos with Salt and Password etc, but I have an established
DB with no Encryption, we do not need it. I simply need DOT net to
authentiucate this user so they can access the resatricted directory I
have setup in Web.Config?

Please help!
 
R

Raterus

This is kind of confusing when you first see it, because you don't really see methods in Forms Authentication like "FormsAuthentication.ThisIsAValidLogin()". How FA works, you need to set a cookie that will validate the user, there are three ways do do this: Look at the methods RedirectFromLoginPage and SetAuthCookie, either of those two methods will set this cookie and authenticate the user. Also you can do this whole process manually as well, but you probably don't need go that far with it yet.

--Michael
 

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
474,141
Messages
2,570,813
Members
47,357
Latest member
sitele8746

Latest Threads

Top