Try our conversational search powered by Generative AI!

Episerver Access Error

Vote:
 

I have been trying to troubleshoot the following error for a week and I am out of ideas.  Can anybody help?  I went to the windows application log and it didn't provide any other details

System.Data.SqlClient.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. Cannot create an automatic instance. See the Windows Application event log for error details.

Here is the event log

Event code: 3005
Event message: An unhandled exception has occurred.
Event time: 12/12/2016 1:30:55 PM
Event time (UTC): 12/12/2016 7:30:55 PM
Event ID: d82d7a1cadb64e4aabef64dd853fcdb8
Event sequence: 10
Event occurrence: 1
Event detail code: 0

Application information:
Application domain: /LM/W3SVC/3/ROOT-2-131260445706700599
Trust level: Full
Application Virtual Path: /
Application Path: 
Machine name: EGVIT143

Process information:
Process ID: 23276
Process name: w3wp.exe
Account name: 

Exception information:
Exception type: StructureMapBuildException
Exception message: Error while building type EPiServer.Shell.ViewComposition.DefaultViewManager. See the inner exception for details
1.) new DefaultViewManager(Enumerable of EPiServer.Shell.ViewComposition.IViewProvider with all registered instances, Enumerable of EPiServer.Shell.ViewComposition.IViewTransformer with all registered instances, *Default of IComponentManager*)
2.) EPiServer.Shell.ViewComposition.DefaultViewManager
3.) Instance of EPiServer.Shell.ViewComposition.IViewManager (EPiServer.Shell.ViewComposition.DefaultViewManager)
4.) new Bootstrapper(*Default of IViewManager*, *Default of ModuleTable*, *Default of IClientResourceService*)
5.) EPiServer.Shell.UI.Bootstrapper
6.) Instance of EPiServer.Shell.Web.Mvc.IBootstrapper (EPiServer.Shell.UI.Bootstrapper)
7.) new EPiDashboardController(*Default of IBootstrapper*)
8.) EPiServer.Shell.UI.Controllers.EPiDashboardController
9.) Instance of EPiServer.Shell.UI.Controllers.EPiDashboardController
10.) Container.GetInstance(EPiServer.Shell.UI.Controllers.EPiDashboardController)

at lambda_method(Closure , IBuildSession , IContext )
at StructureMap.Building.BuildPlan.Build(IBuildSession session, IContext context) in c:\BuildAgent\work\a395dbde6b793293\src\StructureMap\Building\BuildPlan.cs:line 151
at StructureMap.BuildSession.BuildNewInSession(Type pluginType, Instance instance) in c:\BuildAgent\work\a395dbde6b793293\src\StructureMap\BuildSession.cs:line 114
at StructureMap.Pipeline.NulloTransientCache.Get(Type pluginType, Instance instance, IBuildSession session) in c:\BuildAgent\work\a395dbde6b793293\src\StructureMap\Pipeline\NulloTransientCache.cs:line 28
at StructureMap.BuildSession.ResolveFromLifecycle(Type pluginType, Instance instance) in c:\BuildAgent\work\a395dbde6b793293\src\StructureMap\BuildSession.cs:line 103
at StructureMap.SessionCache.GetObject(Type pluginType, Instance instance, ILifecycle lifecycle) in c:\BuildAgent\work\a395dbde6b793293\src\StructureMap\SessionCache.cs:line 93
at StructureMap.SessionCache.GetDefault(Type pluginType, IPipelineGraph pipelineGraph) in c:\BuildAgent\work\a395dbde6b793293\src\StructureMap\SessionCache.cs:line 68
at StructureMap.Container.GetInstance(Type pluginType) in c:\BuildAgent\work\a395dbde6b793293\src\StructureMap\Container.cs:line 337
at EPiServer.ServiceLocation.StructureMapServiceLocator.DoGetInstance(Type serviceType, String key)
at EPiServer.ServiceLocation.ServiceLocatorImplBase.GetInstance(Type serviceType, String key)

