René,
You don't need the SamplePortal.dll if you create your provider.
Are you familar with the IbuySpy?
This is an example showing how to integrate CuteChat with IbuySpy.
PortalUserProvider.cs
using System;
using System.Collections;
using System.ComponentModel;
using System.Security.Principal;
namespace CuteChatControls
{
/// <summary>
/// Summary description for IbuySpyUserAdapter.
/// </summary>
public class IbuySpyUserAdapter : CuteSoft.Chat.UserAdapter
{
public override string GetUserUniqueName(System.Web.HttpContext context)
{
IIdentity iden=context.User.Identity;
if(iden==null||!iden.IsAuthenticated)
return null;
if(iden.Name==null||iden.Name.Length==0)
return null;
return iden.Name;
}
}
}
PortalDataProvider.cs
using System;
using System.Collections;
using System.Data;
using System.Data.SqlClient;
using ASPNetPortal;
using CuteSoft.Chat;
namespace CuteChatControls
{
/// <summary>
/// Summary description for IbuySpyDataProvider.
/// </summary>
public class IbuySpyDataProvider : CuteSoft.Chat.DataProvider
{
public override string GetUserDisplayName(string useruniquename)
{
return useruniquename;
}
public override string[] ListUserUniqueName()
{
// Get the list of registered users from the database
AdminDB admin = new AdminDB();
SqlDataReader reader = admin.GetUsers();
ArrayList result = new ArrayList();
while(reader.Read())
{
result.Add(reader.GetString(0));
}
return (String[]) result.ToArray(typeof(String));
}
public override bool IsAdministrator(string useruniquename)
{
String[] roles;
UsersDB user = new UsersDB();
roles = user.GetRoles(useruniquename);
foreach (String role in roles)
{
if (role.ToLower()=="admins")
{
return true;
}
}
return false;
}
public override string[] SearchUserUniqueNameByDisplayName(string userDisplaName)
{
if(userDisplaName==null||userDisplaName=="")return new string[0];
userDisplaName = userDisplaName.ToLower();
AdminDB admin = new AdminDB();
SqlDataReader reader = admin.GetUsers();
ArrayList names = new ArrayList();
while(reader.Read())
{
try
{
string val= reader.GetString(1);
if(val.ToLower().IndexOf(userDisplaName)!=-1)
names.Add(val);
}
catch{}
}
return (string[])names.ToArray(typeof(string));
}
}
}
asp.net Chat http://cutesoft.net/ASP.NET+Chat/default.aspx
Web Messenger: http://cutesoft.net/Web-Messenger/default.aspx
asp.net wysiwyg editor: http://cutesoft.net/ASP.NET+WYSIWYG+Editor/default.aspx
asp wysiwyg html editor: http://cutesoft.net/ASP
asp.net Image Gallery: http://cutesoft.net/ASP.NET+Image+Gallery/default.aspx
Live Support: http://cutesoft.net/live-support/default.aspx