共用方式為


ReportServerCredentials.GetFormsCredentials 方法

傳回指示連接到報表伺服器時是否將使用表單驗證的 Boolean 值,以及驗證將使用之表單認證的相關資訊。

命名空間:  Microsoft.Reporting.WinForms
組件:  Microsoft.ReportViewer.WinForms (在 Microsoft.ReportViewer.WinForms.dll 中)

語法

'宣告
Public Function GetFormsCredentials ( _
    <OutAttribute> ByRef authCookie As Cookie, _
    <OutAttribute> ByRef userName As String, _
    <OutAttribute> ByRef password As String, _
    <OutAttribute> ByRef authority As String _
) As Boolean
'用途
Dim instance As ReportServerCredentials
Dim authCookie As Cookie
Dim userName As String
Dim password As String
Dim authority As String
Dim returnValue As Boolean

returnValue = instance.GetFormsCredentials(authCookie, _
    userName, password, authority)
public bool GetFormsCredentials(
    out Cookie authCookie,
    out string userName,
    out string password,
    out string authority
)
public:
virtual bool GetFormsCredentials(
    [OutAttribute] Cookie^% authCookie, 
    [OutAttribute] String^% userName, 
    [OutAttribute] String^% password, 
    [OutAttribute] String^% authority
) sealed
abstract GetFormsCredentials : 
        authCookie:Cookie byref * 
        userName:string byref * 
        password:string byref * 
        authority:string byref -> bool 
override GetFormsCredentials : 
        authCookie:Cookie byref * 
        userName:string byref * 
        password:string byref * 
        authority:string byref -> bool 
public final function GetFormsCredentials(
    authCookie : Cookie, 
    userName : String, 
    password : String, 
    authority : String
) : boolean

參數

  • authCookie
    型別:System.Net.Cookie%
    [out] 報表伺服器所用的驗證 Cookie。
  • userName
    型別:System.String%
    [out] 將用來連接到報表伺服器的使用者名稱。

傳回值

型別:System.Boolean
如果連接到報表伺服器時將使用表單驗證,便傳回 true。表單驗證所用之認證的相關資訊,會透過方法呼叫所用的輸出參數來傳回。

實作

IReportServerCredentials.GetFormsCredentials(Cookie%, String%, String%, String%)

請參閱

參考

ReportServerCredentials 類別

Microsoft.Reporting.WinForms 命名空間