MachineKeySection.DecryptionKey 속성
정의
중요
일부 정보는 릴리스되기 전에 상당 부분 수정될 수 있는 시험판 제품과 관련이 있습니다. Microsoft는 여기에 제공된 정보에 대해 어떠한 명시적이거나 묵시적인 보증도 하지 않습니다.
데이터를 암호화 및 암호 해독하는 데 사용되는 키 또는 키가 생성되는 프로세스를 가져오거나 설정합니다.
public:
property System::String ^ DecryptionKey { System::String ^ get(); void set(System::String ^ value); };
[System.ComponentModel.TypeConverter(typeof(System.Configuration.WhiteSpaceTrimStringConverter))]
[System.Configuration.ConfigurationProperty("decryptionKey", DefaultValue="AutoGenerate,IsolateApps")]
[System.Configuration.StringValidator(MinLength=1)]
public string DecryptionKey { get; set; }
[<System.ComponentModel.TypeConverter(typeof(System.Configuration.WhiteSpaceTrimStringConverter))>]
[<System.Configuration.ConfigurationProperty("decryptionKey", DefaultValue="AutoGenerate,IsolateApps")>]
[<System.Configuration.StringValidator(MinLength=1)>]
member this.DecryptionKey : string with get, set
Public Property DecryptionKey As String
속성 값
키 값 또는 키가 생성되는 방법을 나타내는 값입니다. 기본값은 "AutoGenerate,IsolateApps"입니다.
- 특성
예제
다음 예제에서는 코드를 사용 하 여 속성을 설정 DecryptionKey 하는 방법을 보여 줍니다. 이 예제는 클래스에 제공된 더 큰 예제의 MachineKeySection 일부입니다.
// Display DecryptionKey property.
Console.WriteLine("DecryptionKey: {0}",
configSection.DecryptionKey);
' Display DecryptionKey property.
Console.WriteLine("DecryptionKey: {0}", configSection.DecryptionKey)
설명
이 DecryptionKey 속성은 Windows Forms 인증과 같은 암호화 및 암호 해독 및 속성이 "3DES" 또는 "AES"로 설정된 경우 Validation 뷰 상태에 사용됩니다.
"자동 생성" 옵션을 사용하여 ASP.NET 임의 키를 생성하고 로컬 보안 기관에 저장하도록 지정합니다. "자동 생성" 옵션은 기본값의 일부입니다.
"IsolateApps" 한정자를 "AutoGenerate" ValidationKey 값에 추가하는 경우 ASP.NET 각 애플리케이션을 AppDomainAppVirtualPath사용하여 각 애플리케이션에 대해 고유한 암호화된 키를 생성합니다. 이것이 기본 설정입니다.
"IsolateByAppId" 한정자를 "AutoGenerate" ValidationKey 값에 추가하는 경우 ASP.NET 각 애플리케이션을 AppDomainAppId사용하여 각 애플리케이션에 대해 고유한 암호화된 키를 생성합니다. 두 개의 고유 애플리케이션이 가상 경로를 공유하는 경우(아마도 해당 애플리케이션이 다른 포트에서 실행 중이기 때문) 이 플래그를 사용하여 서로 더 구별할 수 있습니다. "IsolateByAppId" 플래그는 ASP.NET 4.5에서만 인식되지만 설정에 MachineKeySection.CompatibilityMode 관계없이 사용할 수 있습니다.
웹 서버 네트워크(웹 팜)에서 구성을 지원해야 하는 경우 속성을 수동으로 설정 DecryptionKey 하여 일관된 구성을 보장합니다. 특성에 대한 값을 수동으로 생성하는 방법에 대한 DecryptionKey 자세한 내용은 방법: ASP.NET 2.0에서 MachineKey 구성을 참조하세요.
이 속성은 일반적으로 Web.config 파일의 machineKey 요소 특성에 선언적으로 DecryptionKey 설정됩니다. 자세한 내용은 machineKey 요소를 참조하세요.