SecurityTokenServiceConfiguration.SecurityTokenService 属性

Gets or sets the type of the SecurityTokenService.

命名空间: Microsoft.IdentityModel.Configuration
程序集: Microsoft.IdentityModel(microsoft.identitymodel.dll 中)

用法

    Dim instance As SecurityTokenServiceConfiguration
Dim value As Type

value = instance.SecurityTokenService

instance.SecurityTokenService = value

语法

声明
Public Property SecurityTokenService As Type
public Type SecurityTokenService { get; set; }
public:
property Type^ SecurityTokenService {
    Type^ get ();
    void set (Type^ value);
}
/** @property */
public Type get_SecurityTokenService ()

/** @property */
public void set_SecurityTokenService (Type value)
public function get SecurityTokenService () : Type

public function set SecurityTokenService (value : Type)

属性值

Returns the Type of the Security Token Service.

示例

Following code snippet illustrates how to set custom security token service (MySecurityTokenService):

public class CustomSecurityTokenServiceConfiguration : SecurityTokenServiceConfiguration
    {
        public CustomSecurityTokenServiceConfiguration()
            : base( "My Security Token Service" )
        {
// Sets the security token service of type 
// MySecurityTokenService.
            SecurityTokenService = typeof( MySecurityTokenService );
        }
    }

异常

异常类型 条件
ArgumentNullException

The provided value is null.

备注

To configure security token service with a custom security token service, which is built by deriving from Security Token Service class, set this property to the type of custom security token service.

线程安全

此类型的任何公共静态(在 Visual Basic 中为 Shared)成员都是线程安全的。但不能保证任何实例成员是线程安全的。

平台

开发平台

Windows Server 2003, Windows Vista

Target Platforms

Windows Server 2008, Windows Vista, Not tested on Windows XP

Change History

请参见

参考

SecurityTokenServiceConfiguration 类
SecurityTokenServiceConfiguration 成员
Microsoft.IdentityModel.Configuration 命名空间