Microsoft windows machine keys

C\Programdata\microsoft\Crypto\RSA\Machinekeys is corrupt and unreadable.

C\Programdata\microsoft\Crypto\RSA\Machinekeys is corrupt and unreadable. I use Charter Security Suite, but cannot use clean up tool on it. Suggestions. The above information pops up when I first start my computer.

Replies (1) 

As per the description, you are experiencing issue with C\Programdata\microsoft\Crypto\RSA\Machinekeys is corrupt and unreadable on the system.

I certainly understand your concern.

I would suggest you to try the following methods and check if that helps.

Method 1:

I would suggest you to run the disk cleanup utility in the system and check if it helps.

Note: Windows Disk Cleanup helps you find files that can be deleted, and gives you the option to decide which of those files you can safely remove to improve the performance of your computer beyond emptying your recycle bin.

Disk cleanup utility does not grossly over-estimate the amount of space it could free. The cleanup process firstly involves searching and analyzing the hard drive for files that are no longer of any use. It then proceeds to remove the unnecessary files, freeing up disk space on the hard drive. However we need to put a check mark next to all the options that are available to get the free space calculated by Disk Cleanup utility.

Delete files using Disk Cleanup.

If the issue still persists, follow method 2

Method 2:

Run a full computer scan with the Microsoft Safety Scanner to make sure that the computer is virus free.

Microsoft Safety Scanner, please follow the steps in the link provided below.

Note: Any data files that are infected may only be cleaned by deleting the file entirely, which means there is a potential for data loss.

For reference:

I would suggest you to refer to the suggestions posted by “Rohit Siddegowda” replied on September 10, 2013 in the following Microsoft Community link given below and check if it helps.

I hope this information helps.

Please do let us know if you need any further assistance, we will be glad to assist you.

Замените ASP.NET machineKey в ASP.NET Core Replace the ASP.NET machineKey in ASP.NET Core

Реализация элемента в ASP.NET является заменяемой. The implementation of the element in ASP.NET is replaceable. Это позволяет направлять большинство вызовов ASP.NET шифрования через механизм защиты данных с заменой, включая новую систему защиты данных. This allows most calls to ASP.NET cryptographic routines to be routed through a replacement data protection mechanism, including the new data protection system.

Установка пакета Package installation

Новую систему защиты данных можно установить только в существующее приложение ASP.NET, предназначенное для .NET 4.5.1 или более поздней версии. The new data protection system can only be installed into an existing ASP.NET application targeting .NET 4.5.1 or later. Установка завершится ошибкой, если приложение предназначено для .NET 4,5 или более ранней версии. Installation will fail if the application targets .NET 4.5 or lower.

Чтобы установить новую систему защиты данных в существующий проект ASP.NET 4.5.1 +, установите пакет Microsoft.AspNetCore.DataProtection.SysТемвеб. To install the new data protection system into an existing ASP.NET 4.5.1+ project, install the package Microsoft.AspNetCore.DataProtection.SystemWeb. При этом будет создан экземпляр системы защиты данных с использованием параметров конфигурации по умолчанию . This will instantiate the data protection system using the default configuration settings.

При установке пакета он вставляет строку в Web.config , которая указывает ASP.NET использовать ее для большинства криптографических операций, включая проверку подлинности с помощью форм, состояние представления и вызовы machineKey. Protect. When you install the package, it inserts a line into Web.config that tells ASP.NET to use it for most cryptographic operations, including forms authentication, view state, and calls to MachineKey.Protect. Вставленная строка считывается следующим образом. The line that’s inserted reads as follows.

Вы можете определить, активна ли новая система защиты данных, проверив такие поля __VIEWSTATE , как, которые должны начинаться с «CfDJ8», как показано в примере ниже. You can tell if the new data protection system is active by inspecting fields like __VIEWSTATE , which should begin with «CfDJ8» as in the example below. «CfDJ8» — это представление в формате Base64 заголовка Magic «09 F0 C9 F0», определяющего полезную нагрузку, защищенную системой защиты данных. «CfDJ8» is the base64 representation of the magic «09 F0 C9 F0» header that identifies a payload protected by the data protection system.

