Membership.ValidateUser() from Login.OnAuthenticate()?

A

asnowfall

I am using 'System.Web.Security.Membership' &
'System.Web.UI.WebControls.Login' control to implement Forms based
authentication.

Can I call Membership.ValidateUser() from Login.OnAuthenticate()? I
want to do this because I want to control cookie creation.

I have not been able to find a sample code where
Membership.ValidateUser() is called and
'System.Web.UI.WebControls.Login' control is also being used at the
same time; and I see Membership.ValidateUser() being used along with
custom log-in form.

Please let me know whether it is legal to call
Membership.ValidateUser() from Login.OnAuthenticate().

Thanks
Ramesh
 
D

Dominick Baier

Yep. You can do that. It is simply doing a database call to verify the supplied
credentials.
 
A

asnowfall

I am using custom membership provider and I think your answer applies
holds even for that.

Thanks
Ramesh
 

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,764
Messages
2,569,564
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top