Need a little help. Pls? thanks ^_^
Caret character problem in Console Application
Hi! I'm having a little trouble with the caret (^) character.
I'm creating a vb.net console application to verify an AD user.
Imports System.DirectoryServices.AccountManagement
Module Module1
Sub Main(ByVal args() As String)
Dim isWithAD As Boolean
Try
Dim pc As PrincipalContext = New PrincipalContext(ContextType.Domain, "<AD Domain Here>")
Using (pc)
isWithAD = pc.ValidateCredentials(args(0), args(1))
End Using![113447-ldap.png][1]
Console.WriteLine(IIf(isWithAD = True, "Success", "Failed"))
Catch ex As Exception
Console.WriteLine("Error [" + ex.ToString + "] - " + ex.InnerException.ToString)
End Try
End Sub
End Module
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?
Please let me know if you have a solution. Thanks in advance guys :)
Example:
2 answers
Sort by: Most helpful
-
-
Hannah Xiong 6,276 Reputation points
2021-07-12T05:03:23.537+00:00 Hello @Glenn Sarsonas ,
Thank you so much for posting here.
So sorry that I am not professional with this issue. Hope someone could share their knowledge or experience here. If there is still no progress, I would suggest that we could contact Microsoft Customer Services and Support to get an efficient solution:
https://support.serviceshub.microsoft.com/supportforbusiness
Thanks for your understanding and support.
Best regards,
Hannah Xiong