Пример #1
0
        /// <summary>
        /// Sets the IIS machine key. Configures algorithms and keys to use for encryption,
        /// decryption, and validation of forms-authentication data and view-state data, and
        /// for out-of-process session state identification.
        /// </summary>
        /// <param name="configuration"></param>
        /// <param name="validationKey">Specifies the key used to validate encrypted data</param>
        /// <param name="decryptionKey">Specifies the key that is used to encrypt and decrypt data or the process by which the key is generated</param>
        /// <param name="validation">Specifies the type of encryption that is used to validate data</param>
        /// <returns></returns>
        public static IOfferRemoteConfiguration IisMachineKey(this IOfferRemoteConfiguration configuration, string validationKey, string decryptionKey, MachineKeyValidation validation)
        {
            var operation = new SetIisMachineKeyOperation(validationKey, decryptionKey, validation);

            OperationExecutor.Execute((RemoteBuilder)configuration, operation);
            return(configuration);
        }
Пример #2
0
        /// <summary>
        /// Sets the IIS machine key. Configures algorithms and keys to use for encryption,
        /// decryption, and validation of forms-authentication data and view-state data, and
        /// for out-of-process session state identification.
        /// </summary>
        /// <param name="configuration"></param>
        /// <param name="validationKey">Specifies the key used to validate encrypted data</param>
        /// <param name="decryptionKey">Specifies the key that is used to encrypt and decrypt data or the process by which the key is generated</param>
        /// <param name="validation">Specifies the type of encryption that is used to validate data</param>
        /// <returns></returns>
        public static IOfferRemoteConfiguration IisMachineKey(this IOfferRemoteConfiguration configuration, string validationKey, string decryptionKey, MachineKeyValidation validation)
        {
            var operation = new SetIisMachineKeyOperation(validationKey, decryptionKey, validation);

            Configure.Operation(configuration, operation);
            return(configuration);
        }