Конфигурация пакета Package configuration

Создается экземпляр системы защиты данных с конфигурацией нулевой установки по умолчанию. The data protection system is instantiated with a default zero-setup configuration. Однако поскольку ключи по умолчанию сохраняются в локальной файловой системе, это не будет работать для приложений, развернутых в ферме. However, since by default keys are persisted to the local file system, this won’t work for applications which are deployed in a farm. Чтобы устранить эту проблему, можно предоставить конфигурацию, создав тип, который подклассировать Датапротектионстартуп и переопределяющий его метод ConfigureServices. To resolve this, you can provide configuration by creating a type which subclasses DataProtectionStartup and overrides its ConfigureServices method.

Ниже приведен пример настраиваемого типа запуска защиты данных, который настроил, где хранятся ключи, и как они шифруются при хранении. Below is an example of a custom data protection startup type which configured both where keys are persisted and how they’re encrypted at rest. Он также переопределяет политику изоляции приложений по умолчанию, предоставляя собственное имя приложения. It also overrides the default app isolation policy by providing its own application name.

Читайте также:  Windows store кнопка установить не работает

Можно также использовать вместо явного вызова SetApplicationName. You can also use in place of an explicit call to SetApplicationName. Это удобный механизм, позволяющий не заставлять разработчику создавать Датапротектионстартуп-производный тип, если все, что нужно настроить, задает имя приложения. This is a convenience mechanism to avoid forcing the developer to create a DataProtectionStartup-derived type if all they wanted to configure was setting the application name.

Введите пустое значение с указанием имени сборки только что созданного типа Датапротектионстартуп. Fill in the blank value with the assembly-qualified name of the DataProtectionStartup-derived type you just created. Если имя приложения — Датапротектиондемо, это будет выглядеть, как показано ниже. If the name of the application is DataProtectionDemo, this would look like the below.

Недавно настроенная система защиты данных теперь готова к использованию внутри приложения. The newly-configured data protection system is now ready for use inside the application.

Разрешения по умолчанию для папок MachineKeys

В этой статье описываются разрешения по умолчанию для папок MachineKeys.

Оригинальная версия продукта: Windows Server 2003
Исходный номер КБ: 278381

Аннотация

В папке MachineKeys хранится пара ключей сертификата как для компьютера, так и для пользователей. Эту папку используют как службы сертификата, так и Internet Explorer. Разрешения по умолчанию в папке могут вводить в заблуждение при попытке определить минимальные разрешения, необходимые для правильной установки и доступа к сертификатам.

Разрешения по умолчанию для папки MachineKeys

Папка MachineKeys расположена под All Users Profile\Application Data\Microsoft\Crypto\RSA папкой. Если администратор не установил папку до минимального уровня, пользователь может получить следующие ошибки при создании сертификата сервера с помощью сервера информации в Интернете (IIS).:

  • Не удалось создать запрос сертификата
  • Внутренняя ошибка сервера (Для импорта частного ключа может потребоваться поставщик криптографических служб, который не установлен в вашей системе)

Следующие параметры — это разрешения по умолчанию для папки MachineKeys:

  • Администраторы (полный контроль) Только эта папка
  • Каждый (специальный) Только эта папка

Разрешения для всех групп

Чтобы просмотреть специальные разрешения для группы Everyone, щелкните правой кнопкой мыши папку MachineKeys, выберите Расширенный на вкладке Безопасность, а затем выберите View/Edit. Разрешения состоят из следующих разрешений:

  • Папка списка и данные чтения
  • Атрибуты чтения
  • Чтение расширенных атрибутов
  • Создание файлов и записи данных
  • Создание папок и данных приложения
  • Записывая атрибутика
  • Записывая расширенные атрибуты
  • Чтение разрешений

Выберите «Разрешения сброса» на всех объектах Child и в поле «Разрешить доступ к наследуемым разрешениям». Администратор не имеет полного контроля над детскими объектами, чтобы защитить частную часть пары ключей пользователя. Но администратор по-прежнему может удалять сертификаты для пользователя.

