i got error plz remove it as soon as possible coz it's urgent for me

Last post 06-12-2007, 12:21 AM by wish_dev. 2 replies.
Sort Posts: Previous Next
  •  06-11-2007, 7:44 AM 30564

    i got error plz remove it as soon as possible coz it's urgent for me

    CS0535: 'ASP.global_asax' does not implement interface member 'CuteSoft.Chat.IHttpApplicationConnectionStringProvider.GetConnectionString(CuteSoft.Chat.UserIdentity)'

    Source Error:

     
    Line 110: Line 111: [System.Runtime.CompilerServices.CompilerGlobalScopeAttribute()] Line 112: public class global_asax : global::System.Web.HttpApplication, CuteSoft.Chat.IHttpApplicationConnectionStringProvider, CuteSoft.Chat.IHttpApplicationUserAdapter, CuteSoft.Chat.IHttpApplicationDataProvider, CuteSoft.Chat.IHttpApplicationSupportLogin { Line 113: Line 114: private static bool @__initialized;
     
    i got this error so any one have solution for this error. it's urgent........
    Filed under: ,
  •  06-11-2007, 10:19 AM 30572 in reply to 30564

    Re: i got error plz remove it as soon as possible coz it's urgent for me

    Wish_dev,
     
    You miss this step:
     

    Implement IHttpApplicationConnectionStringProvider interface and Let CuteChat know the database connection string


    In this step, you need to implement one simple method:

    //Retrieves the Cute Chat database connection string
    public string GetConnectionString(CuteSoft.Chat.UserIdentity user)

    Code Example

    public string GetConnectionString(CuteSoft.Chat.UserIdentity user)

    {

        return System.Configuration.ConfigurationSettings.AppSettings["ConnectionString"];

    }

     
     

    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

  •  06-12-2007, 12:21 AM 30611 in reply to 30572

    Re: i have this type code but i also get the eroor which i was posted pls help me

    <%@ Application Language="C#" %>

    <%@ Import Namespace="CuteSoft.Chat" %>

    <%@ Implements Interface="CuteSoft.Chat.IHttpApplicationConnectionStringProvider" %>

    <%@ Implements Interface="CuteSoft.Chat.IHttpApplicationUserAdapter" %>

    <%@ Implements Interface="CuteSoft.Chat.IHttpApplicationDataProvider" %>

    <%@ Implements Interface="CuteSoft.Chat.IHttpApplicationSupportLogin" %>

    <script runat="server">

    public class Global : System.Web.HttpApplication

    {

    public string GetConnectionString(CuteSoft.Chat.UserIdentity user)

    {

    return System.Configuration.ConfigurationSettings.AppSettings["ConnectionString"];

    }

    //IHttpApplicationUserAdapter

     

     

     

    public bool IsLobbyAdmin(string useruniquename, CuteSoft.Chat.CuteChatLobby lobby)

    {

    // EXAMPLE 1 (Community Server):

    //if (lobby.Integration == null) return false;

    //CommunityServer.Components.User user=CommunityServer.Users.FindUserByUsername(useruniquename);

    //if(user==null)

    // return false;

    //if (lobby.Integration.StartsWith("Forum:"))

    //{

    // int forumid = int.Parse(lobby.Integration.Substring(6));

    // CommunityServer.Discussions.Components.Forum forum = CommunityServer.Discussions.Components.Forums.GetForum(forumid);

    // if (forum == null)

    // {

    // return false;

    // }

    // return CommunityServer.Components.Permissions.ValidatePermissions(forum

    // , CommunityServer.Components.Permission.Administer

    // , user);

    //}

    //return false;

    // EXAMPLE 2 (IbuySpy):

    // return false;

    return false;

    }

    public bool SupportLogin(string username, string password)

    {

    // EXAMPLE 1 (Community Server):

    //if (username == null) return false;

    //username = username.Trim();

    //if (username == "") return false;

    //if (password == null) return false;

    ////IMPORTANT: if the user is not the operator, do not return true;

    ////use the CuteChat API to check it

    //if (CuteSoft.Chat.ChatApi.FindOperator(username) == null)

    // return false;

    ////does the user exist?

    //CommunityServer.Components.User user = CommunityServer.Users.FindUserByUsername(username);

    //if (user == null)

    // return false;

    ////use CommunityServer API to validate the user

    //user = new CommunityServer.Components.User();

    //user.Username = username;

    //user.Password = password;

    //CommunityServer.Components.LoginUserStatus status = CommunityServer.Users.ValidUser(user);

    //if(status!=CommunityServer.Components.LoginUserStatus.Success)

    //{

    // return false;

    //}

    ////FORM-Authentication ,

    //System.Web.Security.FormsAuthentication.SetAuthCookie(user.Username, false, "/");

    // EXAMPLE 2 (IbuySpy):

    // if(username==null||username.Trim()=="")

    // return false;

    // if(password==null||password=="")

    // return false;

    // username=username.Trim();

    // string email=username;

    // string uniquename=email;

    // if(CuteSoft.Chat.ChatApi.FindOperator(uniquename)==null)

    // return false;

    // UsersDB udb=new UsersDB();

    // string name=udb.Login(email,PortalSecurity.Encrypt(password));

    // if(name==null||name=="")

    // return false;

    // System.Web.Security.FormsAuthentication.SetAuthCookie(email, false, "/");

    // return true;

    return false;

    }

     

    public void SupportInit()

    {

    }

     

    public CuteSoft.Chat.UserIdentity GetUserIdentity()

    {

    string id = GetUserUniqueName();

    if (id == null)

    return CuteSoft.Chat.UserIdentity.CreateNull();

    CuteSoft.Chat.UserIdentity identity = new CuteSoft.Chat.UserIdentity(id, null, Context.Request.UserHostAddress);

    //identity.CustomItems["myprop"]="myval";

    return identity;

    }

    public string GetUserUniqueName() //Get the ID of current user

    {

    if (Context.User.Identity.IsAuthenticated)

    return Context.User.Identity.Name;

    return null;

    }

    //IHttpApplicationDataProvider

    public string[] ListUserUniqueName()

    {

    //list the known users

    return new string[] { "admin" };

    }

    public bool IsAdministrator(string useruniquename)

    {

    if (string.Compare(useruniquename, "admin", true) == 0)

    return true;

    return false;

    }

    public string GetUserDisplayName(string useruniquename)

    {

    switch (useruniquename.ToLower())

    {

    case "admin":

    return "Administrator";

    case "terry":

    return "Terry.X";

    case "marry":

    return "Marry.White";

    default:

    return useruniquename + "test";

    }

    }

    public string[] SearchUserUniqueNameByDisplayName(string userDisplaName)

    {

    switch (userDisplaName.ToLower())

    {

    case "administrator":

    return new string[] { "admin" };

    case "terry.dai":

    return new string[] { "terry" };

    default:

    return new string[] { userDisplaName };

    }

    }

    }

    </script>

View as RSS news feed in XML