X509TokenProvider.CreateToken Method (StoreLocation, StoreName, String, X509FindType)

Creates a X509SecurityToken security token using the specified certificate store location, certificate store name, the value to use to search within the certificate store, and how to find the certificate in the certificate store.

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

Usage

'Usage
Dim location As StoreLocation
Dim storeName As StoreName
Dim findValue As String
Dim findType As X509FindType
Dim returnValue As X509SecurityToken
returnValue = X509TokenProvider.CreateToken(location, storeName, findValue, findType)

Syntax

'Declaration
Overloads Public Shared Function CreateToken( _
    ByVal location As StoreLocation, _
    ByVal storeName As StoreName, _
    ByVal findValue As String, _
    ByVal findType As X509FindType _
) As X509SecurityToken
public static X509SecurityToken CreateToken(
    StoreLocation location, 
    StoreName storeName, 
    string findValue, 
    X509FindType findType
);
public:
static X509SecurityToken^ CreateToken(
    StoreLocation^ location,
    StoreName^ storeName,
    String^ findValue,
    X509FindType^ findType
);
public static X509SecurityToken CreateToken(
    StoreLocation location, 
    StoreName storeName, 
    System.String findValue, 
    X509FindType findType
);
public static function CreateToken(
     location : StoreLocation, 
     storeName : StoreName, 
     findValue : String, 
     findType : X509FindType
) : X509SecurityToken;

Parameters

  • location
    One of the System.Security.Cryptography.X509Certificates.StoreLocation values that specifies the location of the X.509 certificate store. Possible values are CurrentUser and LocalMachine.
  • storeName
    One of the System.Security.Cryptography.X509Certificates.StoreName values that specifies the name of the certificate store. Possible values are AddressBook, AuthRoot, CertificateAuthority, Disallowed, My, Root, TrustedPeople, and TrustedPublisher. The AddressBook store is the same store that is displayed in the Certificates MMC as OtherPeople.
  • findValue
    The value to search for in the certificate store.
  • findType
    One of the System.Security.Cryptography.X509Certificates.X509FindType values that specifies how to find the certificate in the certificate store. Possible values are FindByApplicationPolicy, FindByCertificatePolicy, FindByExtension, FindByIssuerDistinguishedName, FindByIssuerName, FindByKeyUsage, FindBySerialNumber, FindBySubjectDistinguishedName, FindBySubjectKeyIdentifier, FindBySubjectName, FindByTemplateName, FindByThumbprint, FindByTimeExpired, FindByTimeNotYetValid, and FindByTimeValid.

Return Value

A X509SecurityToken security token representing the X.509 certificate.

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

X509TokenProvider Class
X509TokenProvider Members
Microsoft.Web.Services3.Design Namespace