I am developing MVC web application using forms authentication.
In my global.asax.cs page I have Application_AuthenticateRequest to store the identity. This gets executed before creation of the auth ticket and causing the layout page to load half without authentication and half with authentication.
How can I execute Application_AuthenticateRequest once i am done with the login processing ?
You should not try to server the rest of request on the logon page.
After processing login and password, the page should redirect, so the new request processes completely authenticated.
The logon page itself should not require authentication at all, so the callback would not fire when processing that page.