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

Forums / Bugs & Issues / Object reference not set to an instance of an object. (After IIS reset/Compile/Idleness)

Object reference not set to an instance of an object. (After IIS reset/Compile/Idleness)

6 posts, 1 answered
  1. Anshu Nigam
    Anshu Nigam avatar
    5 posts
    Registered:
    13 Mar 2010
    19 Mar 2010
    Link to this post

    Hi Team,

    Please see complete error below. This error occur first time, when you reset IIS, Compile project (Pls note I've some physical files too) and after some inactivity time. Simply refresh page (F5) and everything works fine. I've running on Win 2003 server with admin access. Pls advise.



    Object reference not set to an instance of an object.

    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.Workflow.WorkflowManager.get_ProvidersSettings() +6
       Telerik.Workflow.ObjectManager`1.Initialize() +546
       Telerik.Workflow.ObjectManager`1..ctor(String provider) +15
       Telerik.Workflow.WorkflowRuntime.Initialize() +122
       Telerik.Workflow.WorkflowRuntime..ctor(String name) +20
       Telerik.Workflow.WorkflowRuntime.get_Instance() +32
       Telerik.Cms.CmsWorkflowService..ctor() +40
       Telerik.Cms.CmsWorkflowService..cctor() +21
    
    [TypeInitializationException: The type initializer for 'Telerik.Cms.CmsWorkflowService' threw an exception.]
       Telerik.Cms.CmsWorkflowService.Initialize() +0
       Telerik.Cms.CmsManager.OnInitialized() +5
       Telerik.ManagerBase`1.Initialize() +505
       Telerik.ManagerBase`1..ctor(String providerName) +21
       Telerik.ManagerBase`1..ctor() +11
       Telerik.Cms.Web.UrlHelper.Initialize(CmsHttpModule cmsModule) +38
       Telerik.Cms.Web.CmsHttpModule.Init(HttpApplication context) +86
       System.Web.HttpApplication.InitModulesCommon() +65
       System.Web.HttpApplication.InitModules() +43
       System.Web.HttpApplication.InitInternal(HttpContext context, HttpApplicationState state, MethodInfo[] handlers) +729
       System.Web.HttpApplicationFactory.GetNormalApplicationInstance(HttpContext context) +298
       System.Web.HttpApplicationFactory.GetApplicationInstance(HttpContext context) +107
       System.Web.HttpRuntime.ProcessRequestInternal(HttpWorkerRequest wr) +289
    


    Version Information: Microsoft .NET Framework Version:2.0.50727.3603; ASP.NET Version:2.0.50727.3082


    Thanks
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    19 Mar 2010
    Link to this post
    Hi Anshu Nigam,

    It looks like that you have enable the workflow for pages. Make sure that you have the following configuration in your web.config file

    <workflow deleteOnCompletion="true" defaultProvider="NolicsWorkflowProvider">
       <providers>
         <clear />
         <add name="NolicsWorkflowProvider" connectionStringName="DefaultConnection" type="Telerik.Workflow.NolicsWorkflowProvider, Telerik.Workflow" />
       </providers>
     </workflow>

    Note that workflow does not work under Medium Trust Level and for Community Edition. The error you are getting is thrown when the WorkflowManager is trying to get the ProvidersSettings from the web.config ( the settings that are posted above) and the provider is not found.

    Best wishes,
    Ivan Dimitrov
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
  3. Anshu Nigam
    Anshu Nigam avatar
    5 posts
    Registered:
    13 Mar 2010
    19 Mar 2010
    Link to this post
    Thanks! Where in Web.Config I should place given code? What is the use of workflow, can we disable that? how do I make sure I'm not running Medium Trust Level? Pls Advise.

    Thanks
  4. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    19 Mar 2010
    Link to this post
    Hello Anshu Nigam,

    The code should be placed in the web.config by default under <telerik> nodes. You can also check which version you use following this KB. You can take a look at this article to gather more inforamtion about truest level.

    Greetings,
    Ivan Dimitrov
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
  5. Anshu Nigam
    Anshu Nigam avatar
    5 posts
    Registered:
    13 Mar 2010
    19 Mar 2010
    Link to this post
    I got from source I got from source
    <meta name="Generator" content="Sitefinity 3.7.2057.2:1" />
    From Telerik.Cms.dll File version =  3.7.2057.2

    I've also added following
    <system.web>
       <trust level="Full" />
    </system.web>

    But still get same error (Object reference not set to an instance of an object) (first time after compile/IIS reset).
     when try to add given tag under <telerik> Node
    <workflow deleteOnCompletion="true" defaultProvider="NolicsWorkflowProvider">
       <providers>
         <clear />
         <add name="NolicsWorkflowProvider" connectionStringName="DefaultConnection" type="Telerik.Workflow.NolicsWorkflowProvider, Telerik.Workflow" />
       </providers>
     </workflow>
    I get following error
    Configuration Error

    Configuration Error

    Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.

    Parser Error Message: Unrecognized configuration section telerik/workflow.

    Source Error:

    Line 300:  </system.codedom>
    Line 301:  <telerik>
    Line 302:    <workflow deleteOnCompletion="true" defaultProvider="NolicsWorkflowProvider">
    Line 303:      <providers>
    Line 304:        <clear />

    Source File: C:\Program Files\telerik\Sitefinity3.7\WebSites\cat\kbase\web.config    Line: 302

    Pls help

    Thanks


  6. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    19 Mar 2010
    Link to this post
    Hello Anshu Nigam,

    I attached a sample web.config that you can observe and compare with your configuration.

    Best wishes,
    Ivan Dimitrov
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
    Answered
Register for webinar
6 posts, 1 answered