Web.Config

Last post 10-19-2006, 3:14 PM by Adam. 1 replies.
Sort Posts: Previous Next
  •  10-18-2006, 8:01 AM 23667

    Web.Config

    Hi

    I am using the integration download package to use with my asp.net 2 vb.net website.

    I am currently trying to update the global.asax file as the examples do not replate to a standalone website.

    I notice there is no web.config in the integration package so this function will have problems?:


    #Region " IHttpApplicationConnectionStringProvider Members "

        'Step 1: Let CuteChat know your databse connection string
        Public Function GetConnectionString(ByVal user As CuteSoft.Chat.UserIdentity) As String Implements CuteSoft.Chat.IHttpApplicationConnectionStringProvider.GetConnectionString
            Return System.Configuration.ConfigurationSettings.AppSettings("ConnectionString")
           
        End Function
       
    #End Region


    How do I get around this - do I create a web.config - if so what does it need to contain?

    Am I missing something?

    Thanks

    CG



  •  10-19-2006, 3:14 PM 23720 in reply to 23667

    Re: Web.Config

    cdgregory,
     
    The VB.net you wrote means the following things:
     
    1. Tell Cute Chat find your database connection string from web.config file
     
    2. This entry is located in configuration >> appSettings section of web.config.  The name of this entry is "ConnectionString".
     
    So you can create a simple web.config file as followings:
     
    <?xml version="1.0" encoding="utf-8" ?>
    <configuration>
     <appSettings>
      <add key="ConnectionString" value="server=(local)\portal;database=SamplePortal;uid=test;pwd=test" />
      </appSettings>
    </configuration>

    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

View as RSS news feed in XML