+1-888-365-2779
Try Now
More in this section

Forums / Bugs & Issues / Deleted Default Notification Profile - Null Reference Exception

Deleted Default Notification Profile - Null Reference Exception

5 posts, 0 answered
  1. Robert
    Robert avatar
    26 posts
    Registered:
    19 Mar 2011
    16 Mar 2014
    Link to this post

    Hi,

     I accidentally deleted the default profile for the email notifications module via Sitefinity Administration Settings.

     I am now unable to load my application. I keep getting the following error when Sitefinity loads up.

     Can you offer any advice on how I may repair this?

    The error is as follows:

    Server Error in '/' Application.Object reference not set to an instance of an object.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.NullReferenceException: Object reference not set to an instance of an object.

    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: 

    [NullReferenceException: Object reference not set to an instance of an object.]
    Telerik.Sitefinity.Configuration.Data.XmlConfigProvider.LoadCollectionElement(ConfigElementCollection collection, XmlReader reader, ConfigPolicyHandler policyHandler, String policyName, UpgradingInfo upgradingInfo) +1400
    Telerik.Sitefinity.Configuration.Data.XmlConfigProvider.LoadElement(ConfigElement element, XmlReader reader, ConfigPolicyHandler policyHandler, String policyName, UpgradingInfo upgradingInfo, Boolean isNew, Boolean validateTagName) +416
    Telerik.Sitefinity.Configuration.Data.XmlConfigProvider.LoadPropertyElement(ConfigElement element, XmlReader reader, ConfigPolicyHandler policyHandler, String policyName, UpgradingInfo upgradingInfo) +500
    Telerik.Sitefinity.Configuration.Data.XmlConfigProvider.LoadElement(ConfigElement element, XmlReader reader, ConfigPolicyHandler policyHandler, String policyName, UpgradingInfo upgradingInfo, Boolean isNew, Boolean validateTagName) +453
    Telerik.Sitefinity.Configuration.Data.XmlConfigProvider.LoadSectionFromReader(ConfigSection section, XmlReader reader, ConfigPolicyHandler policyHandler, String policyName, Boolean checkForUpgrade, UpgradingInfo& upgradingInfo) +468
    Telerik.Sitefinity.Configuration.Data.XmlConfigProvider.LoadSectionFromFile(ConfigSection section, ConfigPolicyHandler policyHandler, String policyName, Boolean withUpgrade) +130
    Telerik.Sitefinity.Configuration.Data.XmlConfigProvider.LoadSection(ConfigSection section, ConfigPolicyHandler policyHandler, String policyName) +152
    Telerik.Sitefinity.Configuration.ConfigSection.Initialize(ConfigProvider provider, ConfigPolicyHandler policyHandler, String policyName, Boolean singlePolicy) +361
    Telerik.Sitefinity.Configuration.ConfigSection.Initialize(ConfigProvider provider) +45
    Telerik.Sitefinity.Configuration.Config.GetSectionInternal(Type sectionType, Boolean safeMode) +229
    Telerik.Sitefinity.Configuration.Config.GetSectionPrivate(Type sectionType, Boolean safeMode) +175
    Telerik.Sitefinity.Configuration.Config.GetSectionPrivate(Boolean safeMode) +104
    Telerik.Sitefinity.Configuration.Config.Get(Boolean safeMode) +85
    Telerik.Sitefinity.Configuration.Config.Get() +80
    Telerik.Sitefinity.Services.Notifications.NotificationsManager.get_ProvidersSettings() +40
    Telerik.Sitefinity.Data.ManagerBase`1.GetProvidersSettings() +41
    Telerik.Sitefinity.Data.ManagerBase`1.Initialize() +775
    Telerik.Sitefinity.Data.ManagerBase`1..ctor(String providerName, String transactionName) +62
    Telerik.Sitefinity.Data.ManagerBase`1..ctor(String providerName) +38
    Telerik.Sitefinity.Services.Notifications.NotificationsManager..ctor(String providerName) +36
    Telerik.Sitefinity.Services.Notifications.NotificationsManager..ctor() +31

    [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) +113
    System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark& stackMark) +232
    System.Activator.CreateInstance() +169
    Telerik.Sitefinity.Data.ManagerBase`1.GetManager(String providerName, String transactionName) +139
    Telerik.Sitefinity.Data.ManagerBase`1.GetManager() +77
    Telerik.Sitefinity.Services.Notifications.NotificationsManager.GetManager() +32
    Telerik.Sitefinity.Services.Notifications.NotificationService.GetMessageTemplates(ServiceContext context, QueryParameters queryParams) +1397
    Telerik.Sitefinity.Services.Comments.Impl.CommentService.InstallNotificationMessageTemplates() +91
    Telerik.Sitefinity.Services.Comments.Impl.CommentService.Initialize(ModuleSettings settings) +123
    Telerik.Sitefinity.Services.SystemManager.InitializeService(ModuleSettings settings, Boolean start) +275
    Telerik.Sitefinity.Services.SystemManager.Initialize() +1704
    Telerik.Sitefinity.Abstractions.Bootstrapper.RegisterRoutes() +1026
    Telerik.Sitefinity.Abstractions.Bootstrapper.Bootstrap() +370
    Telerik.Sitefinity.Web.SitefinityHttpModule.Init(HttpApplication context) +130
    System.Web.Routing.UrlRoutingModule.System.Web.IHttpModule.Init(HttpApplication application) +10
    System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr appContext, HttpContext context, MethodInfo[] handlers) +418
    System.Web.HttpApplication.InitSpecial(HttpApplicationState state, MethodInfo[] handlers, IntPtr appContext, HttpContext context) +172
    System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context) +336
    System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext) +296

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

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

     

     

    I'm using Sitefinity 6.3.5.

    Many thanks,

     Rob

  2. Svetoslav Manchev
    Svetoslav Manchev avatar
    735 posts
    Registered:
    07 Dec 2016
    19 Mar 2014
    Link to this post
    Hello Rob,

    Thank you for using Sitefinity.

    Please open the notifications config file under:
    ~\<your project>\App_Data\Sitefinity\Configuration\NotificationsConfig.config
    and remove the line starts with <remove ...

     - or -

    backup your current notification config file and create a new one with the following content:
    <?xml version="1.0" encoding="utf-8"?>
    <notificationsConfig xmlns:config="urn:telerik:sitefinity:configuration" xmlns:type="urn:telerik:sitefinity:configuration:type" config:version="6.3.5000.0">
     
    </notificationsConfig>
    and configure the notification settings once again.

    I hope this information helps. Please let me know if I can assist you any further with this service request.

    Regards,
    Svetoslav Manchev
    Telerik
     
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Sitefinity CMS Ideas&Feedback Portal and vote to affect the priority of the items
     
  3. Robert
    Robert avatar
    26 posts
    Registered:
    19 Mar 2011
    19 Mar 2014 in reply to Svetoslav Manchev
    Link to this post

    Thank you very much Svetoslav.

     You solution worked perfectly.

     Really appreciate it.

    Rob

  4. Tom
    Tom avatar
    7 posts
    Registered:
    07 Oct 2013
    11 Jun 2014 in reply to Robert
    Link to this post

    I had my workflow email notifications working just fine. Now they do not after some modifications. I have my Systems > SMTP settings and Notifications > Profile set up.

    I noticed after this post that a NotificationsConfig.config file does not exist in my project. Is this normal? Where can I get a default one if mine disappeared?

  5. Svetoslav Manchev
    Svetoslav Manchev avatar
    735 posts
    Registered:
    07 Dec 2016
    12 Jun 2014
    Link to this post
    Hello Tom,

    Please try the solution proposed in the second part of my previous post: - Create a new NotificationsConfig.config under  ~\<your project>\App_Data\Sitefinity\Configuration\ and use the default content provided.

    Than configure the notification settings once again.

    Regards,
    Svetoslav Manchev
    Telerik
     
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Sitefinity CMS Ideas&Feedback Portal and vote to affect the priority of the items
     
5 posts, 0 answered