ConnectionString problem with integration package

Last post 06-30-2007, 6:32 AM by lukeg. 2 replies.
Sort Posts: Previous Next
  •  06-29-2007, 7:52 AM 31179

    ConnectionString problem with integration package

    I'm having some trouble getting the integration package of CuteChat to work with my website. I've copied the "CuteSoft_Client" folder to my root directory and have tried running a page with an embedded chat window, but I keep getting the following error:

    ConnectionStringProvider : CuteSoft.Chat.DefaultConnectionStringProvider return null

    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

    Exception Details: System.Exception: ConnectionStringProvider : CuteSoft.Chat.DefaultConnectionStringProvider return null

    Source Error:

    Line 5:  	protected override void Render(HtmlTextWriter writer)
    Line 6: {
    Line 7: using(new CuteSoft.Chat.Impl.ResourceContext(writer))
    Line 8: {
    Line 9: base.Render(writer);

    Source File: c:\Inetpub\wwwroot\*****\CuteSoft_Client\CuteChat\Toolbar.ascx    Line: 7



    This is what I've got in the appSettings section of my web.config:

    <add key="CuteChat.SqlClient.ConnectionString" value="Data Source=localhost; User Id=sa; Password=*****; Initial Catalog=cutechat_db;" />


    What do I need to add/change to get this working?
  •  06-29-2007, 10:55 AM 31186 in reply to 31179

    Re: ConnectionString problem with integration package

    lukeg,
     
    You miss the following steps:

    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-30-2007, 6:32 AM 31190 in reply to 31186

    Re: ConnectionString problem with integration package

    Thanks Adam - that solved my problem.

    I was using the code from the sample Global.asax file, but I forgot to uncomment part of the GetConnectionString function.
View as RSS news feed in XML