locked
CommonLogon with VB.net RRS feed

  • Question

  • User-592739109 posted

    Trying to implement CommonLogon into a project of mine and need an example of how to implement it using VB.Net.  I have compiled the project and it has created 3 dll files.  All which are now loaded into my project.  What I need to do is verify a password meets certain criteria.  (at least 8 characters long, 1 special character and 1 number).

    I have looked at the example code and this is what I have thus far.  Looking for further assistance.  Can this be used without CommonData or is this all I need.  Getting an error:

    System.Web.HttpUnhandledException: Exception of type 'System.Web.HttpUnhandledException' was thrown. ---> System.NullReferenceException: Object reference not set to an instance of an object. at CommonCS.CommonData.WriteEventError(Exception error, String logNote) at CommonParam.ParamInteger.SetValue(ParamIntegerEnum id, Int32 paramValue) at UserProfile.btnChangePwd_Click(Object sender, EventArgs e)

     

    Imports CommonCS
    Imports CommonLogOn
    Imports CommonParam
    
            ParamInteger.SetValue(ParamIntegerEnum.PasswordMinimumNumberOfNumericCharacters, 0)
            ParamInteger.SetValue(ParamIntegerEnum.PasswordMinimumNumberOfSpecialCharacters, 1)
            ParamInteger.SetValue(ParamIntegerEnum.PasswordMinimumNumberOfLowercase, 1)
            ParamInteger.SetValue(ParamIntegerEnum.PasswordMinimumNumberOfUppercase, 1)
            ParamInteger.SetValue(ParamIntegerEnum.PasswordMinimumLength, 8)
    
            Dim message As String = "Invalid Password contraints"
            Dim password = Me._txtPwd.Text
            Dim result = PasswordSupport.IsValidSyntax(password, message)



     

    Thursday, July 22, 2010 1:33 PM

Answers

  • User-952121411 posted

    Yes I think the exception you posted is not directly related to the code above, or the code above initiated an error, but then there was a problem in your 'CommonCS.CommonData.WriteEventError()' method.  You received an "Object reference not set to an instance of an object" message in that 'WriteEventError' method. 

    You will need to debug the code to find out what object was being accessed without being instantiated or has value.  Easiest way to do this is to place a break point on the 1st line of that method and step through it to find where it fails.  For example if you tried to access the passed in 'Exception error' object but it had no value, you could see this error.  However, that is just an example, it could be anything.  You will need to debug it, or post back with the offending line of code that causes the exception.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, July 26, 2010 10:49 AM