Table names/connectionstring conflicts

Last post 05-04-2007, 11:15 AM by jjonesdtrt. 5 replies.
Sort Posts: Previous Next
  •  05-02-2007, 8:37 AM 29071

    Table names/connectionstring conflicts

    I'm wanting to try this environment as a part of a system I've developed. It turns out that it shares data table names with my own application, which means I'll need to create and maintain a separate database for this. That wouldn't be a big whoop, except that the web.config connection string variable I'm using is also identical to CuteChat's...

    <add key="ConnectionString" value="server=(local);database=CutechatStandalone;uid=test;pwd=test"/>

    ...which, I'm assuming, means I'd have to change the variable name in all of my code to accomodate CuteChat.

    Am I right, or is there a workaround for this issue?





  •  05-02-2007, 11:55 AM 29082 in reply to 29071

    Re: Table names/connectionstring conflicts

    jjonesdtrt,
     
    If you are using the standalone, please follow the steps below.
     
    1. Open Global.asax.cs and find the following code:
    return System.Configuration.ConfigurationSettings.AppSettings["ConnectionString"];
     
    And change it to:
    return System.Configuration.ConfigurationSettings.AppSettings["ChatConnectionString"];
     
    2. Recompile the sample portal project
     
    3. Open the web.config file and add the connection string as:
     
    <add key="ChatConnectionString" value="server=(local);database=CutechatStandalone;uid=test;pwd=test"/>
     

    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

  •  05-03-2007, 10:35 AM 29136 in reply to 29082

    Re: Table names/connectionstring conflicts

    I'm thinking maybe I downloaded the wrong package, since I am intending for this chat environment to be embedded in my own application. I'm now downloading the "Integrated..." one...I'm assuming the data structure is the same? I want to be able to pass credentials, set up rooms, and authenticate users on the fly on the basis of existing session variables and database contents from my existing system.
  •  05-03-2007, 1:10 PM 29142 in reply to 29136

    Re: Table names/connectionstring conflicts

    ...*sigh*...I may be into something a bit too deep, and probably just need some advice.

    My intent is to use this environment totally embedded in my own blog system. That system is a complete integrated dot.net application which uses LDAP to reach out and verify logins in our active directory, but also keeps its own database of user information, including various rights and grouping containers. What I want to do is use my system, and create/call chat rooms embedded in pages on the basis of membership in these various groups/containers, and generating the necessary credentials and display names for the chat rooms on the fly using existing session variables from my application, and database calls. I won't be using the controls available through a fully-qualified stand-alone chat environment, since it'll never be used that way...with the possible exception of the admin controls.

    I just downloaded and examined the "Integrated..." package, and it is clearly aimed at existing systems such as Community Server and dot-net-nuke, so I can't see how that security integration is happening, or how it would work with my design.

    If you can point me towards any documentation or forum postings which would help me decide, I'm all ears.

  •  05-04-2007, 4:23 AM 29177 in reply to 29142

    Re: Table names/connectionstring conflicts

    jjonesdtrt,
     
     
    Have you checked the following article?
     
    Integration with an existing user membership database (Direct Log In Mechanism)
     
     
    Basically you need to let Cute Chat know who is admin,  how to get the username, a list of all users....
     
    Cute Chat doesn't need to how where you get this information.  It event supports hard code information.
     
    The following is the user provider used when developing this product.
      

    public string GetConnectionString(CuteSoft.Chat.UserIdentity user)
      {
       return System.Configuration.ConfigurationSettings.AppSettings["CuteChat.SqlClient.ConnectionString"];
      }

      //IHttpApplicationUserAdapter

      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};
       }
      }


    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

  •  05-04-2007, 11:15 AM 29200 in reply to 29177

    Re: Table names/connectionstring conflicts

    I've spent some time wandering through the documentation from the download, and I do think this is probably within reach...I'm trying to clear some other projects from my desk for a full frontal assault, and will hassle you on specific points if so.

    Thanks a bunch.

    By the way, why is it that some of the cutesoft.com links don't work? For instance, I click the above link in your posting, and it comes up a few really odd characters...

    ÈòÒ//ívxêÒ‡˜ÆwÈòÒ./ív./ív

    ...and nothing else. Happens sometimes with other links as well. The RSS feed for this thread has also stopped working.

View as RSS news feed in XML