Дополнительные сведения см. в следующей статье:

Настройка необходимых разрешений и прав пользователей NTFS для веб-сервера IIS 5.0, IIS 5.1 или IIS 6.0.

Default permissions for the MachineKeys folders

This article describes default permissions for the MachineKeys folders.

Original product version: В Windows Server 2003
Original KB number: В 278381

Summary

The MachineKeys folder stores certificate pair keys for both the computer and users. Both Certificate services and Internet Explorer use this folder. The default permissions on the folder may be misleading when you attempt to determine the minimum permissions that are necessary for proper installation and the accessing of certificates.

Default permissions for MachineKeys folder

The MachineKeys folder is located under the All Users Profile\Application Data\Microsoft\Crypto\RSA folder. If the administrator didn’t set the folder to the minimum level, a user may receive the following errors when generating a server certificate by using Internet Information Server (IIS).:

  • Failed to Generate Certificate Request
  • Internal Server Error (The Private Key that you are importing might require a cryptographic service provider that is not installed on your system)

The following settings are the default permissions for the MachineKeys folder:

  • Administrators (Full Control) This folder only
  • Everyone (Special) This folder only

Permissions for Everyone group

To view the special permissions for the Everyone group, right-click the MachineKeys folder, select Advanced on the Security tab, and then select View/Edit. The permissions consist of the following permissions:

  • List Folder/Read Data
  • Read Attributes
  • Read Extended Attributes
  • Create Files/Write Data
  • Create Folders/Append Data
  • Write Attributes
  • Write Extended Attributes
  • Read Permissions

Select the Reset Permissions on all Child objects and enable propagation of inheritable permissions check box. The administrator doesn’t have full control on child objects to protect a user’s private part of the key pair. But the administrator can still delete certificates for a user.

For more information, see the following article:

Machine Key Section Класс

Определение

Определяет параметры конфигурации, управляющие созданием ключа и алгоритмами, используемыми при шифровании, расшифровке, а также операциями кода проверки подлинности сообщений (MAC) при проверке подлинности Windows Forms, проверке состояния просмотра и изоляции приложения состояния сеанса. Defines the configuration settings that control the key generation and algorithms that are used in encryption, decryption, and message authentication code (MAC) operations in Windows Forms authentication, view-state validation, and session-state application isolation. Этот класс не наследуется. This class cannot be inherited.

Примеры

В примере в этом разделе показано, как декларативно указать значения для нескольких атрибутов раздела machineKey , к которым также можно получить доступ как к членам MachineKeySection класса. The example in this section demonstrates how to specify values declaratively for several attributes of the machineKey section, which can also be accessed as members of the MachineKeySection class.

В следующем примере из файла конфигурации показано, как декларативно указать значения для раздела machineKey . The following example from a configuration file shows how to specify values declaratively for the machineKey section.

Читайте также:  При запуск windows компьютер перезагружается

В этом примере используется SHA1. This example uses SHA1. Из-за конфликта с SHA1 корпорация Майкрософт рекомендует использовать SHA256. Due to collision problems with SHA1, Microsoft recommends SHA256.

В следующем примере показано, как использовать MachineKeySection класс в коде. The following example demonstrates how to use the MachineKeySection class in code.

Комментарии

MachineKeySectionКласс предоставляет способ программного доступа к содержимому MachineKey раздела в файле конфигурации и его изменения. The MachineKeySection class provides a way to programmatically access and modify the content of the MachineKey section in the configuration file. MachineKey Раздел можно настроить на уровне компьютера (Machine.config) или приложения (Web.config) и управляет ключами и алгоритмами, используемыми для проверки подлинности Windows Forms, проверки состояния представления и изоляции приложения состояния сеанса. The MachineKey section can be configured at the machine (Machine.config) or application (Web.config) level and controls the keys and algorithms that are used for Windows Forms authentication, view-state validation, and session-state application isolation. Чтобы любая из этих функций работала в сети веб-серверов (веб-ферма), DecryptionKey ValidationKey атрибуты и MachineKey раздела должны быть настроены явно и одинаково с допустимыми значениями ключа. For any of these features to work across a network of Web servers (a Web farm), the DecryptionKey and ValidationKey attributes of the MachineKey section must be configured explicitly and identically with valid key values. Это AutoGenerate значение не подходит для веб-ферм, поскольку оно основывается на криптографически случайном секрете, который сохраняется с помощью защиты на уровне компьютера и не будет одинаковым на нескольких компьютерах. The AutoGenerate value does not work for Web farms, because it relies on a cryptographically random secret, which is persisted using machine-local protection and will not be the same across more than one computer.

