Don't miss out Virtual Happy Hour this Friday (April 26).

Try our conversational search powered by Generative AI!

Cannot start site if profile is disabled

Found in

EPiServer.CMS.Core 9.3.0

Fixed in

EPiServer.CMS.Core 9.5.0

(Or a related package)

Created

Nov 27, 2015

Updated

Jun 27, 2018

Area

CMS Core

State

Closed, Fixed and tested


Description

If you disable a profile in the web.config, the site does not start.

    <profile enabled="false">
      <properties>
        <clear />
      </properties>
      <providers>
        <clear />
      </providers>
    </profile>

Here is the stack trace:

Profile has not been enabled.

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.Configuration.Provider.ProviderException: Profile has not been enabled.

Source Error:

[No relevant source lines]

Source File: c:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\root\4be7898c\928639af\App_global.asax.hdtjx1de.0.cs Line: 0

Stack Trace:

[ProviderException: Profile has not been enabled.]
System.Web.Profile.ProfileBase..ctor() +4325599
lambda_method(Closure , IBuildSession , IContext ) +134

[StructureMapBuildException: Error while building type System.Web.Profile.ProfileBase. See the inner exception for details
1.) new ProfileBase()
2.) System.Web.Profile.ProfileBase
3.) Instance of System.Web.Profile.ProfileBase
4.) new EPiServerProfile(Default of ProfileBase)
5.) EPiServer.Personalization.EPiServerProfile
6.) Instance of EPiServer.Notification.IQueryablePreference (EPiServer.Personalization.EPiServerProfile)
7.) new NotificationUserRepositoryImpl(Default of IQueryableNotificationUsers, Enumerable of EPiServer.Notification.INotificationProvider with all registered instances, Enumerable of EPiServer.Notification.IQueryablePreference with all registered instances)
8.) EPiServer.Notification.NotificationUserRepositoryImpl
9.) Instance of EPiServer.Notification.INotificationUserRepository (EPiServer.Notification.NotificationUserRepositoryImpl)
10.) new DefaultNotifier(Default of INotificationUserRepository, Default of INotificationRepository, Enumerable of EPiServer.Notification.INotificationFormatter with all registered instances, Default of QueryableNotificationUserService)
11.) EPiServer.Notification.DefaultNotifier
12.) Instance of EPiServer.Notification.INotifier (EPiServer.Notification.DefaultNotifier)
13.) new ProjectMessageNotifier(Default of INotifier, Default of ProjectActivityFeed, Default of ActivityCommentRepository, Default of IObjectSerializerFactory, Default of MentionParser, Default of ProjectService, Default of ISubscriptionService)
14.) EPiServer.Cms.Shell.UI.Notifications.ProjectMessageNotifier
15.) Instance of EPiServer.Cms.Shell.UI.Notifications.ProjectMessageNotifier
16.) Container.GetInstance(EPiServer.Cms.Shell.UI.Notifications.ProjectMessageNotifier)
]
lambda_method(Closure , IBuildSession , IContext ) +1430
StructureMap.Building.BuildPlan.Build(IBuildSession session, IContext context) in c:\BuildAgent\work\a395dbde6b793293\src\StructureMap\Building\BuildPlan.cs:151
StructureMap.Pipeline.LifecycleObjectCache.Get(Type pluginType, Instance instance, IBuildSession session) in c:\BuildAgent\work\a395dbde6b793293\src\StructureMap\Pipeline\LifecycleObjectCache.cs:71
StructureMap.SessionCache.GetObject(Type pluginType, Instance instance, ILifecycle lifecycle) in c:\BuildAgent\work\a395dbde6b793293\src\StructureMap\SessionCache.cs:93
StructureMap.SessionCache.GetDefault(Type pluginType, IPipelineGraph pipelineGraph) in c:\BuildAgent\work\a395dbde6b793293\src\StructureMap\SessionCache.cs:68
StructureMap.Container.GetInstance(Type pluginType) in c:\BuildAgent\work\a395dbde6b793293\src\StructureMap\Container.cs:337
EPiServer.ServiceLocation.ServiceLocatorImplBase.GetInstance(Type serviceType, String key) +55

[ActivationException: Activation error occurred while trying to get instance of type ProjectMessageNotifier, key ""]
EPiServer.ServiceLocation.ServiceLocatorImplBase.GetInstance(Type serviceType, String key) +156
EPiServer.ServiceLocation.ServiceLocatorImplBase.GetInstance() +62
EPiServer.Cms.Shell.InitializableModule.Initialize(InitializationEngine context) +269
EPiServer.Framework.Initialization.ModuleNode.Execute(Action a, String key) +56
EPiServer.Framework.Initialization.InitializationEngine.InitializeModules() +244

[InitializationException: Initialize action failed for Initialize on class EPiServer.Cms.Shell.InitializableModule, EPiServer.Cms.Shell.UI, Version=9.3.0.0, Culture=neutral, PublicKeyToken=8fe83dea738b45b7]
EPiServer.Framework.Initialization.InitializationEngine.InitializeModules() +750
EPiServer.Framework.Initialization.InitializationEngine.Initialize(HostType hostType) +158
EPiServer.Framework.Initialization.InitializationModule.Initialize(HostType hostType) +947
EPiServer.Framework.Initialization.InitializationModule.FrameworkInitialization(HostType hostType) +103
EPiServer.Global..ctor() +108
MySite.EPiServerApplication..ctor() +43
ASP.global_asax..ctor() in c:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\root\4be7898c\928639af\App_global.asax.hdtjx1de.0.cs:0

[TargetInvocationException: Exception has been thrown by the target of an invocation.]
System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandleInternal& ctor, Boolean& bNeedSecurityCheck) +0
System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark& stackMark) +138
System.Activator.CreateInstance(Type type, Boolean nonPublic) +105
System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes, StackCrawlMark& stackMark) +1528
System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes) +191
System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture) +27
System.Web.HttpRuntime.CreateNonPublicInstance(Type type, Object[] args) +82
System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context) +300
System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext) +343

[HttpException (0x80004005): Exception has been thrown by the target of an invocation.]
System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +579
System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +112
System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +712