Discussion:
[šD§U]šú±ošÏ¥ÎªÌ«H®§
(时间太久无法回复)
TT
2006-11-21 02:28:55 UTC
Permalink
œÐ±ÐŠUŠì:

šÏ¥ÎUser.Identity.Name¥i¥Hšú±oDOMAIN€º¥Î€áªº¥Î€áŠW,šº­n«ç€\ŒË€~¥i¥Hšú±o
Š¹¥Î€áªºŠbAD€€ªº[¥þŠW].
Šp¥Î€áŠW¬°:061543,¥þŠW¬°:LILY.

ÁÂÁÂ!
TT
2006-11-26 14:44:36 UTC
Permalink
it's ok now

Public Function GetFullName(Optional ByVal UserID As String = "Me") As
String
'¥H€U¬°šú±o¥Î€áFULLNAME¥NœX.šÏ¥Î®É»Ý­nŠbWeb.config€€¥[€J<identity
impersonate="true" /> and <add assembly="System.DirectoryServices,
Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
Dim DomainUser As String
If UserID = "Me" Then
DomainUser =
System.Security.Principal.WindowsIdentity.GetCurrent.Name.Replace("\", "/")
Else
DomainUser = UserID.Replace("\", "/")
End If
Dim ADEntry As New
System.DirectoryServices.DirectoryEntry("WinNT://" & DomainUser)
Return ADEntry.Properties("FullName").Value
End Function
Post by TT
šÏ¥ÎUser.Identity.Name¥i¥Hšú±oDOMAIN€º¥Î€áªº¥Î€áŠW,šº­n«ç€\ŒË€~¥i¥Hšú
±o
Post by TT
Š¹¥Î€áªºŠbAD€€ªº[¥þŠW].
Šp¥Î€áŠW¬°:061543,¥þŠW¬°:LILY.
ÁÂÁÂ!
继续阅读narkive:
Loading...