I am trying following(as far as i remember, it was working correctly some time back) but now its returning The "AuthCookie" which is the name of cookie being set in Web.config . <BR><BR><BR>MessageCommand.Parameters["@Author"].Value = User.Identity.Name.ToString() ;<BR><BR><BR><BR><BR>Has this something to do with this ( This is the newly added code): <BR><BR><BR>protected void Application_AuthenticateRequest(Object sender, EventArgs e)<BR><BR>{<BR><BR> // Extract the forms authentication cookie<BR><BR> string cookieName = FormsAuthentication.FormsCookieName;<BR><BR> HttpCookie authCookie = Context.Request.Cookies[cookieName];<BR><BR><BR><BR> if(null == authCookie)<BR><BR> {<BR><BR> // There is no authentication cookie.<BR><BR> return;<BR><BR> }<BR><BR> FormsAuthenticationTicket authTicket = null;<BR><BR> try<BR><BR> {<BR><BR> authTicket = FormsAuthentication.Decrypt(authCookie.Value);<BR> <BR> }<BR><BR> catch(Exception exp)<BR><BR> {<BR><BR> return;<BR><BR> }<BR><BR><BR><BR> if (null == authTicket)<BR><BR> {<BR><BR> // Cookie failed to decrypt.<BR><BR> return; <BR><BR> }<BR><BR><BR><BR><BR><BR> string[] roles = authTicket.UserData.Split(new char[]{&#039;&#124&#039;});<BR><BR><BR><BR> <BR><BR> // Create an Identity object<BR><BR> FormsIdentity id = new FormsIdentity( authTicket ); <BR><BR><BR><BR> // This principal will flow throughout the request.<BR><BR> GenericPrincipal principal = new GenericPrincipal(id, roles);<BR><BR> // Attach the new principal object to the current HttpContext object<BR><BR> Context.User = principal;<BR><BR>}<BR><BR>