Crystal Reports Server 2008-如何在.Net中以编程方式创建APS登录令牌

Crystal Reports Server 2008-如何在.Net中以编程方式创建APS登录令牌,.net,crystal-reports,crystal-reports-server,.net,Crystal Reports,Crystal Reports Server,有人能指导我以编程方式在.Net中创建APS登录令牌吗?我需要使用此令牌进行URL报告 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 E

有人能指导我以编程方式在.Net中创建APS登录令牌吗?我需要使用此令牌进行URL报告

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