Примечания для тех, кто наследует этот метод

Если вы хотите указать ключи в этом разделе конфигурации, как это необходимо в сценариях веб-фермы, рекомендуется зашифровать этот раздел с помощью защищенной конфигурации. If you to specify keys in this configuration section, as is required in Web-farm scenarios, it is recommended that you encrypt this section by using protected configuration.

Конструкторы

Инициализирует новый экземпляр класса MachineKeySection с использованием параметров по умолчанию. Initializes a new instance of the MachineKeySection class by using default settings.

Свойства

Возвращает или задает имя приложения. Gets or sets the name of the application.

Получает или задает значение, указывающее, используются ли обновленные методы шифрования для просмотра состояния, введенные после выпуска платформы .NET Framework версии 2.0 с пакетом обновления 1. Gets or sets a value that specifies whether upgraded encryption methods for view state that were introduced after the .NET Framework version 2.0 Service Pack 1 release are used.

Возвращает ссылку на экземпляр Configuration верхнего уровня, представляющий иерархию конфигурации, к которой относится текущий экземпляр ConfigurationElement. Gets a reference to the top-level Configuration instance that represents the configuration hierarchy that the current ConfigurationElement instance belongs to.

(Унаследовано от ConfigurationElement) DataProtectorType

Получает или задает имя типа предохранителя данных. Gets or sets the name of the data protector type. Значение по умолчанию — Empty. The default is Empty.

Задает алгоритм шифрования, используемый для шифрования и расшифровки данных проверки подлинности форм. Specifies the encryption algorithm that is used for encrypting and decrypting forms authentication data.

Получает или задает ключ, используемый для шифрования и расшифровки данных, или процесс, с помощью которого создается ключ. Gets or sets the key that is used to encrypt and decrypt data, or the process by which the key is generated.

Возвращает объект ElementInformation, содержащий неизменяемую информацию и функциональность объекта ConfigurationElement. Gets an ElementInformation object that contains the non-customizable information and functionality of the ConfigurationElement object.

(Унаследовано от ConfigurationElement) ElementProperty

Возвращает объект ConfigurationElementProperty, представляющий сам объект ConfigurationElement. Gets the ConfigurationElementProperty object that represents the ConfigurationElement object itself.

(Унаследовано от ConfigurationElement) EvaluationContext

(Унаследовано от ConfigurationElement) HasContext

Возвращает значение, указывающее, имеет ли свойство CurrentConfiguration значение null . Gets a value that indicates whether the CurrentConfiguration property is null .

(Унаследовано от ConfigurationElement) Item[ConfigurationProperty]

Возвращает или задает свойство или атрибут данного элемента конфигурации. Gets or sets a property or attribute of this configuration element.

(Унаследовано от ConfigurationElement) Item[String]

Получает или задает свойство, атрибут или дочерний элемент данного элемента конфигурации. Gets or sets a property, attribute, or child element of this configuration element.

(Унаследовано от ConfigurationElement) LockAllAttributesExcept

Возвращает коллекцию заблокированных атрибутов. Gets the collection of locked attributes.

(Унаследовано от ConfigurationElement) LockAllElementsExcept

Возвращает коллекцию заблокированных элементов. Gets the collection of locked elements.

(Унаследовано от ConfigurationElement) LockAttributes

Возвращает коллекцию заблокированных атрибутов. Gets the collection of locked attributes.

(Унаследовано от ConfigurationElement) LockElements

Возвращает коллекцию заблокированных элементов. Gets the collection of locked elements.

(Унаследовано от ConfigurationElement) LockItem

