Problem with latest changeset

Jul 26, 2007 at 12:59 PM
Im getting this error when trying a local preview of change set 3772. All connection strings are ok.... any ideas?

An attempt to attach an auto-named database for file C:\websites\3772\ClubStarterKit.Web\App_Data\ClubDB.mdf failed. A database with the same name exists, or specified file cannot be opened, or it is located on UNC share.
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: An attempt to attach an auto-named database for file C:\websites\3772\ClubStarterKit.Web\App_Data\ClubDB.mdf failed. A database with the same name exists, or specified file cannot be opened, or it is located on UNC share.

Source Error:

Line 51: SetSQLProps()
Line 52: InitSetDefaults()
Line 53: LoadByParam(columnName,columnValue)
Line 54: End Sub
Line 55: Private Sub InitSetDefaults()

Source File: C:\websites\3772\ClubStarterKit\ClubStarterKit.Data\Generated\WebSettings.vb Line: 53

Stack Trace:

SqlException (0x80131904): An attempt to attach an auto-named database for file C:\websites\3772\ClubStarterKit.Web\App_Data\ClubDB.mdf failed. A database with the same name exists, or specified file cannot be opened, or it is located on UNC share.
System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) +171
System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) +199
System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) +2411
System.Data.SqlClient.SqlInternalConnectionTds.CompleteLogin(Boolean enlistOK) +34
System.Data.SqlClient.SqlInternalConnectionTds.AttemptOneLogin(ServerInfo serverInfo, String newPassword, Boolean ignoreSniOpenTimeout, Int64 timerExpire, SqlConnection owningObject) +223
System.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(String host, String newPassword, Boolean redirectedUserInstance, SqlConnection owningObject, SqlConnectionString connectionOptions, Int64 timerStart) +371
System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection owningObject, SqlConnectionString connectionOptions, String newPassword, Boolean redirectedUserInstance) +184
System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, String newPassword, SqlConnection owningObject, Boolean redirectedUserInstance) +193
System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection) +501
System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnection owningConnection, DbConnectionPool pool, DbConnectionOptions options) +28
System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject) +429
System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject) +70
System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject) +512
System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection) +85
System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) +89
System.Data.SqlClient.SqlConnection.Open() +160
SubSonic.SqlDataProvider.CreateConnection(String newConnectionString) in C:\SubSonic 2.0.3\src\SubSonic\DataProviders\SqlDataProvider.cs:21
SubSonic.SqlDataProvider.CreateConnection() in C:\SubSonic 2.0.3\src\SubSonic\DataProviders\SqlDataProvider.cs:15
SubSonic.AutomaticConnectionScope..ctor(DataProvider provider) in C:\SubSonic 2.0.3\src\SubSonic\Sql Tools\Connection.cs:160
SubSonic.SqlDataProvider.GetReader(QueryCommand qry) in C:\SubSonic 2.0.3\src\SubSonic\DataProviders\SqlDataProvider.cs:114
SubSonic.AbstractRecord`1.LoadByParam(String columnName, Object paramValue) in C:\SubSonic 2.0.3\src\SubSonic\ActiveRecord\AbstractRecord.cs:328
ClubStarterKit.Data.WebSettings..ctor(String columnName, Object columnValue) in C:\websites\3772\ClubStarterKit\ClubStarterKit.Data\Generated\WebSettings.vb:53
ClubStarterKit.Web.Settings.PushToSession() in C:\websites\3772\ClubStarterKit\ClubStarterKit.Web\App_Code\BLL\Settings.vb:11
ASP.globalasax.SessionStart(Object sender, EventArgs e) in C:\websites\3772\ClubStarterKit\ClubStarterKit.Web\global.asax:24
System.Web.SessionState.SessionStateModule.RaiseOnStart(EventArgs e) +115
System.Web.SessionState.SessionStateModule.CompleteAcquireState() +303
System.Web.SessionState.SessionStateModule.BeginAcquireState(Object source, EventArgs e, AsyncCallback cb, Object extraData) +1003
System.Web.AsyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +144
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +146

Jul 26, 2007 at 6:07 PM
Try deleting the ClubDB_log file.
Jul 29, 2007 at 12:40 AM

I also get the same error and don't have a clue how to "delete the ClubDB_log file." I also don't know how to run the script to upgrade from version 2 to version 3 Beta (as shown in the text file instructions).

I can't run v3 beta (express version) because of above error. I'd like to examine to understand if there are features we can use ... especially the results.

Is there a bug list with solutions other than the builds? I also can't seem to figure out how to use the issue tracker... In version 2, May 11 release, I have at least 3 outstanding bugs and don't know where to find solutions.

Thank you.
Jul 29, 2007 at 1:17 AM
1) AppData/ClubDBlog.ldf.. delete it. Then try to open the database up in the solution explorer
2) How you run it is up to you. It depends on how you have your site setup. If it is runing on a hoster, then ping up your hoster's SQL server in SQL Management Studio, open the script file, and run it against your database. REMEMBER to run the upgrade app too. READ THE README
3) We can't really provide docs for every changeset... that would be tiring!
4) Which bugs? Re-report them or open them again.
Jul 28, 2008 at 7:01 PM
I am having the same problem. I tried deleting the log file but that did not solve the problem. How did you all fix this?
Aug 4, 2008 at 9:46 AM
I setup a new instance of CSK last Saturday and ran into the same exception. I resolved it with these 2 steps:
First of all check that your ClubDB.mdf is NOT write-protected, then try to attach it again.
When this doesn't work, attach your DB with MS Management Studio (Express) without the log-file, change the connectionstring  and try again.