Exception has been thrown by the target of an invocation.
at System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandleInternal& ctor, Boolean& bNeedSecurityCheck)
at System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark& stackMark)
at System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark& stackMark)
at System.Activator.CreateInstance(Type type, Boolean nonPublic)
at System.Activator.CreateInstance(Type type)
at EPiServer.Shell.ViewComposition.ComponentAttribute.CreateComponentDefinition(Type attributedType)
at EPiServer.Shell.ViewComposition.AttributedComponentProvider.<>c.b__5_2(<>f__AnonymousType3`2 cat)
at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext()
at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)
at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
at EPiServer.Shell.ViewComposition.AttributedComponentProvider.GetComponentDefinitions()
at EPiServer.Shell.ViewComposition.ComponentManager.ListAll()
at EPiServer.Shell.ViewComposition.DefaultViewManager..ctor(IEnumerable`1 viewProviders, IEnumerable`1 viewTransformers, IComponentManager componentManager)
at lambda_method(Closure , IBuildSession , IContext )

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. Cannot create an automatic instance. See the Windows Application event log for error details.
)
at System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, UInt32 waitForMultipleObjectsTimeout, Boolean allowCreate, Boolean onlyOneCheckConnection, DbConnectionOptions userOptions, DbConnectionInternal& connection)
at System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal& connection)
at System.Data.ProviderBase.DbConnectionFactory.TryGetConnection(DbConnection owningConnection, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal oldConnection, DbConnectionInternal& connection)
at System.Data.ProviderBase.DbConnectionInternal.TryOpenConnectionInternal(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions)
at System.Data.ProviderBase.DbConnectionClosed.TryOpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions)
at System.Data.SqlClient.SqlConnection.TryOpenInner(TaskCompletionSource`1 retry)
at System.Data.SqlClient.SqlConnection.TryOpen(TaskCompletionSource`1 retry)
at System.Data.SqlClient.SqlConnection.Open()
at EPiServer.Data.Providers.Internal.ConnectionContext.b__15_0()
at EPiServer.Data.Providers.SqlTransientErrorsRetryPolicy.Execute[TResult](Func`1 method)
at EPiServer.Data.Providers.Internal.ConnectionContext.OpenConnection()
at EPiServer.Data.Providers.Internal.SqlDatabaseHandler.GetConnection(Boolean requireTransaction)
at EPiServer.Data.Providers.Internal.SqlDatabaseHandler.<>c__DisplayClass28_0`1.b__0()
at EPiServer.Data.Providers.SqlTransientErrorsRetryPolicy.Execute[TResult](Func`1 method)
at EPiServer.Data.Providers.Internal.SqlDatabaseHandler.Execute[TResult](Func`1 action)
at EPiServer.Data.Providers.Internal.SqlDatabaseHandler.Execute(Action action)
at EPiServer.DataAccess.Internal.SiteConfigDB.GetValues(String name)
at EPiServer.DataAccess.Internal.SiteConfigDB.GetValue(String siteId, String name)
at EPiServer.DataAbstraction.Internal.SiteConfigurationRepository.GetValue(String siteId, String key)
at EPiServer.Cms.Shell.UI.Rest.Projects.Internal.ProjectLoaderService.GetProjectModeSettingFromSiteConfiguration()
at EPiServer.Cms.Shell.UI.Rest.Projects.Internal.ProjectLoaderService.get_IsProjectModeEnabled()
at EPiServer.Cms.Shell.UI.Components.ProjectChangesComponent..ctor()



Request information:
Request URL: https://domain:443/episerver
Request path: /episerver
User host address: 127.0.0.1
User:
Is authenticated: False
Authentication Type:
Thread account name: 

Thread information:
Thread ID: 621
Thread account name:  
Is impersonating: False
Stack trace: at lambda_method(Closure , IBuildSession , IContext )
at StructureMap.Building.BuildPlan.Build(IBuildSession session, IContext context) in c:\BuildAgent\work\a395dbde6b793293\src\StructureMap\Building\BuildPlan.cs:line 151
at StructureMap.BuildSession.BuildNewInSession(Type pluginType, Instance instance) in c:\BuildAgent\work\a395dbde6b793293\src\StructureMap\BuildSession.cs:line 114
at StructureMap.Pipeline.NulloTransientCache.Get(Type pluginType, Instance instance, IBuildSession session) in c:\BuildAgent\work\a395dbde6b793293\src\StructureMap\Pipeline\NulloTransientCache.cs:line 28
at StructureMap.BuildSession.ResolveFromLifecycle(Type pluginType, Instance instance) in c:\BuildAgent\work\a395dbde6b793293\src\StructureMap\BuildSession.cs:line 103
at StructureMap.SessionCache.GetObject(Type pluginType, Instance instance, ILifecycle lifecycle) in c:\BuildAgent\work\a395dbde6b793293\src\StructureMap\SessionCache.cs:line 93
at StructureMap.SessionCache.GetDefault(Type pluginType, IPipelineGraph pipelineGraph) in c:\BuildAgent\work\a395dbde6b793293\src\StructureMap\SessionCache.cs:line 68
at StructureMap.Container.GetInstance(Type pluginType) in c:\BuildAgent\work\a395dbde6b793293\src\StructureMap\Container.cs:line 337
at EPiServer.ServiceLocation.StructureMapServiceLocator.DoGetInstance(Type serviceType, String key)
at EPiServer.ServiceLocation.ServiceLocatorImplBase.GetInstance(Type serviceType, String key)


Custom event details:

#172803
Dec 12, 2016 20:42
Vote:
 

Episerver can't reach database. Probably wrong connection string.

#172825
Dec 13, 2016 9:29
Vote:
 

The connection string wasn't an issue, it turned out to be that somehow the connection itself was corrupted.  I had to detach the database and reconnect in order for it to work.

#173049
Dec 13, 2016 15:02
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.