I'm trying to create an exportable key set using aspnet regiis, here is the command I'm running:
C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319>aspnet_regiis -pc "SampleKeys" -exp
But the response is the same as if the tool is given a command it doesn't recognise:
Administration utility (4.0.30319) to install and uninstall ASP.NET on the local machine.
Copyright (c) Microsoft Corporation. All rights reserved.
Followed by regular command-line help section
So I ommitted the -exp flag and just ran
C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319>aspnet_regiis -pc "SampleKeys"
Which worked fine, but when I try to export the key using this command:
aspnet_regiis -px "SampleKeys" "C:\SampleKeys.xml" -pri
I get the following:
Exporting RSA Keys to file...
Key not valid for use in specified state.
Failed!
Has anyone had this problem before? I seemed to be able to do this without issue a few months ago. I've tried this on several machines and different .NET versions already and the same result is returned....