DropThings in Production Environment

Apr 4, 2009 at 1:37 AM
What is the procedure to re-create the drop things database to a production MS SQL database?

Usually I would just run a .SQL file in management studio that would create all the tables and procs.

I had my DBA script the MDF database and run the produced SQL file on a new production database.  But when I do this I get this error when going to the web page:
The 'System.Web.Profile.SqlProfileProvider' requires a database schema compatible with schema version '1'.  However, the current database schema is not compatible with this version.  You may need to either install a compatible schema with aspnet_regsql.exe (available in the framework installation directory), or upgrade the provider to a newer version.

I bought the book but couldn't find anything about this there.  Also couldn't find anything about this in this discussion forum.

Any information would be greatly appreciated!

Thanks,
--Jeff
Apr 4, 2009 at 8:04 AM
Hello Jeff,

Did you read the readme.txt at the root of the sources ? There's a procedure for SQL Server (not express)

antoine
Apr 4, 2009 at 6:08 PM
Yeah I saw that.  Is that the way the SQL gets set up?  Attaching the MDF and creating the login?
In every other production type database driven application, there was usually a .sql script that created a fresh database.

If this is the way, then I will give these instructions to my DBA.

Thanks,
--Jeff
Apr 7, 2009 at 12:45 AM
Alright!  I attached this database to a production MS SQL 2005 instance and I am able to connect.  Now I am getting this error... any ideas?

System.InvalidOperationException: Sequence contains no elements

Line 119:            //_Setup = Cache[Profile.UserName] as UserPageSetup;
Line 120:            //if( noCache || null == _Setup )
Line 121: _Setup = new DashboardFacade(Profile.UserName).LoadUserSetup(pageTitle);Line 122:        }
Line 123:

Source File: c:\Documents and Settings\jkershner\Desktop\Dropthings-Src-v1.7.0\Dropthings-Src\Dropthings\Default.aspx.cs    Line: 121 

Stack Trace:

[InvalidOperationException: Sequence contains no elements]
   System.Data.Linq.SqlClient.SqlProvider.Execute(Expression query, QueryInfo queryInfo, IObjectReaderFactory factory, Object[] parentArgs, Object[] userArgs, ICompiledSubQuery[] subQueries, Object lastResult) +847
   System.Data.Linq.SqlClient.SqlProvider.ExecuteAll(Expression query, QueryInfo[] queryInfos, IObjectReaderFactory factory, Object[] userArguments, ICompiledSubQuery[] subQueries) +113
   System.Data.Linq.SqlClient.SqlProvider.System.Data.Linq.Provider.IProvider.Execute(Expression query) +344
   System.Data.Linq.DataQuery`1.System.Linq.IQueryProvider.Execute(Expression expression) +29
   System.Linq.Queryable.Single(IQueryable`1 source) +216
   DashboardBusiness.Activities.GetUserGuidActivity.Execute(ActivityExecutionContext executionContext) +650
   System.Workflow.ComponentModel.ActivityExecutor`1.Execute(T activity, ActivityExecutionContext executionContext) +42
   System.Workflow.ComponentModel.ActivityExecutor`1.Execute(Activity activity, ActivityExecutionContext executionContext) +49
   System.Workflow.ComponentModel.ActivityExecutorOperation.Run(IWorkflowCoreRuntime workflowCoreRuntime) +475
   System.Workflow.Runtime.Scheduler.Run() +373

[WorkflowException: Sequence contains no elements]
   DashboardBusiness.WorkflowHelper.ExecuteWorkflow(Type workflowType, Dictionary`2 properties) +315
   DashboardBusiness.DashboardFacade.LoadUserSetup(String pageTitle) +171
   _Default.LoadUserPageSetup(Boolean noCache) in c:\Documents and Settings\jkershner\Desktop\Dropthings-Src-v1.7.0\Dropthings-Src\Dropthings\Default.aspx.cs:121
   _Default.CreateChildControls() in c:\Documents and Settings\jkershner\Desktop\Dropthings-Src-v1.7.0\Dropthings-Src\Dropthings\Default.aspx.cs:81
   System.Web.UI.Control.EnsureChildControls() +87
   System.Web.UI.Control.PreRenderRecursiveInternal() +44
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +842
Apr 7, 2009 at 8:01 AM
Hello,

Did you read the other threads speaking about "Sequence contains no elements" ?
Apr 7, 2009 at 5:08 PM
Ah... sorry!

I cleared my browser cache and it all works now!  Thanks!