locked
Error. Please Help RRS feed

  • Question

  • User344034269 posted
    Server Error in '/Upload' 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:


    Line 23:     Protected Sub PasswordRecovery_Init(ByVal sender As Object, ByVal e As System.EventArgs) Handles PasswordRecovery.Init
    Line 24:         Dim s As SiteSettings = SiteSettings.GetSharedSettings()
    Line 25:         PasswordRecovery.MailDefinition.From = s.SiteEmailFromField
    Line 26:     End Sub
    Line 27:
     

    Source File: H:\Documents and Settings\Admin-Pc\My Documents\Visual Studio 2008\WebSites\Upload\Login.aspx.vb    Line: 25

    Stack Trace:


    [NullReferenceException: Object reference not set to an instance of an object.]
       Login_aspx.PasswordRecovery_Init(Object sender, EventArgs e) in H:\Documents and Settings\Admin-Pc\My Documents\Visual Studio 2008\WebSites\Upload\Login.aspx.vb:25
       System.Web.UI.Control.OnInit(EventArgs e) +99
       System.Web.UI.WebControls.PasswordRecovery.OnInit(EventArgs e) +11
       System.Web.UI.Control.InitRecursive(Control namingContainer) +321
       System.Web.UI.Control.InitRecursive(Control namingContainer) +198
       System.Web.UI.Control.InitRecursive(Control namingContainer) +198
       System.Web.UI.Control.InitRecursive(Control namingContainer) +198
       System.Web.UI.Control.InitRecursive(Control namingContainer) +198
       System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +834

     


    --------------------------------------------------------------------------------
    Version Information: Microsoft .NET Framework Version:2.0.50727.1433; ASP.NET Version:2.0.50727.1433
    Thursday, March 5, 2009 12:46 AM

All replies

  • User1677479917 posted

    Hi,

    Pls debug the method GetSharedSettings basically your instance "s" of an object "SiteSettings" is NULL and you are trying to access it's property.

    Let me know if you need any help from my side.

    Thanks


     

    Thursday, March 5, 2009 8:10 AM
  • User-1136540166 posted

    I    ALWAYS get this error the first time I run Visual Web Designer each day.  

    The first error I get is that 'adminstrator role does not exist'.   So I stop debugging and start again.
    Then I get the error you described.    "  [NullReferenceException: Object reference not set to an instance of an object.]  "

     So I stop debugging and start it again.
    Then I get the "photos"  "declare an instance" error

    Now that I have gotten that far, I
    stop debugging...
    close project
    close VisualWebDesigner..

     Start VisualWebDesigner again, select the project and start debugging and now it will work.

    I admit that I do NOT know the cause of this.  I think it is because the local ASP.net development server doesn't start fast enough.. (that's a guess).   I see that when I close  V.W.D. that the local ASP.net server stays running.  So when I start V.W.D. again and then select the website and start debug itstarts really quick and I do not get those errors.

    Sorry, I have not suggested a "fix"... but it is a way that I deal with the same problem that you are having.

    Saturday, March 14, 2009 12:37 PM