Возвращает или задает значение, указывающее, заблокирован ли элемент. Gets or sets a value indicating whether the element is locked.

(Унаследовано от ConfigurationElement) Properties

Возвращает коллекцию свойств. Gets the collection of properties.

(Унаследовано от ConfigurationElement) SectionInformation

Возвращает объект SectionInformation, содержащий неизменяемую информацию и функциональность объекта ConfigurationSection. Gets a SectionInformation object that contains the non-customizable information and functionality of the ConfigurationSection object.

(Унаследовано от ConfigurationSection) Validation

Указывает алгоритм шифрования, используемый для проверки данных проверки подлинности с помощью форм и просмотра сведений о состоянии. Specifies the hashing algorithm that is used for validating forms authentication and view state data.

Получает или задает имя алгоритма, используемого для проверки данных проверки подлинности с помощью форм и просмотра сведений о состоянии. Gets or sets the name of the algorithm that is used to validate forms authentication and view state data.

Читайте также:  Какое приложение windows не является стандартным

Получает или задает ключ, используемый для проверки данных проверки подлинности с помощью форм и просмотра сведений о состоянии, или процесс, благодаря которому создается этот ключ. Gets or sets the key that is used to validate forms authentication and view state data, or the process by which the key is generated.

Методы

Считывает XML из файла конфигурации. Reads XML from the configuration file.

(Унаследовано от ConfigurationElement) DeserializeSection(XmlReader)

Считывает XML из файла конфигурации. Reads XML from the configuration file.

(Унаследовано от ConfigurationSection) Equals(Object)

Сравнивает текущий экземпляр ConfigurationElement с указанным объектом. Compares the current ConfigurationElement instance to the specified object.

(Унаследовано от ConfigurationElement) GetHashCode()

Получает уникальное значение, представляющее текущий экземпляр ConfigurationElement. Gets a unique value representing the current ConfigurationElement instance.

(Унаследовано от ConfigurationElement) GetRuntimeObject()

Возвращает пользовательский объект при переопределении в производном классе. Returns a custom object when overridden in a derived class.

(Унаследовано от ConfigurationSection) GetTransformedAssemblyString(String)

Возвращает преобразованную версию указанного имени сборки. Returns the transformed version of the specified assembly name.

(Унаследовано от ConfigurationElement) GetTransformedTypeString(String)

Возвращает преобразованную версию указанного имени типа. Returns the transformed version of the specified type name.

(Унаследовано от ConfigurationElement) GetType()

Возвращает объект Type для текущего экземпляра. Gets the Type of the current instance.

(Унаследовано от Object) Init()

Задает объект ConfigurationElement в исходное состояние. Sets the ConfigurationElement object to its initial state.

(Унаследовано от ConfigurationElement) InitializeDefault()

Используется для инициализации набора значений по умолчанию для объекта ConfigurationElement. Used to initialize a default set of values for the ConfigurationElement object.

(Унаследовано от ConfigurationElement) IsModified()

При реализации в производном классе указывает, был ли изменен данный элемент конфигурации с момента последнего сохранения или загрузки. Indicates whether this configuration element has been modified since it was last saved or loaded when implemented in a derived class.

(Унаследовано от ConfigurationSection) IsReadOnly()

Получает значение, показывающее, является ли объект ConfigurationElement доступным только для чтения. Gets a value indicating whether the ConfigurationElement object is read-only.

(Унаследовано от ConfigurationElement) ListErrors(IList)

Добавляет ошибку «недействительное свойство» в данном объекте ConfigurationElement и всех его дочерних элементах к переданному списку. Adds the invalid-property errors in this ConfigurationElement object, and in all subelements, to the passed list.

(Унаследовано от ConfigurationElement) MemberwiseClone()

Создает неполную копию текущего объекта Object. Creates a shallow copy of the current Object.

(Унаследовано от Object) OnDeserializeUnrecognizedAttribute(String, String)

Возвращает значение, указывающее, встретился ли неизвестный атрибут при десериализации. Gets a value indicating whether an unknown attribute is encountered during deserialization.

