Hello,
We plan to
use CuteChat4 in a CMS-Environment, embedded in a UserControl, using the
login-information of the CMS.
The Chat is
working, offline on my own PC as well as online, but as soon as I log on to the
Chat, the chat thinks, I am the first user logged on, after the chat was
started (CuteChat.ChatSystem.Start). Also I cannot log on with
another user, becouse the chat thinks I am the same user.
Offline on
my PC I checkt the programm in debug-modus and found out, that the function “GetUserInfo”
(and other such functions) are never called after the first start.
So I have 2
questions.
First, how
do I make the chatsystem notice, that there is a new user logging in and
Second,
which Developer’s Guide is the actuell one? There is one in the downloadsection
(http://cutesoft.net/downloads/folders/chat_documentation/default.aspx)
and another one is in the Cute Chat and Web Messenger
integration package.
The Integration-Part of the Guid’s is quite different.
Thanks for
any help.
Regards,
Jan.
Code:
ChatControl
is being loaded in the CMS.
public partial class ChatControl : PortalModuleControl
{
protected void
Page_Load(object sender, EventArgs e)
{
sUserID="xxx";
CuteChat.ChatProvider.Instance = new
MyChat(sCompanyID, sUserID);
if(!CuteChat.ChatSystem.HasStarted)
CuteChat.ChatSystem.Start(new
CuteChat.AppSystem());
}
}
public class MyChat :
CuteChat.ChatProvider
{
String gsUid;
public MyChat(String
uid)
{
gsUid = uid;
}
public override string GetConnectionString()
{
String s = System.Configuration.ConfigurationSettings.AppSettings["Chat_ConnectionString"];
return s;
}
public override string FindUserLoginName(string
nickName)
{
return gsUid;
}
public override AppChatIdentity GetLogonIdentity()
{
string loginname = gsUid;
string nickname = xxx_lib.GetNickName(loginname);
return new AppChatIdentity(nickname, false,
ToUserId(loginname), HttpContext.Current.Request.UserHostAddress);
}
public override bool GetUserInfo(string
loginName, ref string
nickName, ref bool
isAdmin)
{
nickName = xxx_lib.GetNickName(loginName);
isAdmin = false;
return true;
}
public override bool ValidateUser(string
loginName, string password)
{
//
User-Validation is done by the CMS
return true;
}
}