Share via


WebServicesClientProtocol.SetServiceCredential Generic Method

Specifies the security credentials of the Web service.

Namespace: Microsoft.Web.Services3
Assembly: Microsoft.Web.Services3 (in microsoft.web.services3.dll)

Usage

'Usage
Public Class SomeType1
    Inherits SecurityToken
End Class
Dim serviceToken As SomeType1
Dim webServicesClientProtocol1 As WebServicesClientProtocol
webServicesClientProtocol1.SetServiceCredential(Of SomeType1)(serviceToken)

Syntax

'Declaration
Public Sub SetServiceCredential(Of TSecurityToken As SecurityToken)( _
    ByVal serviceToken As TSecurityToken _
)
public void SetServiceCredential<TSecurityToken>(
    TSecurityToken serviceToken
)
    where TSecurityToken : SecurityToken;
public:
generic<typename TSecurityToken>
void SetServiceCredential(
    TSecurityToken serviceToken
);
public void SetServiceCredential<TSecurityToken>(
    TSecurityToken serviceToken
);
    where TSecurityToken extends SecurityToken
In JScript, you cannot declare this method.

Parameters

  • serviceToken
    A SecurityToken that represents the security credentials of the Web service.

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Platforms

Development Platforms

Windows XP Home Edition, Windows XP Professional, Windows Server 2003, Windows 2000, Windows 2000 Server, Windows 2000 Advanced Server

Target Platforms

See Also

Reference

WebServicesClientProtocol Class
WebServicesClientProtocol Members
Microsoft.Web.Services3 Namespace

Other Resources

How to: Secure a Client Without Using a Policy File
How to: Secure a Client Using Mixed Policy and Code