(Унаследовано от ConfigurationElement) OnDeserializeUnrecognizedElement(String, XmlReader)

Возвращает значение, указывающее, встретился ли неизвестный элемент при десериализации. Gets a value indicating whether an unknown element is encountered during deserialization.

(Унаследовано от ConfigurationElement) OnRequiredPropertyNotFound(String)

Выдает исключение, если требуемое свойство не найдено. Throws an exception when a required property is not found.

(Унаследовано от ConfigurationElement) PostDeserialize()

Вызывается после десериализации. Called after deserialization.

(Унаследовано от ConfigurationElement) PreSerialize(XmlWriter)

Вызывается до сериализации. Called before serialization.

(Унаследовано от ConfigurationElement) Reset(ConfigurationElement)

Восстанавливает внутреннее состояние объекта ConfigurationElement, включая блокировки и коллекции свойств. Resets the internal state of the ConfigurationElement object, including the locks and the properties collections.

(Унаследовано от ConfigurationElement) ResetModified()

Переустанавливает значение метода IsModified() в false при реализации в производном классе. Resets the value of the IsModified() method to false when implemented in a derived class.

(Унаследовано от ConfigurationSection) SerializeElement(XmlWriter, Boolean)

Записывает содержание данного элемента конфигурации в файл конфигурации при реализации в производном классе. Writes the contents of this configuration element to the configuration file when implemented in a derived class.

(Унаследовано от ConfigurationElement) SerializeSection(ConfigurationElement, String, ConfigurationSaveMode)

Создает XML-строку, содержащую разъединенное представление об объекте ConfigurationSection, как об отдельном разделе, записываемым в файл. Creates an XML string containing an unmerged view of the ConfigurationSection object as a single section to write to a file.

(Унаследовано от ConfigurationSection) SerializeToXmlElement(XmlWriter, String)

Записывает внешние теги данного элемента конфигурации в файл конфигурации при реализации в производном классе. Writes the outer tags of this configuration element to the configuration file when implemented in a derived class.

(Унаследовано от ConfigurationElement) SetPropertyValue(ConfigurationProperty, Object, Boolean)

Задает для свойства указанное значение. Sets a property to the specified value.

(Унаследовано от ConfigurationElement) SetReadOnly()

Задает свойство IsReadOnly() для объекта ConfigurationElement и всех подчиненных элементов. Sets the IsReadOnly() property for the ConfigurationElement object and all subelements.

(Унаследовано от ConfigurationElement) ShouldSerializeElementInTargetVersion(ConfigurationElement, String, FrameworkName)

Указывает, следует ли сериализовать указанный элемент при сериализации иерархии объекта конфигурации для указанной целевой версии платформа .NET Framework. Indicates whether the specified element should be serialized when the configuration object hierarchy is serialized for the specified target version of the .NET Framework.

(Унаследовано от ConfigurationSection) ShouldSerializePropertyInTargetVersion(ConfigurationProperty, String, FrameworkName, ConfigurationElement)

Указывает, должно ли заданное свойство быть сериализовано при сериализации иерархии объекта конфигурации для указанной целевой версии платформа .NET Framework. Indicates whether the specified property should be serialized when the configuration object hierarchy is serialized for the specified target version of the .NET Framework.

(Унаследовано от ConfigurationSection) ShouldSerializeSectionInTargetVersion(FrameworkName)

Указывает, следует ли ConfigurationSection сериализовать текущий экземпляр при сериализации иерархии объекта конфигурации для указанной целевой версии платформа .NET Framework. Indicates whether the current ConfigurationSection instance should be serialized when the configuration object hierarchy is serialized for the specified target version of the .NET Framework.

(Унаследовано от ConfigurationSection) ToString()

Возвращает строку, представляющую текущий объект. Returns a string that represents the current object.

(Унаследовано от Object) Unmerge(ConfigurationElement, ConfigurationElement, ConfigurationSaveMode)

Изменяет объект ConfigurationElement для удаления всех значений, которые не должны сохраняться. Modifies the ConfigurationElement object to remove all values that should not be saved.

Оцените статью