Keyword not supported: InitialCatalog

Discussion in 'Databases' started by bullybear, Mar 8, 2010.

Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.
  1. Im getting an error when trying to access my site online


    Server Error in '/' Application.
    --------------------------------------------------------------------------------

    Keyword not supported: 'initialcatalog'.
    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.ArgumentException: Keyword not supported: 'initialcatalog'

    Please help

    My web.config file looks like this:

    <connectionStrings>
    <remove name="LocalSqlServer"/>
    <add name="LocalSqlServer" connectionString="Data Source=tcp:sql2k802.discountasp.net;InitialCatalog=SQL2008_670894_fxudb2;UserID=SQL2008_670894_fxudb2_user;Password=******* " password is actually there I just x it out.
     
  2. Hi,
    Looks like you've got a few stray spaces in there...Try it like this:

    <connectionStrings>
    <clear/>
    <remove name="LocalSqlServer"/>
    <add name="LocalSqlServer" connectionString="Data Source=tcp:sql2k802.discountasp.net;Initial Catalog=SQL2008_670894_fxudb2;User ID=SQL2008_670894_fxudb2_user;Password=******" providerName="System.Data.SqlClient"/>
    </connectionStrings>
     
  3. ok did it but....

    I followed your instructions which fixed the initialcatalog problem but I did'nt stop to think about the other issue that is still related to the first issue, which is having 2 SQL 2008 db's on dasp! one is ASPDBNET and the other is used for non login, user, role, member information.
    When i fixed the initialcatalog problem or should I say, (when YOU fixed the initialcatalog problem) I began to get the error of not finding the other database.
    I did what seemed correct in the web.config and did a lot of trial and error but to no avail. Here is a copy of the last effort to resolve the issue.

    <connectionStrings>
    <clear/>
    <remove name="LocalSqlServer"/>
    <add name="LocalSqlserver" connectionString="Data Source=tcp:sql2k80.discountasp.net;InitialCatalog=xxxxx;UserID=xxxxxx;Password=xxxxxxxx"
    providerName="System.Data.SqlClient" />
    <add name="fxuDataBaseConnectionString" connectionString="Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\fxuDataBase.mdf;Integrated Security=True;User Instance=True"
    providerName="System.Data.SqlClient" />
    </connectionStrings>


    NOTE: is it posible to intergrate the two db's into the same dasp database? and just increase the size of the one Database on dasp server?
     
  4. Bruce

    Bruce DiscountASP.NET Staff

    your fxuDataBaseConnectionString is invalid. It is pointing to a SQL Express database.
     
  5. Key word InitialCatalog

    Thanks to you both wisemx & bruce, but I'm still having problems.
    when ever I use the string that points to the dasp server for my second DataBase, I get the Key Word not supported: InitialCatalog.

    I have (2)two 2008 sql database on dasp server, when I write to web.config how do I get the second Dbase to make connection?
    I ask this because when I add the ConnectionString for the second Dbase I get “Key word not supported: InitialCatalog”
    I’m assuming this is because InitialCatalog is specific to the “LocalSqlServer” Name?
    If I’m right then what “Key Word Should I be using? If I’m Wrong Then I have NO CLUE on what to do with it.
    Would I be better off combining the two databases and buying more db space instead?
    Here is the error and stack trace,
    Server Error in '/' Application.
    ________________________________________
    Keyword not supported: 'initialcatalog'.
    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.ArgumentException: Keyword not supported: 'initialcatalog'.

    Source Error:
    An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

    Stack Trace:

    [ArgumentException: Keyword not supported: 'initialcatalog'.]
    System.Data.Common.DbConnectionOptions.ParseInternal(Hashtable parsetable, String connectionString, Boolean buildChain, Hashtable synonyms, Boolean firstKey) +4907604
    System.Data.Common.DbConnectionOptions..ctor(String connectionString, Hashtable synonyms, Boolean useOdbcRules) +98
    System.Data.SqlClient.SqlConnectionString..ctor(String connectionString) +55
    System.Data.SqlClient.SqlConnectionFactory.CreateConnectionOptions(String connectionString, DbConnectionOptions previous) +24
    System.Data.ProviderBase.DbConnectionFactory.GetConnectionPoolGroup(String connectionString, DbConnectionPoolGroupOptions poolOptions, DbConnectionOptions& userConnectionOptions) +200
    System.Data.SqlClient.SqlConnection.ConnectionString_Set(String value) +62
    System.Data.SqlClient.SqlConnection.set_ConnectionString(String value) +4
    System.Web.UI.WebControls.SqlDataSource.CreateConnection(String connectionString) +29
    System.Web.UI.WebControls.SqlDataSourceView.ExecuteSelect(DataSourceSelectArguments arguments) +89
    System.Web.UI.DataSourceView.Select(DataSourceSelectArguments arguments, DataSourceViewSelectCallback callback) +19
    System.Web.UI.WebControls.DataBoundControl.PerformSelect() +142
    System.Web.UI.WebControls.BaseDataBoundControl.DataBind() +73
    System.Web.UI.WebControls.DetailsView.DataBind() +4
    System.Web.UI.WebControls.BaseDataBoundControl.EnsureDataBound() +82
    System.Web.UI.WebControls.DetailsView.EnsureDataBound() +184
    System.Web.UI.WebControls.CompositeDataBoundControl.CreateChildControls() +72
    System.Web.UI.Control.EnsureChildControls() +87
    System.Web.UI.Control.PreRenderRecursiveInternal() +44
    System.Web.UI.Control.PreRenderRecursiveInternal() +171
    System.Web.UI.Control.PreRenderRecursiveInternal() +171
    System.Web.UI.Control.PreRenderRecursiveInternal() +171
    System.Web.UI.Control.PreRenderRecursiveInternal() +171
    System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +842
     
  6. What does the web config connection strings section look like? Make sure to obfuscate your server name, user name, and password when you paste it into here.
     
  7. I just noticed that when I post I have been getting a reply within an hour or two, I started this thread thinking it would be days before I get a response so I just walked away and came back days later each time thinking it would take a while but now I'm seeing something all together different WOW!
    Anyway, here is the web.config I have to this point, I am assuming it's the connectionstring you're interested in.

    <connectionStrings>
    <clear />
    <remove name="LocalSqlserver"/>
    <add name="LocalSqlserver" connectionString="Data Source=tcp:sql2k80.discountasp.net;InitialCatalog=SQL2008_670894_fxudb2;UserID=SQL2008_******;Password= *****"
    providerName="System.Data.SqlClient" />
    <remove name ="fxuDataBase"/>
    <add name="fxuDataBase" connectionString="Data Source=tcp:sql2k80.discountasp.net;InitialCatalog=SQL2008_670894_fxudb;UserID=SQL2008_******;Password=*****"
    providerName="System.Data.SqlClient" />
    <remove name="ConnectionStringEowPl"/>
    <add name="ConnectionStringEowPl" connectionString="Data Source=tcp:sql2k80.discountasp.net;InitialCatalog=SQL2008_670894_fxudb;UserID=SQL2008_*******;Password=*******"
    providerName="System.Data.SqlClient" />
    </connectionStrings>
     
Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.

Share This Page