Click here to Skip to main content
15,031,223 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: Missing Controls After Office 2019 Installation Pin
CHill6015-Jul-21 2:29
mveCHill6015-Jul-21 2:29 
AnswerRe: Missing Controls After Office 2019 Installation Pin
jsc4215-Jul-21 3:07
professionaljsc4215-Jul-21 3:07 
GeneralRe: Missing Controls After Office 2019 Installation Pin
Ken Kazinski18-Jul-21 3:07
professionalKen Kazinski18-Jul-21 3:07 
AnswerRe: Missing Controls After Office 2019 Installation Pin
Ken Kazinski18-Jul-21 3:09
professionalKen Kazinski18-Jul-21 3:09 
QuestionProject building Pin
Anthony Yawson10-Jul-21 23:59
MemberAnthony Yawson10-Jul-21 23:59 
GeneralRe: Project building Pin
Richard MacCutchan11-Jul-21 2:47
mveRichard MacCutchan11-Jul-21 2:47 
AnswerRe: Project building Pin
Dave Kreskowiak11-Jul-21 5:47
mveDave Kreskowiak11-Jul-21 5:47 
QuestionCaret problem Pin
Uchiha Yueh8-Jul-21 16:53
MemberUchiha Yueh8-Jul-21 16: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 17:08
mveDave Kreskowiak8-Jul-21 17:08 
GeneralRe: Caret problem Pin
Uchiha Yueh8-Jul-21 22:03
MemberUchiha Yueh8-Jul-21 22:03 
GeneralRe: Caret problem Pin
Dave Kreskowiak9-Jul-21 3:54
mveDave Kreskowiak9-Jul-21 3:54 
GeneralRe: Caret problem Pin
Uchiha Yueh10-Jul-21 0:14
MemberUchiha Yueh10-Jul-21 0:14 
GeneralRe: Caret problem Pin
Dave Kreskowiak10-Jul-21 5:15
mveDave Kreskowiak10-Jul-21 5:15 
GeneralRe: Caret problem Pin
Uchiha Yueh10-Jul-21 20:35
MemberUchiha Yueh10-Jul-21 20:35 
GeneralRe: Caret problem Pin
Richard MacCutchan10-Jul-21 22:13
mveRichard MacCutchan10-Jul-21 22:13 
GeneralRe: Caret problem Pin
Dave Kreskowiak11-Jul-21 5:41
mveDave Kreskowiak11-Jul-21 5:41 
GeneralRe: Caret problem Pin
Richard MacCutchan11-Jul-21 5:44
mveRichard MacCutchan11-Jul-21 5:44 
GeneralRe: Caret problem Pin
Dave Kreskowiak11-Jul-21 5:45
mveDave Kreskowiak11-Jul-21 5:45 
GeneralRe: Caret problem Pin
Jacob Ethan 202126-Jul-21 0:12
MemberJacob Ethan 202126-Jul-21 0:12 
QuestionRe: Caret problem Pin
CHill608-Jul-21 22:06
mveCHill608-Jul-21 22:06 
AnswerRe: Caret problem Pin
Richard MacCutchan10-Jul-21 22:14
mveRichard MacCutchan10-Jul-21 22:14 
GeneralRe: Caret problem Pin
Uchiha Yueh11-Jul-21 1:16
MemberUchiha Yueh11-Jul-21 1:16 
GeneralRe: Caret problem Pin
Richard MacCutchan11-Jul-21 2:25
mveRichard MacCutchan11-Jul-21 2:25 
GeneralRe: Caret problem Pin
Dave Kreskowiak11-Jul-21 5:43
mveDave Kreskowiak11-Jul-21 5:43 
Questionretrieve the group header and descriptions(top and bottom) Pin
JR2127-Jun-21 23:48
MemberJR2127-Jun-21 23: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.