Forms Authentication with SQL Server
- From: "thebison" <alex.sinclair3@xxxxxxxxxxxxxx>
- Date: 5 Feb 2006 08:12:47 -0800
Hi everyone,
Quick question, I'm creating a Time*** Application with ASP.NET C# in
Visual Studio 2003. The database has been built using MSDE. I have
followed the MSDN libraries guide to creating forms based
authentication from
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnnetsec/html/SecNetht03.asp
This works fine, however all the code does is return a message to a
label on screen saying that the user has been authenticated. What I
need is for the application to forward the user on to the default.aspx
form, and allow them to access all subsequent forms from there. I
suspect I need to insert some code in the passwordVerifed part.
if (passwordVerified == true )
{
// The user is authenticated
// At this point, an authentication ticket is normally created
// This can subsequently be used to generate a GenericPrincipal
// object for .NET authorization purposes
// For details, see "How To: Use Forms authentication with
// GenericPrincipal objects
lblMessage.Text = "Logon successful: User is authenticated";
I think it may be something along the lines of
FormsAuthentication.redirect but as I'm a newbie I'm probably wrong!..
As well as this, once I have redirected the verified user to the
correct page, do I then need some additional code at the top of each
form to check the user is verified?
Any help will be much appreciated!
Thanks in advance..
Al
.
- Follow-Ups:
- Re: Forms Authentication with SQL Server
- From: W.G. Ryan eMVP
- Re: Forms Authentication with SQL Server
- Prev by Date: Re: ADO.NET help - Filling a DataGrid with contents of a DataSet
- Next by Date: Re: Forms Authentication with SQL Server
- Previous by thread: RE: Passing Parameter to a form
- Next by thread: Re: Forms Authentication with SQL Server
- Index(es):