共用方式為


ReportServiceAuthentication.LogonUser 方法

Logs on a user and authenticates a user request to the Report Server Web service.

命名空間:  ReportServiceAuthentication
組件:  ReportServiceAuthentication (在 ReportServiceAuthentication.dll 中)

語法

'宣告
<SoapDocumentMethodAttribute("https://schemas.microsoft.com/sqlserver/2006/03/15/reporting/reportingservices/LogonUser", RequestNamespace := "https://schemas.microsoft.com/sqlserver/2006/03/15/reporting/reportingservices",  _
    ResponseNamespace := "https://schemas.microsoft.com/sqlserver/2006/03/15/reporting/reportingservices",  _
    Use := SoapBindingUse.Literal, ParameterStyle := SoapParameterStyle.Wrapped)> _
Public Function LogonUser ( _
    userName As String, _
    password As String, _
    authority As String, _
    <OutAttribute> ByRef cookieName As String _
) As Boolean
'用途
Dim instance As ReportServiceAuthentication 
Dim userName As String 
Dim password As String 
Dim authority As String 
Dim cookieName As String 
Dim returnValue As Boolean 

returnValue = instance.LogonUser(userName, _
    password, authority, cookieName)
[SoapDocumentMethodAttribute("https://schemas.microsoft.com/sqlserver/2006/03/15/reporting/reportingservices/LogonUser", RequestNamespace = "https://schemas.microsoft.com/sqlserver/2006/03/15/reporting/reportingservices", 
    ResponseNamespace = "https://schemas.microsoft.com/sqlserver/2006/03/15/reporting/reportingservices", 
    Use = SoapBindingUse.Literal, ParameterStyle = SoapParameterStyle.Wrapped)]
public bool LogonUser(
    string userName,
    string password,
    string authority,
    out string cookieName
)
[SoapDocumentMethodAttribute(L"https://schemas.microsoft.com/sqlserver/2006/03/15/reporting/reportingservices/LogonUser", RequestNamespace = L"https://schemas.microsoft.com/sqlserver/2006/03/15/reporting/reportingservices", 
    ResponseNamespace = L"https://schemas.microsoft.com/sqlserver/2006/03/15/reporting/reportingservices", 
    Use = SoapBindingUse::Literal, ParameterStyle = SoapParameterStyle::Wrapped)]
public:
bool LogonUser(
    String^ userName, 
    String^ password, 
    String^ authority, 
    [OutAttribute] String^% cookieName
)
[<SoapDocumentMethodAttribute("https://schemas.microsoft.com/sqlserver/2006/03/15/reporting/reportingservices/LogonUser", RequestNamespace = "https://schemas.microsoft.com/sqlserver/2006/03/15/reporting/reportingservices", 
    ResponseNamespace = "https://schemas.microsoft.com/sqlserver/2006/03/15/reporting/reportingservices", 
    Use = SoapBindingUse.Literal, ParameterStyle = SoapParameterStyle.Wrapped)>]
member LogonUser : 
        userName:string * 
        password:string * 
        authority:string * 
        cookieName:string byref -> bool
public function LogonUser(
    userName : String, 
    password : String, 
    authority : String, 
    cookieName : String
) : boolean

參數

  • authority
    型別:System.String
    Optional. The domain name to use when authenticating a user. Pass a value of nullnull 參考 (在 Visual Basic 中為 Nothing) (Nothing in Visual Basic) to omit this argument.
  • cookieName
    型別:System.String%
    The name assigned to the cookie.

傳回值

型別:System.Boolean
true if the user was successfully authenticated; otherwise, false.

請參閱

參考

ReportServiceAuthentication 類別

ReportServiceAuthentication 命名空間