Click here to Skip to main content
15,498,348 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: Missing Controls After Office 2019 Installation Pin
CHill6015-Jul-21 3:29
mveCHill6015-Jul-21 3:29 
AnswerRe: Missing Controls After Office 2019 Installation Pin
jsc4215-Jul-21 4:07
professionaljsc4215-Jul-21 4:07 
GeneralRe: Missing Controls After Office 2019 Installation Pin
Ken Kazinski18-Jul-21 4:07
professionalKen Kazinski18-Jul-21 4:07 
AnswerRe: Missing Controls After Office 2019 Installation Pin
Ken Kazinski18-Jul-21 4:09
professionalKen Kazinski18-Jul-21 4:09 
QuestionProject building Pin
Anthony Yawson11-Jul-21 0:59
MemberAnthony Yawson11-Jul-21 0:59 
GeneralRe: Project building Pin
Richard MacCutchan11-Jul-21 3:47
mveRichard MacCutchan11-Jul-21 3:47 
AnswerRe: Project building Pin
Dave Kreskowiak11-Jul-21 6:47
mveDave Kreskowiak11-Jul-21 6:47 
QuestionCaret problem Pin
Uchiha Yueh8-Jul-21 17:53
MemberUchiha Yueh8-Jul-21 17:53 
VB
Function CheckLogin(ldap as string, usr As String, pwd As String) As Boolean

        Dim Success As Boolean = False
        Dim Entry As New System.DirectoryServices.DirectoryEntry(ldap, usr, pwd)
        Dim Searcher As New System.DirectoryServices.DirectorySearcher(Entry)

        Searcher.SearchScope = DirectoryServices.SearchScope.OneLevel

        Try
            Dim Results As System.DirectoryServices.SearchResult = Searcher.FindOne
            Success = Not (Results Is Nothing)
        Catch ex As Exception
            Success = False
        End Try
 
        Return Success

End Function


Hi! I'm having a little trouble with the caret (^) character.

I'm using System.DirectoryServices.DirectoryEntry to verify the AD user.

The problem is when the password has a caret character at the end (E.g. zpfrt^), it returns a FALSE value. Even I tried to enclosed it in [], (), "", and {}, it doesn't solve the problem. I also tried this one - ^^^^, it still not working.

Do you have any idea how to fix this?

If I told the user to change his password without using the caret character, he might say "Windows accept my password with the caret character, why should I change that?" lolz

Please let me know if you have a solution. Thanks in advance guys  :) 


modified 9-Jul-21 4:01am.

AnswerRe: Caret problem Pin
Dave Kreskowiak8-Jul-21 18:08
mveDave Kreskowiak8-Jul-21 18:08 
GeneralRe: Caret problem Pin
Uchiha Yueh8-Jul-21 23:03
MemberUchiha Yueh8-Jul-21 23:03 
GeneralRe: Caret problem Pin
Dave Kreskowiak9-Jul-21 4:54
mveDave Kreskowiak9-Jul-21 4:54 
GeneralRe: Caret problem Pin
Uchiha Yueh10-Jul-21 1:14
MemberUchiha Yueh10-Jul-21 1:14 
GeneralRe: Caret problem Pin
Dave Kreskowiak10-Jul-21 6:15
mveDave Kreskowiak10-Jul-21 6:15 
GeneralRe: Caret problem Pin
Uchiha Yueh10-Jul-21 21:35
MemberUchiha Yueh10-Jul-21 21:35 
GeneralRe: Caret problem Pin
Richard MacCutchan10-Jul-21 23:13
mveRichard MacCutchan10-Jul-21 23:13 
GeneralRe: Caret problem Pin
Dave Kreskowiak11-Jul-21 6:41
mveDave Kreskowiak11-Jul-21 6:41 
GeneralRe: Caret problem Pin
Richard MacCutchan11-Jul-21 6:44
mveRichard MacCutchan11-Jul-21 6:44 
GeneralRe: Caret problem Pin
Dave Kreskowiak11-Jul-21 6:45
mveDave Kreskowiak11-Jul-21 6:45 
GeneralRe: Caret problem Pin
Jacob Ethan 202126-Jul-21 1:12
MemberJacob Ethan 202126-Jul-21 1:12 
QuestionRe: Caret problem Pin
CHill608-Jul-21 23:06
mveCHill608-Jul-21 23:06 
AnswerRe: Caret problem Pin
Richard MacCutchan10-Jul-21 23:14
mveRichard MacCutchan10-Jul-21 23:14 
GeneralRe: Caret problem Pin
Uchiha Yueh11-Jul-21 2:16
MemberUchiha Yueh11-Jul-21 2:16 
GeneralRe: Caret problem Pin
Richard MacCutchan11-Jul-21 3:25
mveRichard MacCutchan11-Jul-21 3:25 
GeneralRe: Caret problem Pin
Dave Kreskowiak11-Jul-21 6:43
mveDave Kreskowiak11-Jul-21 6:43 
Questionretrieve the group header and descriptions(top and bottom) Pin
JR2128-Jun-21 0:48
MemberJR2128-Jun-21 0:48 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.