Authentication proces
Global.
asax
beschermde nietige Application_AuthenticateRequest (Object afzender EventArgs e)
{
als (HttpContext .Current.User! = null)
{
als (HttpContext.Current.User.Identity.IsAuthenticated)
{
als (HttpContext. Current.User.Identity is FormsIdentity)
{
FormsIdentity id = (FormsIdentity) HttpContext.Current.User.Identity;
FormsAuthenticationTicket ticket = id.Ticket;
//Haal de opgeslagen gebruiker-gegevens, in dit geval, onze rollen
string userData = ticket.UserData;
string [] rollen = userData.Split (',' );
HttpContext.Current.
User = new System.Security.Principal.GenericPrincipal (id, rollen);
}
}
}
}
Web.config (Admin map) (het veiligstellen van de toegang)
.web>
= "admin">
= "gebruiker">
= "?">
Web.config (Root-bestand)
= "user>
=" user>
.web>
= "*">
= "user>
.web>
=" * ">
= "user>
.web>
=" * ">
=" user>
.web>
= "*">
= "admin>
.web>
=" * ">
=" adminimages ">
.web>
= "*">
= "beelden">
.web>
= "*" >
= "app_themes">
.web>
= "*">
Login.
ascx
Ticketprijzen creatie, cookies toe te voegen etc.
Mail logica, SMS logica
coderen, decoderen code
= "admin>
=" user>
= "user>
=" user>