I don't want to use the websecurity helper, I just want to manage Forms Authentication the way I used to with Web Forms.
In Web Forms I would assign the FA ticket on successful login, and under Global.asax > Application_AuthenticateRequest I would decrypt the ticket and fill the the user indentity.
Can we still do this ourselves in Razor?
I think I can assign the cookie but not sure where to create decrypt the ticket into the user identity object.
Exactly the same ASP.NET framework sits behind Web Pages as the one you are used to using in Web Forms. You can use your existing method to manage authentication.
Got, but the million dollar question then becomes where do I capture the Application_AuthenticateRequest event since the global.asax file doesn't exist?
thomp361
Member
301 Points
77 Posts
Don't want to use WebSecurity
May 17, 2012 02:04 AM|LINK
I don't want to use the websecurity helper, I just want to manage Forms Authentication the way I used to with Web Forms.
In Web Forms I would assign the FA ticket on successful login, and under Global.asax > Application_AuthenticateRequest I would decrypt the ticket and fill the the user indentity.
Can we still do this ourselves in Razor?
I think I can assign the cookie but not sure where to create decrypt the ticket into the user identity object.
Mikesdotnett...
All-Star
154818 Points
19853 Posts
Moderator
MVP
Re: Don't want to use WebSecurity
May 17, 2012 04:42 AM|LINK
Exactly the same ASP.NET framework sits behind Web Pages as the one you are used to using in Web Forms. You can use your existing method to manage authentication.
Beginning ASP.NET Web Pages with WebMatrix | My Site | Twitter
thomp361
Member
301 Points
77 Posts
Re: Don't want to use WebSecurity
May 17, 2012 12:03 PM|LINK
Got, but the million dollar question then becomes where do I capture the Application_AuthenticateRequest event since the global.asax file doesn't exist?
Mikesdotnett...
All-Star
154818 Points
19853 Posts
Moderator
MVP
Re: Don't want to use WebSecurity
May 17, 2012 05:32 PM|LINK
Beginning ASP.NET Web Pages with WebMatrix | My Site | Twitter
thomp361
Member
301 Points
77 Posts
Re: Don't want to use WebSecurity
May 17, 2012 08:24 PM|LINK
Ah ha! Didn't know you could that, thanks Mike!