none
pwa site RRS feed

  • Question

  • Hi,

    I am depoly a visual webpart  pwa site using visual studio-2010 but some error -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.]

       MyWebPart.VisualWebPart1.VisualWebPart1UserControl.addWebs(SPWeb web, TreeNode parentNode) +230

       MyWebPart.VisualWebPart1.VisualWebPart1UserControl.Page_Load(Object sender, EventArgs e) +1114

       System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +24

       System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +41

       System.Web.UI.Control.OnLoad(EventArgs e) +131

       System.Web.UI.Control.LoadRecursive() +65

       System.Web.UI.Control.AddedControl(Control control, Int32 index) +349

       MyWebPart.VisualWebPart1.VisualWebPart1.CreateChildControls() +154

       System.Web.UI.Control.EnsureChildControls() +145

       System.Web.UI.Control.PreRenderRecursiveInternal() +60

       System.Web.UI.Control.PreRenderRecursiveInternal() +223

       System.Web.UI.Control.PreRenderRecursiveInternal() +223

       System.Web.UI.Control.PreRenderRecursiveInternal() +223

       System.Web.UI.Control.PreRenderRecursiveInternal() +223

       System.Web.UI.Control.PreRenderRecursiveInternal() +223

       System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3393

     pwa site not work.How resolve the error.

    Please ........


    Version Information: Microsoft .NET Framework Version:2.0.50727.4216; ASP.NET Version:2.0.50727.4223


    Neeraj
    Wednesday, January 18, 2012 12:47 PM

Answers

All replies

  • Hi Neeraj149,

    this seems a common .NET error (NullReferenceException).

    So, maybe, there's an error in you webpart code. Can you debug this webpart? Have you check in uls log if you have any information about this?

    Best Regards

    Paolo O.

    Wednesday, January 18, 2012 8:45 PM
  • Hi Paolo o,

    Thanks.

    Its ok but who to restart pwa site.currenntly is not work...


    Neeraj
    Thursday, January 19, 2012 4:27 AM
  • Neeraj--

    When you try to access the PWA site, it throws the exception which you mentioned.
    Did you modify the Web config or PWA while creating the Webpart? If yes, Try to look at the below URL
    http://serveranme/pwa/default.aspx?contents=1

    Delete the custom webpart, which you created & retest it. Try to debug it & see why you are getting the null ref exception

    Hope that helps.

    Thanks, Amit Khare |EPM Consultant| Blog: http://amitkhare82.blogspot.com http://www.linkedin.com/in/amitkhare82
    Thursday, January 19, 2012 8:27 AM
  • Hi Amit ,

    Thanks..

    How to delete  the custom webpart to deploy pwa site...?


    Neeraj
    Thursday, January 19, 2012 10:54 AM
  • Hi There,

    Try to look at the below URL (remove the servername & use the PWA url followed by ?Contents=1)
    http://serveranme/pwa/default.aspx?contents=1

    It shows that list of custom webpart, select & delete the custom webpart.

    Thanks, Amit Khare |EPM Consultant| Blog: http://amitkhare82.blogspot.com http://www.linkedin.com/in/amitkhare82
    Thursday, January 19, 2012 12:08 PM
  • Hi Amit,

     

    Thank you......


    Neeraj
    Thursday, January 19, 2012 12:39 PM
  • Hey Neeraj,

    Did it work for you?


    Thanks, Amit Khare |EPM Consultant| Blog: http://amitkhare82.blogspot.com http://www.linkedin.com/in/amitkhare82
    Friday, January 20, 2012 5:08 AM
  • Hi Amit,

    Yes,

    Thank you......



    Neeraj
    Friday, January 20, 2012 8:46 AM