Seems like the collapse function in "Insert code" doesn't work.
Application error log:
Event code: 3008
Event message: A configuration error has occurred.
Event time: 2014-10-01 13:48:25
Event time (UTC): 2014-10-01 11:48:25
Event ID: 5887c030f42b49eba568f05e9240f9b1
Event sequence: 1
Event occurrence: 1
Event detail code: 0
Application information:
Application domain: /LM/W3SVC/6/ROOT-7-130566377036628360
Trust level: Full
Application Virtual Path: /
Application Path: C:\projects\proj\proj\
Machine name: machinename
Process information:
Process ID: 4052
Process name: w3wp.exe
Account name: IIS APPPOOL\proj
Exception information:
Exception type: InvalidOperationException
Exception message: The pre-application start initialization method Start on type WebMatrix.WebData.PreApplicationStartCode threw an exception with the following error message: Exception has been thrown by the target of an invocation. (C:\projects\proj\proj\web.config line 187).
at System.Web.Compilation.BuildManager.InvokePreStartInitMethodsCore(ICollection`1 methods, Func`1 setHostingEnvironmentCultures)
at System.Web.Compilation.BuildManager.InvokePreStartInitMethods(ICollection`1 methods)
at System.Web.Compilation.BuildManager.CallPreStartInitMethods(String preStartInitListPath, Boolean& isRefAssemblyLoaded)
at System.Web.Compilation.BuildManager.ExecutePreAppStart()
at System.Web.Hosting.HostingEnvironment.Initialize(ApplicationManager appManager, IApplicationHost appHost, IConfigMapPathFactory configMapPathFactory, HostingEnvironmentParameters hostingParameters, PolicyLevel policyLevel, Exception appDomainCreationException)
Exception has been thrown by the target of an invocation. (C:\projects\proj\proj\web.config line 187)
at System.Web.Configuration.ProvidersHelper.InstantiateProvider(ProviderSettings providerSettings, Type providerType)
at System.Web.Configuration.ProvidersHelper.InstantiateProviders(ProviderSettingsCollection configProviders, ProviderCollection providers, Type providerType)
at System.Web.Security.Membership.InitializeSettings(Boolean initializeGeneralSettings, RuntimeConfig appConfig, MembershipSection settings)
at System.Web.Security.Membership.Initialize()
at System.Web.Security.Membership.get_Providers()
at WebMatrix.WebData.WebSecurity.PreAppStartInit()
at WebMatrix.WebData.PreApplicationStartCode.Start()
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 System.Web.Configuration.ProvidersHelper.InstantiateProvider(ProviderSettings providerSettings, Type providerType)
Activation error occurred while trying to get instance of type SynchronizingUserService, key ""
at EPiServer.ServiceLocation.ServiceLocatorImplBase.GetInstance(Type serviceType, String key)
at EPiServer.ServiceLocation.ServiceLocatorImplBase.GetInstance[TService]()
at EPiServer.Security.WindowsMembershipProvider..ctor()
StructureMap Exception Code: 207
Internal exception while creating Instance 'a0ce6497-721d-4aa5-8ecb-39df9b2dc90f' of PluginType EPiServer.Security.SynchronizingUserService. Check the inner exception for more details.
at StructureMap.Pipeline.ConstructorInstance.Build(Type pluginType, BuildSession session, IInstanceBuilder builder)
at StructureMap.Pipeline.Instance.createRawObject(Type pluginType, BuildSession session)
at StructureMap.Pipeline.Instance.Build(Type pluginType, BuildSession session)
at StructureMap.Pipeline.ObjectBuilder.Resolve(Type pluginType, Instance instance, BuildSession session)
at StructureMap.BuildSession.CreateInstance(Type pluginType, Instance instance)
at StructureMap.BuildSession.CreateInstance(Type pluginType)
at EPiServer.ServiceLocation.ServiceLocatorImplBase.GetInstance(Type serviceType, String key)
Activation error occurred while trying to get instance of type ServiceAccessor`1, key ""
at EPiServer.ServiceLocation.ServiceLocatorImplBase.GetInstance(Type serviceType, String key)
at EPiServer.ServiceLocation.ServiceLocatorImplBase.GetInstance[TService]()
at EPiServer.Security.SynchronizingUserService..ctor()
at lambda_method(Closure , IArguments )
at StructureMap.Construction.BuilderCompiler.FuncCompiler`1.<>c__DisplayClass2.b__0(IArguments args)
at StructureMap.Construction.InstanceBuilder.BuildInstance(IArguments args)
at StructureMap.Pipeline.ConstructorInstance.Build(Type pluginType, BuildSession session, IInstanceBuilder builder)
StructureMap Exception Code: 202
No Default Instance defined for PluginFamily EPiServer.ServiceLocation.ServiceAccessor`1[[EPiServer.DataAccess.WindowsProviderDB, EPiServer, Version=7.14.0.0, Culture=neutral, PublicKeyToken=8fe83dea738b45b7]], EPiServer.Framework, Version=7.14.0.0, Culture=neutral, PublicKeyToken=8fe83dea738b45b7
at StructureMap.BuildSession.<.ctor>b__0(Type t)
at StructureMap.Util.Cache`2.get_Item(KEY key)
at StructureMap.BuildSession.CreateInstance(Type pluginType)
at EPiServer.ServiceLocation.ServiceLocatorImplBase.GetInstance(Type serviceType, String key)
Request information:
Request URL: http://localhost:17331/
Request path: /
User host address: ::1
User:
Is authenticated: False
Authentication Type:
Thread account name: IIS APPPOOL\proj
Thread information:
Thread ID: 108
Thread account name: IIS APPPOOL\proj
Is impersonating: False
Stack trace: at System.Web.Compilation.BuildManager.InvokePreStartInitMethodsCore(ICollection`1 methods, Func`1 setHostingEnvironmentCultures)
at System.Web.Compilation.BuildManager.InvokePreStartInitMethods(ICollection`1 methods)
at System.Web.Compilation.BuildManager.CallPreStartInitMethods(String preStartInitListPath, Boolean& isRefAssemblyLoaded)
at System.Web.Compilation.BuildManager.ExecutePreAppStart()
at System.Web.Hosting.HostingEnvironment.Initialize(ApplicationManager appManager, IApplicationHost appHost, IConfigMapPathFactory configMapPathFactory, HostingEnvironmentParameters hostingParameters, PolicyLevel policyLevel, Exception appDomainCreationException)
Custom event details:
>
It seems like the code in WebMatrix.WebData.PreApplicationStartCode accesses the membership provider very early in the application startup (it has probably a PreApplicationStartMethod assembly attribute). And since the WindowsMembershipProvider has dependencys that it expects from IOC container it fails to instantiate (since at this early stage the IOC container is not poulated).
I will report a bug and see if we can get rid of IOC dependency from the provider.
But for you: Do you have a nuget package WebMatrix.WebData, if so do you need it, it seems to have been replaced, see https://www.nuget.org/packages/WebMatrix.WebData/??
Fix is out in CMS.Core 7.15:
http://world.episerver.com/Documentation/Release-Notes/ReleaseNote/?releaseNoteId=118068
After update from 7.5 to 7.6 i get the following error when i run my project:
If i comment the line in web.config and use Sql as role/membership-provider it works.
Web.config:
Application error log:
I would appreciate any thoughts about this.