Inhalte aufrufen

Profilbild

Error on production server


8 Antworten zu diesem Thema

#1 vagelis

vagelis

    Advanced Member

  • Members
  • 73 Beiträge

Geschrieben: 15 January 2018 - 00:03

I've tried to moved local installation to production server, I've done a db restore, change the settings.txt and I get this message. Could anyone help?

 

Database migration failed because the target database does not exist. Ensure the database was initialized and seeded with the 'InstallDatabaseInitializer'.

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.InvalidOperationException: Database migration failed because the target database does not exist. Ensure the database was initialized and seeded with the 'InstallDatabaseInitializer'.

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.

 



#2 vagelis

vagelis

    Advanced Member

  • Members
  • 73 Beiträge

Geschrieben: 15 January 2018 - 00:36

here is the full error

 

Server Error in '/' Application. Database migration failed because the target database does not exist. Ensure the database was initialized and seeded with the 'InstallDatabaseInitializer'.

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.InvalidOperationException: Database migration failed because the target database does not exist. Ensure the database was initialized and seeded with the 'InstallDatabaseInitializer'.

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:

 

[InvalidOperationException: Database migration failed because the target database does not exist. Ensure the database was initialized and seeded with the 'InstallDatabaseInitializer'.]
   SmartStore.Data.Setup.MigrateDatabaseInitializer`2.InitializeDatabase(TContext context) +374
   System.Data.Entity.Internal.<>c__DisplayClassf`1.<CreateInitializationAction>b__e() +76
   System.Data.Entity.Internal.InternalContext.PerformInitializationAction(Action action) +60
   System.Data.Entity.Internal.InternalContext.PerformDatabaseInitialization() +357
   System.Data.Entity.Internal.LazyInternalContext.<InitializeDatabase>b__4(InternalContext c) +7
   System.Data.Entity.Internal.RetryAction`1.PerformAction(TInput input) +111
   System.Data.Entity.Internal.LazyInternalContext.InitializeDatabaseAction(Action`1 action) +198
   System.Data.Entity.Internal.LazyInternalContext.InitializeDatabase() +73
   System.Data.Entity.Internal.InternalContext.ForceOSpaceLoadingForKnownEntityTypes() +60
   System.Data.Entity.DbContext.System.Data.Entity.Infrastructure.IObjectContextAdapter.get_ObjectContext() +25
   SmartStore.Data.ObjectContextBase..ctor(String nameOrConnectionString, String alias) +70
   SmartStore.Web.Framework.<>c.<Load>b__2_6(IComponentContext c) +35
   Autofac.<>c__DisplayClass5_0`1.<Register>b__0(IComponentContext c, IEnumerable`1 p) +10
   Autofac.Builder.<>c__DisplayClass0_0`1.<ForDelegate>b__0(IComponentContext c, IEnumerable`1 p) +14
   Autofac.Core.Activators.Delegate.DelegateActivator.ActivateInstance(IComponentContext context, IEnumerable`1 parameters) +32
   Autofac.Core.Resolving.InstanceLookup.Activate(IEnumerable`1 parameters) +66

[DependencyResolutionException: An error occurred during the activation of a particular registration. See the inner exception for details. Registration: Activator = IDbContext (DelegateActivator), Services = [SmartStore.Core.Data.IDbContext], Lifetime = Autofac.Core.Lifetime.MatchingScopeLifetime, Sharing = Shared, Ownership = OwnedByLifetimeScope ---> Database migration failed because the target database does not exist. Ensure the database was initialized and seeded with the 'InstallDatabaseInitializer'. (See inner exception for details.)]
   Autofac.Core.Resolving.InstanceLookup.Activate(IEnumerable`1 parameters) +184
   Autofac.Core.Resolving.InstanceLookup.<Execute>b__5_0() +8
   Autofac.Core.Lifetime.LifetimeScope.GetOrCreateAndShare(Guid id, Func`1 creator) +121
   Autofac.Core.Resolving.InstanceLookup.Execute() +116
   Autofac.Core.Resolving.ResolveOperation.GetOrCreateInstance(ISharingLifetimeScope currentOperationScope, IComponentRegistration registration, IEnumerable`1 parameters) +134
   Autofac.Core.Resolving.InstanceLookup.ResolveComponent(IComponentRegistration registration, IEnumerable`1 parameters) +24
   Autofac.Core.Activators.Reflection.<>c__DisplayClass0_0.<CanSupplyValue>b__0() +25
   Autofac.Core.Activators.Reflection.ConstructorParameterBinding.Instantiate() +94
   Autofac.Core.Activators.Reflection.ReflectionActivator.ActivateInstance(IComponentContext context, IEnumerable`1 parameters) +66
   Autofac.Core.Resolving.InstanceLookup.Activate(IEnumerable`1 parameters) +66

