Remote Connection string error while trying to connect to the MS SQL 2005 Server

Discussion in 'ASP.NET Starter Kits' started by ramelllamar, Jun 14, 2008.

  1. Can anyone help me here. I'm trying to upload the extended clubsite starter kit, but I'm having some trouble with the connection string. I followed the instructions below to at "T", but yet I'm still getting errors when I try to connect the remote server. Here is exactly what I did...


    1) Download and install the starter kit if you do not already have it installed on your computer. Grap it at http://www.asp.net

    2) Create a new website / project using VS.NET 2K5 or VWD 2005. Use the Club starter kit template.

    3) Create the Application Services Database on the our SQL

    a) navigate to C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727
    b) execute this aspnet_regsql.exe -S [DB Server Name] -U [DB login] -P [Password] -A all -d [Database name] - when this ran it completed, but I didn't see anything happen

    4) Create the starter kit database schema on the remote server by using the following script....osql. osql -S <sql server name> -U <db_user> -P <DB_password> -d <DB_Name> -i club-add.sql

    5) Open the Web.config file in VWD 2005.

    Change the connection string to point to the remote SQL server, and add the following lines..

    <connectionStrings>
    <add name="ClubSiteDB" connectionString="Data Source=tcp:sql2k506.discountasp.net;Integrated Security=false;Initial Catalog=SQL2005_508898_aspnetdb;User ID=SQL2005_508898_aspnetdb_user;Password=*******" providerName="System.Data.SqlClient"/>

    <remove name="LocalSqlServer"/>

    <add name="LocalSqlServer" connectionString="Data Source=tcp:sql2k506.discountasp.net;Integrated Security=false;Initial Catalog=SQL2005_508898_aspnetdb;User ID=SQL2005_508898_aspnetdb_user;Password=*******" providerName="System.Data.SqlClient" />
    </connectionStrings>


    6) Now build the kit by hitting Ctrl-F5. When I did this, I got the following error message?


    Server Error in '/Greater_Mt_Olive' Application.
    ________________________________________
    Invalid object name 'SiteSettings'.
    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.Data.SqlClient.SqlException: Invalid object name 'SiteSettings'.

    Source Error:

    Line 2186: this.Adapter.SelectCommand = this.CommandCollection[0];
    Line 2187: DataSet.SiteSettingsDataTable dataTable = new DataSet.SiteSettingsDataTable();
    Line 2188: this.Adapter.Fill(dataTable);
    Line 2189: return dataTable;
    Line 2190: }

    Source File: c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\greater_mt_olive\a8242ded\3582d7f7\App_Code.k6kyqc2w.9.cs Line: 2188

    Stack Trace:

    [SqlException (0x80131904): Invalid object name 'SiteSettings'.]
    System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection) +98
    System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) +82
    System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) +346
    System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) +3430
    System.Data.SqlClient.SqlDataReader.ConsumeMetaData() +52
    System.Data.SqlClient.SqlDataReader.get_MetaData() +130
    System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString) +371
    System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async) +1272
    System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result) +334
    System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method) +45
    System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method) +162
    System.Data.SqlClient.SqlCommand.ExecuteDbDataReader(CommandBehavior behavior) +35
    System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader(CommandBehavior behavior) +32
    System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +183
    System.Data.Common.DbDataAdapter.Fill(DataTable[] dataTables, Int32 startRecord, Int32 maxRecords, IDbCommand command, CommandBehavior behavior) +338
    System.Data.Common.DbDataAdapter.Fill(DataTable dataTable) +198
    DataSetTableAdapters.SiteSettingsTableAdapter.GetSiteSettings() in c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\greater_mt_olive\a8242ded\3582d7f7\App_Code.k6kyqc2w.9.cs:2188
    DevCowSiteSettings.GetSiteSettings() in c:\Documents and Settings\ramell-lamar\Desktop\Desktop Stuff\Personal Material\Web Site Portfolio\Greater_Mt_Olive\App_Code\SiteSettings.cs:49
    DevCow.Web.UI.DevCowThemePage.Page_PreInit(Object sender, EventArgs e) in c:\Documents and Settings\ramell-lamar\Desktop\Desktop Stuff\Personal Material\Web Site Portfolio\Greater_Mt_Olive\App_Code\DevCowThemePage.cs:20
    System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +31
    System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +68
    System.Web.UI.Page.OnPreInit(EventArgs e) +96
    System.Web.UI.Page.PerformPreInit() +32
    System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1437

    ________________________________________
    Version Information: Microsoft .NET Framework Version:2.0.50727.1433; ASP.NET Version:2.0.50727.1433


    Please Help?..thanks
    /emoticons/mad.gif
     

Share This Page