Discussion:
有關在ASP做AD認證問題
(时间太久无法回复)
Yuan
2006-03-22 01:57:12 UTC
Permalink
請問一下,我有一個ASP必須要跟AD做認證,我的ASP網站是跟AD分開放,當我去驗證時出現
-2147023541,請問這是什麼錯誤訊息,我在ASP的那台主機也裝了ADSI Edit,下面是我的程式碼
Set objNameSpace = GetObject("LDAP:")
str="LDAP://OU="&OUName&","&LDAPStr
ACID=Request.Form ("ACID")&"@wca12.gov.tw"
ACCode=Request.Form ("ACCode")
Set objUser = objNameSpace.OpenDsObject
(str,ACID,ACCode,ADS_SECURE_AUTHENTICATION) '認證AD帳號密碼
If Err.Number <> 0 Then
--
Yuan
MS MVP ³sÀA¶¯ for VB.NET
2006-03-22 02:49:32 UTC
Permalink
Der Yuan,

Please try to get the exception.message, With this number, there are many
chance.
including, cannot find Domain, Cannot find object, cannot login....etc
--
Hope this help and welcome to reply the testing result.

Regards
Ken Lin, Kam Hung
Founder and VP of Hong Kong .NET User Group(http://HKNetUG.com)
MCP, MCP+I, MCDST, MCSA, MCSE(NT4 & win2k),
MCSE+I, MCDBA(SQL7 & SQL2K), MCSD(VB6 & .NET), MCAD(.NET)
Microsoft Community Star(Hong Kong & Taiwan)
Microsoft Most Valuable Professional(.NET since 2003)
MCT2004 & 2005
®É¥X²{
-2147023541¡AœÐ°Ý³o¬O€°»ò¿ù»~°T®§¡A§ÚŠbASPªºšº¥x¥DŸ÷€]žË€FADSI Edit¡A€U­±
¬O§Úªºµ{Š¡œX
Set objNameSpace = GetObject("LDAP:")
str="LDAP://OU="&OUName&","&LDAPStr
ACCode=Request.Form ("ACCode")
Set objUser = objNameSpace.OpenDsObject
(str,ACID,ACCode,ADS_SECURE_AUTHENTICATION) '»{ÃÒAD±bž¹±KœX
If Err.Number <> 0 Then
--
Yuan
Yuan
2006-03-22 07:22:27 UTC
Permalink
請問一要如何取得exception.message,因為我是用Error Number取得的
--
Yuan


"MS MVP ??? for VB.NET" 來函:
Post by MS MVP ³sÀA¶¯ for VB.NET
Der Yuan,
Please try to get the exception.message, With this number, there are many
chance.
including, cannot find Domain, Cannot find object, cannot login....etc
--
Hope this help and welcome to reply the testing result.
Regards
Ken Lin, Kam Hung
Founder and VP of Hong Kong .NET User Group(http://HKNetUG.com)
MCP, MCP+I, MCDST, MCSA, MCSE(NT4 & win2k),
MCSE+I, MCDBA(SQL7 & SQL2K), MCSD(VB6 & .NET), MCAD(.NET)
Microsoft Community Star(Hong Kong & Taiwan)
Microsoft Most Valuable Professional(.NET since 2003)
MCT2004 & 2005
Post by Yuan
請問一下,我有一個ASP必須要跟AD做認證,我的ASP網站是跟AD分開放,當我去驗證
時出現
Post by Yuan
-2147023541,請問這是什麼錯誤訊息,我在ASP的那台主機也裝了ADSI Edit,下面
是我的程式碼
Post by Yuan
Set objNameSpace = GetObject("LDAP:")
str="LDAP://OU="&OUName&","&LDAPStr
ACCode=Request.Form ("ACCode")
Set objUser = objNameSpace.OpenDsObject
(str,ACID,ACCode,ADS_SECURE_AUTHENTICATION) '認證AD帳號密碼
If Err.Number <> 0 Then
--
Yuan
MS MVP ³sÀA¶¯ for VB.NET
2006-03-23 01:45:59 UTC
Permalink
Dear Yuan,

You are using VB6 or VB.NET?
And hwo you get the error number? If in VB6, should be error.message
--
Hope this help and welcome to reply the testing result.

Regards
Ken Lin, Kam Hung
Founder and VP of Hong Kong .NET User Group(http://HKNetUG.com)
MCP, MCP+I, MCDST, MCSA, MCSE(NT4 & win2k),
MCSE+I, MCDBA(SQL7 & SQL2K), MCSD(VB6 & .NET), MCAD(.NET)
Microsoft Community Star(Hong Kong & Taiwan)
Microsoft Most Valuable Professional(.NET since 2003)
MCT2004 & 2005
--
Yuan
"MS MVP ??? for VB.NET" šÓšç¡G
Post by MS MVP ³sÀA¶¯ for VB.NET
Der Yuan,
Please try to get the exception.message, With this number, there are many
chance.
including, cannot find Domain, Cannot find object, cannot login....etc
--
Hope this help and welcome to reply the testing result.
Regards
Ken Lin, Kam Hung
Founder and VP of Hong Kong .NET User Group(http://HKNetUG.com)
MCP, MCP+I, MCDST, MCSA, MCSE(NT4 & win2k),
MCSE+I, MCDBA(SQL7 & SQL2K), MCSD(VB6 & .NET), MCAD(.NET)
Microsoft Community Star(Hong Kong & Taiwan)
Microsoft Most Valuable Professional(.NET since 2003)
MCT2004 & 2005
ÅçÃÒ
Post by MS MVP ³sÀA¶¯ for VB.NET
®É¥X²{
-2147023541¡AœÐ°Ý³o¬O€°»ò¿ù»~°T®§¡A§ÚŠbASPªºšº¥x¥DŸ÷€]žË€FADSI Edit¡A
€U­±
Post by MS MVP ³sÀA¶¯ for VB.NET
¬O§Úªºµ{Š¡œX
Set objNameSpace = GetObject("LDAP:")
str="LDAP://OU="&OUName&","&LDAPStr
ACCode=Request.Form ("ACCode")
Set objUser = objNameSpace.OpenDsObject
(str,ACID,ACCode,ADS_SECURE_AUTHENTICATION) '»{ÃÒAD±bž¹±KœX
If Err.Number <> 0 Then
--
Yuan
Loading...