[DependencyResolutionException: An error occurred during the activation of a particular registration. See the inner exception for details. Registration: Activator = EfRepository`1 (ReflectionActivator), Services = [SmartStore.Core.Data.IRepository`1[[SmartStore.Core.Domain.Customers.Customer, SmartStore.Core, Version=3.0.3.0, Culture=neutral, PublicKeyToken=null]]], Lifetime = Autofac.Core.Lifetime.MatchingScopeLifetime, Sharing = Shared, Ownership = OwnedByLifetimeScope ---> An error occurred during the activation of a particular registration. See the inner exception for details. Registration: Activator = IDbContext (DelegateActivator), Services = [SmartStore.Core.Data.IDbContext], Lifetime = Autofac.Core.Lifetime.MatchingScopeLifetime, Sharing = Shared, Ownership = OwnedByLifetimeScope ---> Database migration failed because the target database does not exist. Ensure the database was initialized and seeded with the 'InstallDatabaseInitializer'. (See inner exception for details.) (See inner exception for details.)]
   Autofac.Core.Resolving.InstanceLookup.Activate(IEnumerable`1 parameters) +184
   Autofac.Core.Resolving.InstanceLookup.<Execute>b__5_0() +8
   Autofac.Core.Lifetime.LifetimeScope.GetOrCreateAndShare(Guid id, Func`1 creator) +121
   Autofac.Core.Resolving.InstanceLookup.Execute() +116
   Autofac.Core.Resolving.ResolveOperation.GetOrCreateInstance(ISharingLifetimeScope currentOperationScope, IComponentRegistration registration, IEnumerable`1 parameters) +134
   Autofac.Core.Resolving.InstanceLookup.ResolveComponent(IComponentRegistration registration, IEnumerable`1 parameters) +24
   Autofac.Core.Activators.Reflection.<>c__DisplayClass0_0.<CanSupplyValue>b__0() +25
   Autofac.Core.Activators.Reflection.ConstructorParameterBinding.Instantiate() +94
   Autofac.Core.Activators.Reflection.ReflectionActivator.ActivateInstance(IComponentContext context, IEnumerable`1 parameters) +66
   Autofac.Core.Resolving.InstanceLookup.Activate(IEnumerable`1 parameters) +66

[DependencyResolutionException: An error occurred during the activation of a particular registration. See the inner exception for details. Registration: Activator = CustomerService (ReflectionActivator), Services = [SmartStore.Services.Customers.ICustomerService], Lifetime = Autofac.Core.Lifetime.MatchingScopeLifetime, Sharing = Shared, Ownership = OwnedByLifetimeScope ---> An error occurred during the activation of a particular registration. See the inner exception for details. Registration: Activator = EfRepository`1 (ReflectionActivator), Services = [SmartStore.Core.Data.IRepository`1[[SmartStore.Core.Domain.Customers.Customer, SmartStore.Core, Version=3.0.3.0, Culture=neutral, PublicKeyToken=null]]], Lifetime = Autofac.Core.Lifetime.MatchingScopeLifetime, Sharing = Shared, Ownership = OwnedByLifetimeScope ---> An error occurred during the activation of a particular registration. See the inner exception for details. Registration: Activator = IDbContext (DelegateActivator), Services = [SmartStore.Core.Data.IDbContext], Lifetime = Autofac.Core.Lifetime.MatchingScopeLifetime, Sharing = Shared, Ownership = OwnedByLifetimeScope ---> Database migration failed because the target database does not exist. Ensure the database was initialized and seeded with the 'InstallDatabaseInitializer'. (See inner exception for details.) (See inner exception for details.) (See inner exception for details.)]
   Autofac.Core.Resolving.InstanceLookup.Activate(IEnumerable`1 parameters) +184
   Autofac.Core.Resolving.InstanceLookup.<Execute>b__5_0() +8
   Autofac.Core.Lifetime.LifetimeScope.GetOrCreateAndShare(Guid id, Func`1 creator) +121
   Autofac.Core.Resolving.InstanceLookup.Execute() +116
   Autofac.Core.Resolving.ResolveOperation.GetOrCreateInstance(ISharingLifetimeScope currentOperationScope, IComponentRegistration registration, IEnumerable`1 parameters) +134
   Autofac.Core.Resolving.InstanceLookup.ResolveComponent(IComponentRegistration registration, IEnumerable`1 parameters) +24
   Autofac.Core.Activators.Reflection.<>c__DisplayClass0_0.<CanSupplyValue>b__0() +25
   Autofac.Core.Activators.Reflection.ConstructorParameterBinding.Instantiate() +94
   Autofac.Core.Activators.Reflection.ReflectionActivator.ActivateInstance(IComponentContext context, IEnumerable`1 parameters) +66
   Autofac.Core.Resolving.InstanceLookup.Activate(IEnumerable`1 parameters) +66

