locked
I have a quick question RRS feed

  • Question

  • User1114018643 posted
    can i use SQL server 2000 and visual studio 2005 for this Personal Site Starter kit?
    Monday, March 2, 2009 6:01 PM

Answers

  • User1114018643 posted
    //I am using sql server 2000 and i have changed the connectionString setting to localhost below: <add name="Personal" connectionString="Data Source=localhost;Integrated Security=True;User Instance=True;AttachDBFilename=|DataDirectory|Personal.mdf" providerName="System.Data.SqlClient"/> <remove name="LocalSqlServer"/> <add name="LocalSqlServer" connectionString="Data Source=localhost;Integrated Security=True;User Instance=True;AttachDBFilename=|DataDirectory|aspnetdb.mdf"/> //I got this error while running. Server Error in '/WebSite3' Application. Invalid value for key 'attachdbfilename'. 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: Invalid value for key 'attachdbfilename'. Source Error: Line 5: void Application_Start(object sender, EventArgs e) { Line 6: SiteMap.SiteMapResolve += new SiteMapResolveEventHandler(AppendQueryString); Line 7: if (!Roles.RoleExists("Administrators")) Roles.CreateRole("Administrators"); Line 8: if (!Roles.RoleExists("Friends")) Roles.CreateRole("Friends"); Line 9: } Source File: c:\Documents and Settings\Manish Saini\My Documents\Visual Studio 2005\Projects\WebSite3\Global.asax Line: 7 Stack Trace: [ArgumentException: Invalid value for key 'attachdbfilename'.] System.Data.SqlClient.SqlConnectionString.VerifyLocalHostAndFixup(String& host, Boolean enforceLocalHost, Boolean fixup) +299 System.Data.SqlClient.SqlConnectionString..ctor(String connectionString) +2960 System.Data.SqlClient.SqlConnectionFactory.CreateConnectionOptions(String connectionString, DbConnectionOptions previous) +46 System.Data.ProviderBase.DbConnectionFactory.GetConnectionPoolGroup(String connectionString, DbConnectionPoolGroupOptions poolOptions, DbConnectionOptions& userConnectionOptions) +201 System.Data.SqlClient.SqlConnection.ConnectionString_Set(String value) +82 System.Data.SqlClient.SqlConnection.set_ConnectionString(String value) +28 System.Data.SqlClient.SqlConnection..ctor(String connectionString) +35 System.Web.DataAccess.SqlConnectionHolder..ctor(String connectionString) +68 [ArgumentException: An error occurred while attempting to initialize a System.Data.SqlClient.SqlConnection object. The value that was provided for the connection string may be wrong, or it may contain an invalid syntax. Parameter name: connectionString] System.Web.DataAccess.SqlConnectionHolder..ctor(String connectionString) +160 System.Web.DataAccess.SqlConnectionHelper.GetConnection(String connectionString, Boolean revertImpersonation) +127 System.Web.Security.SqlRoleProvider.RoleExists(String roleName) +612 System.Web.Security.Roles.RoleExists(String roleName) +70 ASP.global_asax.Application_Start(Object sender, EventArgs e) in c:\Documents and Settings\Manish
    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, March 2, 2009 6:55 PM
  • User-319574463 posted

    You should investigate what the connection string should be like:

    1) Create an empty text file in windows explorer and rename it to X.UDL
    2) Double click on it and the data-link provider dialogue will appear.
    3) Select the provider tab. Find the provider for SQL Server and click next.
    4) Select your database
    5) Test the connection and save it.
    6) Compare the contents of X.UDL with your connections string.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, March 4, 2009 11:33 AM
  • User1114018643 posted
    Data-link provider does not show SQL Server in the list. List contain following providers. 1.Microsoft OLE DB Provider for SQL server 2.SQL Native Client 3.SQL Server Replication OLE DB Provider for DTS
    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, March 4, 2009 2:59 PM
  • User-319574463 posted

     Use 1.Microsoft OLE DB Provider for SQL server

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, March 4, 2009 4:51 PM

