I am using Membership Data Base Intergration and .Net Forms Authentication
I have a link to Chat_OpenMessenger() that only displays when my users are logged in to the website. However, if a user does not use the website for 30 minutes they are logged out off the system, but the link to Chat_OpenMessenger() is still visible (assuimg hte user doesn' close the web page).
I tried to edit the overridden function so they are taken to a message page, but this does not work:
public
override AppChatIdentity GetLogonIdentity()
{
if (HttpContext.Current.User.Identity.IsAuthenticated)
{
CurrentUser cu = new CurrentUser();
cu.GetUserDetails();
string sLogin = cu.GUID.ToString();
return new AppChatIdentity(ToUserId(sLogin), false, ToUserId(sLogin), HttpContext.Current.Request.UserHostAddress);
}
else
{
HttpContext.Current.Response.Redirect("/message.aspx");
return null;
}
}
Can you help please? All I want to do is show a message page if the user is not authenticated when I call Chat_OpenMessenger()
thanks
Greg