[DependencyResolutionException: An error occurred during the activation of a particular registration. See the inner exception for details. Registration: Activator = WebWorkContext (ReflectionActivator), Services = [SmartStore.Core.IWorkContext], Lifetime = Autofac.Core.Lifetime.MatchingScopeLifetime, Sharing = Shared, Ownership = OwnedByLifetimeScope ---> An error occurred during the activation of a particular registration. See the inner exception for details. Registration: Activator = CustomerService (ReflectionActivator), Services = [SmartStore.Services.Customers.ICustomerService], Lifetime = Autofac.Core.Lifetime.MatchingScopeLifetime, Sharing = Shared, Ownership = OwnedByLifetimeScope ---> An error occurred during the activation of a particular registration. See the inner exception for details. Registration: Activator = EfRepository`1 (ReflectionActivator), Services = [SmartStore.Core.Data.IRepository`1[[SmartStore.Core.Domain.Customers.Customer, SmartStore.Core, Version=3.0.3.0, Culture=neutral, PublicKeyToken=null]]], Lifetime = Autofac.Core.Lifetime.MatchingScopeLifetime, Sharing = Shared, Ownership = OwnedByLifetimeScope ---> An error occurred during the activation of a particular registration. See the inner exception for details. Registration: Activator = IDbContext (DelegateActivator), Services = [SmartStore.Core.Data.IDbContext], Lifetime = Autofac.Core.Lifetime.MatchingScopeLifetime, Sharing = Shared, Ownership = OwnedByLifetimeScope ---> Database migration failed because the target database does not exist. Ensure the database was initialized and seeded with the 'InstallDatabaseInitializer'. (See inner exception for details.) (See inner exception for details.) (See inner exception for details.) (See inner exception for details.)]
   Autofac.Core.Resolving.InstanceLookup.Activate(IEnumerable`1 parameters) +184
   Autofac.Core.Resolving.InstanceLookup.<Execute>b__5_0() +8
   Autofac.Core.Lifetime.LifetimeScope.GetOrCreateAndShare(Guid id, Func`1 creator) +121
   Autofac.Core.Resolving.InstanceLookup.Execute() +116
   Autofac.Core.Resolving.ResolveOperation.GetOrCreateInstance(ISharingLifetimeScope currentOperationScope, IComponentRegistration registration, IEnumerable`1 parameters) +134
   Autofac.Core.Resolving.ResolveOperation.Execute(IComponentRegistration registration, IEnumerable`1 parameters) +64
   Autofac.Core.Lifetime.LifetimeScope.ResolveComponent(IComponentRegistration registration, IEnumerable`1 parameters) +109
   Autofac.Features.LazyDependencies.<>c__DisplayClass5_0`1.<CreateLazyRegistration>b__1() +23
   System.Lazy`1.CreateValue() +413
   System.Lazy`1.LazyInitValue() +372
   System.Lazy`1.get_Value() +133
   SmartStore.Web.Framework.Localization.SetWorkingCultureAttribute.OnAuthorization(AuthorizationContext filterContext) +102
   System.Web.Mvc.ControllerActionInvoker.InvokeAuthorizationFilters(ControllerContext controllerContext, IList`1 filters, ActionDescriptor actionDescriptor) +97
   System.Web.Mvc.Async.<>c__DisplayClass21.<BeginInvokeAction>b__19(AsyncCallback asyncCallback, Object asyncState) +743
   System.Web.Mvc.Async.WrappedAsyncResult`1.CallBeginDelegate(AsyncCallback callback, Object callbackState) +14
   System.Web.Mvc.Async.WrappedAsyncResultBase`1.Begin(AsyncCallback callback, Object state, Int32 timeout) +129
   System.Web.Mvc.Async.AsyncControllerActionInvoker.BeginInvokeAction(ControllerContext controllerContext, String actionName, AsyncCallback callback, Object state) +343
   System.Web.Mvc.Controller.<BeginExecuteCore>b__1c(AsyncCallback asyncCallback, Object asyncState, ExecuteCoreState innerState) +25
   System.Web.Mvc.Async.WrappedAsyncVoid`1.CallBeginDelegate(AsyncCallback callback, Object callbackState) +30
   System.Web.Mvc.Async.WrappedAsyncResultBase`1.Begin(AsyncCallback callback, Object state, Int32 timeout) +129
   System.Web.Mvc.Controller.BeginExecuteCore(AsyncCallback callback, Object state) +465
   System.Web.Mvc.Controller.<BeginExecute>b__14(AsyncCallback asyncCallback, Object callbackState, Controller controller) +18
   System.Web.Mvc.Async.WrappedAsyncVoid`1.CallBeginDelegate(AsyncCallback callback, Object callbackState) +20
   System.Web.Mvc.Async.WrappedAsyncResultBase`1.Begin(AsyncCallback callback, Object state, Int32 timeout) +129
   System.Web.Mvc.Controller.BeginExecute(RequestContext requestContext, AsyncCallback callback, Object state) +374
   System.Web.Mvc.Controller.System.Web.Mvc.Async.IAsyncController.BeginExecute(RequestContext requestContext, AsyncCallback callback, Object state) +16
   System.Web.Mvc.MvcHandler.<BeginProcessRequest>b__4(AsyncCallback asyncCallback, Object asyncState, ProcessRequestState innerState) +52
   System.Web.Mvc.Async.WrappedAsyncVoid`1.CallBeginDelegate(AsyncCallback callback, Object callbackState) +30
   System.Web.Mvc.Async.WrappedAsyncResultBase`1.Begin(AsyncCallback callback, Object state, Int32 timeout) +129
   System.Web.Mvc.MvcHandler.BeginProcessRequest(HttpContextBase httpContext, AsyncCallback callback, Object state) +384
   System.Web.Mvc.MvcHandler.BeginProcessRequest(HttpContext httpContext, AsyncCallback callback, Object state) +48
   System.Web.Mvc.MvcHandler.System.Web.IHttpAsyncHandler.BeginProcessRequest(HttpContext context, AsyncCallback cb, Object extraData) +16
   System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +444
   System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step) +132
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +163

 

Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.7.2558.0              



