Issue with ASP.Net login control and Membership provider RRS feed

  • Question

  • User1728700242 posted


    I am using ASP login control with ASP.NET Membership provider for my application. The application uses .Net Framework 3.5 and runs on a Windows Server 2012 R2 64 bit.

    I am encountering an error on some occasions which has been puzzling me for quite some time. The code works for most of the time.

    The application event log entry looks similar to this:


    Event code: 3005

    Event message: An unhandled exception has occurred.

    Event time: 7/7/2016 10:01:52 AM

    Event time (UTC): 7/7/2016 2:01:52 PM

    Event ID: 64f21247f63a46a29c5a911364c88728

    Event sequence: 72

    Event occurrence: 7

    Event detail code: 0

    Application information:

        Application domain: /LM/W3SVC/2/ROOT-1-131123667316644524

        Trust level: Full

        Application Virtual Path: /

        Application Path: C:\App1\

        Machine name: AppServer01

    Process information:

        Process ID: 3612

        Process name: w3wp.exe

        Account name: IIS APPPOOL\App1AppPool

    Exception information:

        Exception type: SqlNullValueException

        Exception message: Data is Null. This method or property cannot be called on Null values.

    Request information:

        Request URL: http://App1/login.aspx

        Request path: /login.aspx

        User host address:

        User: SK

        Is authenticated: True

        Authentication Type: Forms

        Thread account name: IIS APPPOOL\App1AppPool

    Thread information:

        Thread ID: 3

        Thread account name: IIS APPPOOL\App1AppPool

        Is impersonating: False

        Stack trace:    at System.Data.SqlClient.SqlBuffer.get_Int32()

       at System.Web.Security.SqlMembershipProvider.GetPasswordWithFormat(String username, Boolean updateLastLoginActivityDate, Int32& status, String& password, Int32& passwordFormat, String& passwordSalt, Int32& failedPasswordAttemptCount, Int32& failedPasswordAnswerAttemptCount, Boolean& isApproved, DateTime& lastLoginDate, DateTime& lastActivityDate)

       at System.Web.Security.SqlMembershipProvider.CheckPassword(String username, String password, Boolean updateLastLoginActivityDate, Boolean failIfNotApproved, String& salt, Int32& passwordFormat)

       at System.Web.Security.SqlMembershipProvider.ValidateUser(String username, String password)

       at System.Web.UI.WebControls.Login.AuthenticateUsingMembershipProvider(AuthenticateEventArgs e)

       at System.Web.UI.WebControls.Login.AttemptLogin()

       at System.Web.UI.WebControls.Login.OnBubbleEvent(Object source, EventArgs e)

       at System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args)

       at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)

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

    Custom event details:


    Any help will be very much appreciated!

    Friday, July 8, 2016 10:25 AM

All replies