Could some one guide me to create a APS logon token in .Net programmatically? I need to use this token for URL reporting....
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
Public Shared Function Authenticate (account As String, password As String, serverName As String, authenticationType As String) As String
Dim sessionManager As New SessionMgr
Dim enterpriseSession As EnterpriseSession
Try
enterpriseSession = sessionManager.Logon(account, password, serverName, authenticationType)
'any client computer, 120 minutes, 1000 logons
Return enterpriseSession.LogonTokenMgr.CreateLogonTokenEx("", 120, 1000)
Catch ex As Exception
Throw ex
End Try
End Function