More in this section

Forums / General Discussions / Object reference not set to an instance of an object

Object reference not set to an instance of an object

4 posts, 0 answered
  1. May
    May avatar
    36 posts
    Registered:
    12 Apr 2007
    22 May 2007
    Link to this post
    Hi,

    One of my project is OK to browser , but when I tried to edit it, I got an error:
    Object reference not set to an instance of an object.  I guess it is permission issue.  Any help would be appreciated.

    Thanks,

    Amy

    Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.

    Line 26: void Login1_Authenticate(object sender, AuthenticateEventArgs e)
    Line 27: {
    Line 28: e.Authenticated = UserManager.Default.ValidateUser(this.Login1.UserName, this.Login1.Password);
    Line 29: }
    Line 30:


    NullReferenceException: Object reference not set to an instance of an object.]
       Nolics.ORMapper.DataProviders.SQLDataProvider.ParseResult(Int32 fromRow, Int32 maxRows, DataSet dsResult, IDataReader rd) +490
       Nolics.ORMapper.DataProviders.SQLDataProvider.ExecQuery(DataSet queries) +511
       Nolics.ORMapper.Base.QueryBase`1.LoadQuery(Int32 maxElements, Int32 fromElement) +275
       Nolics.ORMapper.Base.QueryBase`1.Load() +9
       Telerik.DataAccess.AspnetProviders.Application.GetUserByName(String userName) +146
       Telerik.DataAccess.AspnetProviders.TelerikMembershipProvider.ValidateUser(String username, String password) +36
       Telerik.Security.UserManager.ValidateUser(String username, String password) +19
       Admin_Login.Login1_Authenticate(Object sender, AuthenticateEventArgs e) in c:\Program Files\telerik\Sitefinity3.0\WebSites\DevSOLRemote\Sitefinity\Login.aspx.cs:28
       System.Web.UI.WebControls.Login.OnAuthenticate(AuthenticateEventArgs e) +106
       System.Web.UI.WebControls.Login.AttemptLogin() +105
       System.Web.UI.WebControls.Login.OnBubbleEvent(Object source, EventArgs e) +99
       System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +35
       System.Web.UI.WebControls.Button.OnCommand(CommandEventArgs e) +115
       System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +163
       System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +7
       System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +11
       System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +33
       System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5102
  2. Vlad
    Vlad avatar
    498 posts
    Registered:
    19 Jun 2017
    22 May 2007
    Link to this post
    Hello Amy,

    It is very strange that you are getting such an error on Validating the login. Could you give us more details, i.e.:
    What is the version of Sitefinity you are using?
    Do you get this error every time you try to login?
    Do you get it with any particular membership account?

    Please give us any further information that  you think could help us reproduce the error. Or send us the database, so we could investigate it locally.
    Thanks for the cooperation.

    Kind regards,
    Vlad
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  3. May
    May avatar
    36 posts
    Registered:
    12 Apr 2007
    22 May 2007
    Link to this post
    Hi Vlad,

    It was RC2 project and now is 3.0 release.  There is 1 account(Admin) and the error shows everytime when try to edit the project(Browser OK).  If I use a brand new database with the same project, everything is fine, but I have to add all the page back.  According to the upgrading document, editing the connecting string and point to the database, it will upgrade the database automatically. Is any reason to keep the old tables which no longer in new release? 

    Thanks,

    Amy
  4. Vlad
    Vlad avatar
    498 posts
    Registered:
    19 Jun 2017
    30 May 2007
    Link to this post
    Hi Ami,

    We apologize for the delay.

    Maybe the reason for this error is that the database or part of the database has not been successfully upgraded, but we don't know how this could happen.

    Nevertheless, to fix this, we suggest you do the following:
      - delete from sf_DataAccessVariables table in the database the record with SchemaVersion name .
      - restart the application.

    The above should cause that part of the database related to the membership users to be upgraded.
    We hope this will fix your project. But if you continue getting this error, could you please send us your project with the database, so we could investigate it locally.

    Sorry for the inconvenience.


    Sincerely yours,
    Vlad
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
Register for webinar
4 posts, 0 answered