Installation: "SQL Network Interfaces, error: 50 - Local Database Runtime error occurred. The specified LocalDB instance does not exist."

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
3 years ago
nopCommerce version:
release-3.40

Steps to reproduce the problem:

I cloned the source, checked out 'release-3.40'. First attempt at installation was successful. But could not access admin as my secure password was lost in chrome password manager.

Deleted and recreated the '(localdb)\MSSQLLocalDB' using 'SqlLocalDB.exe'. No changes to the source checked out with tag. The initialization site will not load to reset installation.

Autofac.Core.DependencyResolutionException
  HResult=0x80131500
  Message=An exception was thrown while activating Nop.Data.Migrations.MigrationManager -> λ:FluentMigrator.Runner.IVersionLoader.
  Source=Autofac
  StackTrace:
   at Autofac.Core.Resolving.InstanceLookup.Activate(IEnumerable`1 parameters, Object& decoratorTarget)
   at Autofac.Core.Resolving.InstanceLookup.<>c__DisplayClass7_0.<Execute>b__0()
   at Autofac.Core.Lifetime.LifetimeScope.GetOrCreateAndShare(Guid id, Func`1 creator)
   at Autofac.Core.Resolving.InstanceLookup.Execute()
   at Autofac.Core.Resolving.ResolveOperation.GetOrCreateInstance(ISharingLifetimeScope currentOperationScope, ResolveRequest request)
   at Autofac.Core.Resolving.ResolveOperation.ResolveComponent(ResolveRequest request)
   at Autofac.Core.Resolving.ResolveOperation.Execute(ResolveRequest request)
   at Autofac.Core.Lifetime.LifetimeScope.ResolveComponent(ResolveRequest request)
   at Autofac.ResolutionExtensions.TryResolveService(IComponentContext context, Service service, IEnumerable`1 parameters, Object& instance)
   at Autofac.ResolutionExtensions.ResolveOptionalService(IComponentContext context, Service service, IEnumerable`1 parameters)
   at Autofac.ResolutionExtensions.ResolveOptional(IComponentContext context, Type serviceType, IEnumerable`1 parameters)
   at Autofac.ResolutionExtensions.ResolveOptional(IComponentContext context, Type serviceType)
   at Autofac.Extensions.DependencyInjection.AutofacServiceProvider.GetService(Type serviceType)
   at Nop.Core.Infrastructure.NopEngine.Resolve(Type type) in C:\Users\Parsley\git\nopCommerce\src\Libraries\Nop.Core\Infrastructure\NopEngine.cs:line 219
   at Nop.Core.Infrastructure.NopEngine.Resolve[T]() in C:\Users\Parsley\git\nopCommerce\src\Libraries\Nop.Core\Infrastructure\NopEngine.cs:line 206
   at Nop.Data.Mapping.FluentMigratorMetadataReader..ctor() in C:\Users\Parsley\git\nopCommerce\src\Libraries\Nop.Data\Mapping\FluentMigratorMetadataReader.cs:line 30
   at Nop.Data.BaseDataProvider.get_AdditionalSchema() in C:\Users\Parsley\git\nopCommerce\src\Libraries\Nop.Data\BaseDataProvider.cs:line 310
   at Nop.Data.BaseDataProvider.GetTable[TEntity]() in C:\Users\Parsley\git\nopCommerce\src\Libraries\Nop.Data\BaseDataProvider.cs:line 125
   at Nop.Data.EntityRepository`1.get_Entities() in C:\Users\Parsley\git\nopCommerce\src\Libraries\Nop.Data\EntityRepository.cs:line 183
   at Nop.Data.EntityRepository`1.get_Table() in C:\Users\Parsley\git\nopCommerce\src\Libraries\Nop.Data\EntityRepository.cs:line 178
   at Nop.Services.Stores.StoreService.GetAllStores() in C:\Users\Parsley\git\nopCommerce\src\Libraries\Nop.Services\Stores\StoreService.cs:line 61
   at Nop.Web.Framework.WebStoreContext.get_CurrentStore() in C:\Users\Parsley\git\nopCommerce\src\Presentation\Nop.Web.Framework\WebStoreContext.cs:line 64
   at Nop.Web.Framework.Infrastructure.SettingsSource.<>c__2`1.<BuildRegistration>b__2_0(IComponentContext c, IEnumerable`1 p) in C:\Users\Parsley\git\nopCommerce\src\Presentation\Nop.Web.Framework\Infrastructure\DependencyRegistrar.cs:line 327
   at Autofac.Builder.RegistrationBuilder.<>c__DisplayClass0_0`1.<ForDelegate>b__0(IComponentContext c, IEnumerable`1 p)
   at Autofac.Core.Activators.Delegate.DelegateActivator.ActivateInstance(IComponentContext context, IEnumerable`1 parameters)
   at Autofac.Core.Resolving.InstanceLookup.Activate(IEnumerable`1 parameters, Object& decoratorTarget)

Inner Exception 1:
SqlException: A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 50 - Local Database Runtime error occurred. The specified LocalDB instance does not exist.
)

Inner Exception 2:
Win32Exception: Unknown error (0x89c50107)
3 years ago
Renaming 'src/Presentation/Nop.Web/App_data/dataSettings.json' to 'old.dataSettings.json' fixed the issue.

The file was not included in the solution inside of Visual Studio. Had to open the directory in File Explorer.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.