All replies

  • User1114018643 posted
    //I am using sql server 2000 and i have changed the connectionString setting to localhost below: <add name="Personal" connectionString="Data Source=localhost;Integrated Security=True;User Instance=True;AttachDBFilename=|DataDirectory|Personal.mdf" providerName="System.Data.SqlClient"/> <remove name="LocalSqlServer"/> <add name="LocalSqlServer" connectionString="Data Source=localhost;Integrated Security=True;User Instance=True;AttachDBFilename=|DataDirectory|aspnetdb.mdf"/> //I got this error while running. Server Error in '/WebSite3' Application. Invalid value for key 'attachdbfilename'. 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: Invalid value for key 'attachdbfilename'. Source Error: Line 5: void Application_Start(object sender, EventArgs e) { Line 6: SiteMap.SiteMapResolve += new SiteMapResolveEventHandler(AppendQueryString); Line 7: if (!Roles.RoleExists("Administrators")) Roles.CreateRole("Administrators"); Line 8: if (!Roles.RoleExists("Friends")) Roles.CreateRole("Friends"); Line 9: } Source File: c:\Documents and Settings\Manish Saini\My Documents\Visual Studio 2005\Projects\WebSite3\Global.asax Line: 7 Stack Trace: [ArgumentException: Invalid value for key 'attachdbfilename'.] System.Data.SqlClient.SqlConnectionString.VerifyLocalHostAndFixup(String& host, Boolean enforceLocalHost, Boolean fixup) +299 System.Data.SqlClient.SqlConnectionString..ctor(String connectionString) +2960 System.Data.SqlClient.SqlConnectionFactory.CreateConnectionOptions(String connectionString, DbConnectionOptions previous) +46 System.Data.ProviderBase.DbConnectionFactory.GetConnectionPoolGroup(String connectionString, DbConnectionPoolGroupOptions poolOptions, DbConnectionOptions& userConnectionOptions) +201 System.Data.SqlClient.SqlConnection.ConnectionString_Set(String value) +82 System.Data.SqlClient.SqlConnection.set_ConnectionString(String value) +28 System.Data.SqlClient.SqlConnection..ctor(String connectionString) +35 System.Web.DataAccess.SqlConnectionHolder..ctor(String connectionString) +68 [ArgumentException: An error occurred while attempting to initialize a System.Data.SqlClient.SqlConnection object. The value that was provided for the connection string may be wrong, or it may contain an invalid syntax. Parameter name: connectionString] System.Web.DataAccess.SqlConnectionHolder..ctor(String connectionString) +160 System.Web.DataAccess.SqlConnectionHelper.GetConnection(String connectionString, Boolean revertImpersonation) +127 System.Web.Security.SqlRoleProvider.RoleExists(String roleName) +612 System.Web.Security.Roles.RoleExists(String roleName) +70 ASP.global_asax.Application_Start(Object sender, EventArgs e) in c:\Documents and Settings\Manish
    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, March 2, 2009 6:55 PM
  • User1114018643 posted
    //I am using sql server 2000 and i have changed the connectionString setting to localhost below: <add name="Personal" connectionString="Data Source=localhost;Integrated Security=True;User Instance=True;AttachDBFilename=|DataDirectory|Personal.mdf" providerName="System.Data.SqlClient"/> <remove name="LocalSqlServer"/> <add name="LocalSqlServer" connectionString="Data Source=localhost;Integrated Security=True;User Instance=True;AttachDBFilename=|DataDirectory|aspnetdb.mdf"/> //I got this error while running. Server Error in '/WebSite3' Application. Invalid value for key 'attachdbfilename'. 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: Invalid value for key 'attachdbfilename'. Source Error: Line 5: void Application_Start(object sender, EventArgs e) { Line 6: SiteMap.SiteMapResolve += new SiteMapResolveEventHandler(AppendQueryString); Line 7: if (!Roles.RoleExists("Administrators")) Roles.CreateRole("Administrators"); Line 8: if (!Roles.RoleExists("Friends")) Roles.CreateRole("Friends"); Line 9: } Source File: c:\Documents and Settings\Manish Saini\My Documents\Visual Studio 2005\Projects\WebSite3\Global.asax Line: 7 Stack Trace: [ArgumentException: Invalid value for key 'attachdbfilename'.] System.Data.SqlClient.SqlConnectionString.VerifyLocalHostAndFixup(String& host, Boolean enforceLocalHost, Boolean fixup) +299 System.Data.SqlClient.SqlConnectionString..ctor(String connectionString) +2960 System.Data.SqlClient.SqlConnectionFactory.CreateConnectionOptions(String connectionString, DbConnectionOptions previous) +46 System.Data.ProviderBase.DbConnectionFactory.GetConnectionPoolGroup(String connectionString, DbConnectionPoolGroupOptions poolOptions, DbConnectionOptions& userConnectionOptions) +201 System.Data.SqlClient.SqlConnection.ConnectionString_Set(String value) +82 System.Data.SqlClient.SqlConnection.set_ConnectionString(String value) +28 System.Data.SqlClient.SqlConnection..ctor(String connectionString) +35 System.Web.DataAccess.SqlConnectionHolder..ctor(String connectionString) +68 [ArgumentException: An error occurred while attempting to initialize a System.Data.SqlClient.SqlConnection object. The value that was provided for the connection string may be wrong, or it may contain an invalid syntax. Parameter name: connectionString] System.Web.DataAccess.SqlConnectionHolder..ctor(String connectionString) +160 System.Web.DataAccess.SqlConnectionHelper.GetConnection(String connectionString, Boolean revertImpersonation) +127 System.Web.Security.SqlRoleProvider.RoleExists(String roleName) +612 System.Web.Security.Roles.RoleExists(String roleName) +70 ASP.global_asax.Application_Start(Object sender, EventArgs e) in c:\Documents and Settings\Manish
    Monday, March 2, 2009 6:56 PM
  • User-319574463 posted

    You should investigate what the connection string should be like:

    1) Create an empty text file in windows explorer and rename it to X.UDL
    2) Double click on it and the data-link provider dialogue will appear.
    3) Select the provider tab. Find the provider for SQL Server and click next.
    4) Select your database
    5) Test the connection and save it.
    6) Compare the contents of X.UDL with your connections string.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, March 4, 2009 11:33 AM
  • User1114018643 posted
    Data-link provider does not show SQL Server in the list. List contain following providers. 1.Microsoft OLE DB Provider for SQL server 2.SQL Native Client 3.SQL Server Replication OLE DB Provider for DTS
    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, March 4, 2009 2:59 PM
  • User-319574463 posted

     Use 1.Microsoft OLE DB Provider for SQL server

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, March 4, 2009 4:51 PM