#3 Wolfgang Schmerge

Wolfgang Schmerge

    SmartStore AG

  • Administrators
  • 1904 Beiträge

Geschrieben: 15 January 2018 - 07:59

Hi,

 

please check the entries in the settings.txt.

There will be something wrong.

 

Regards

 

Wolfgang


Viele zusätzliche SmartStore.NET Plugins gibt es im MARKETPLACE:
http://community.sma...dex.php?/files/

 

Die deutsche SmartStore.NET Online-Dokumentation gibt es hier:
http://docs.smartsto...display/smnetde

In dem folgenden BLOG findet man interessante Tipps & Tricks zum Thema "SmartStore.NET":

http://community.sma...t-tipps-tricks/

 


#4 vagelis

vagelis

    Advanced Member

  • Members
  • 73 Beiträge

Geschrieben: 15 January 2018 - 08:57

Here is the Settings.txt I have
 
AppVersion: 3.0.3.0
DataProvider: sqlserver
DataConnectionString: Data Source=210.xxx.xxx.xxx;Initial Catalog=DBNAME;Integrated Security=False;Persist Security Info=False;User ID=USERNAME;Password=MYPASS;Enlist=False;Pooling=True;Min Pool Size=1;Max Pool Size=100;Connect Timeout=15;User Instance=False
 
 
I have some other application that works with the same connection string settings. Is there anything else to check?
 
  <connectionStrings>
    <clear />
    <add name="SQLconnect" connectionString="Data Source=210.xxx.xxx.xxx;initial catalog=DBNAME;user ID=USERNAME;password=MYPASS" providerName="System.Data.SqlClient" />
  </connectionStrings>


#5 vagelis

vagelis

    Advanced Member

  • Members
  • 73 Beiträge

Geschrieben: 15 January 2018 - 09:50

I've checked the credentials by SQL Management Studio and I can connect ok, so settings in connection string is ok.



#6 Artar

Artar

    SmartStore AG

  • Administrators
  • 910 Beiträge

Geschrieben: 15 January 2018 - 11:46

put in the instance name as data source.


Zihni Artar
SmartStore AG


#7 vagelis

vagelis

    Advanced Member

  • Members
  • 73 Beiträge

Geschrieben: 15 January 2018 - 12:10

Hello,

 

I don't understand where to put the instance name as data resource in the above connection string. Could you please post an example?



#8 Artar

Artar

    SmartStore AG

  • Administrators
  • 910 Beiträge

Geschrieben: 15 January 2018 - 12:16

instead of the ip address, you put in the instance name

 

AppVersion: 3.0.3.0
DataProvider: sqlserver
DataConnectionString: Data Source=210.xxx.xxx.xxx;Initial Catalog=DBNAME;Integrated Security=False;Persist Security Info=False;User ID=USERNAME;Password=MYPASS;Enlist=False;Pooling=True;Min Pool Size=1;Max Pool Size=100;Connect Timeout=15;User Instance=False

Zihni Artar
SmartStore AG


#9 vagelis

vagelis

    Advanced Member

  • Members
  • 73 Beiträge

Geschrieben: 15 January 2018 - 13:01

Yes now with machine name it worked. Thanks for your valuable help





Auf dieses Thema antworten