-
Notifications
You must be signed in to change notification settings - Fork 87
DataProtection: XmlNamespace, Configuration, Options #51
Comments
Created a module for https://support.microsoft.com/kb/2915218 Generate-MachineKeys Run Generate-MachineKeys to create the machinekey xml needed for web.config. Not sure however why the AppData\local\ASP.NET\ folder started to appear with key. It could have been for executing the Provision-AutoGenKeys cmdlet but I had to modified this cmdlet to not use UPN. Any ideas? |
The <machineKey> element from previous versions of ASP.NET doesn't apply to ASP.NET 5. DataProtection uses its own independent configuration mechanism. Can you elaborate further on your environment? For instance, are you seeing this in IIS Express or full IIS? If it's in full IIS, what user account (app pool identity, network service, etc.) is the application pool running under? |
BTW, to immediately unblock yourself, you can delete the contents of the |
A few things I know I did before it started working. I granted my id ownerhsip of my hard drive, ran the Provision-AutoGenKey, and deleted the contents of the %LocalAppData%\AspNet folder. |
After review the following error and the associated assembly source, I'm led to believe this error is associated with configuring, the equivalent machineKey section found in the machine or web.config, DataProtection.
For example the CngCbcAuthenticatedEncryptorConfiguration.cs references the http://www.asp.net/2014/dataProtection/cng xmlnamespace. I also found the CngCbcAuthenticatedEncryptorConfigurationOptions.cs which implies configuring the option in Startup.cs.
One final thought, I aslo found https://support.microsoft.com/kb/2915218 which contains powershell scripts for Generate-MachineKey or Provision-AutoGenKeys.
So, what is the preferred way to configure the DataProtection to avoid the error below?
The text was updated successfully, but these errors were encountered: