Windows 2012 R2 Standard
ASP.NET
IIS 8.5
This error pops up from time to time
Log Name: Application
Source: ASP.NET 2.0.50727.0
Date: 7/5/2015 6:11:01 AM
Event ID: 1334
Task Category: None
Level: Error
Keywords: Classic
User: N/A
Computer: SERV013.FQDN.com
Description:
An unhandled exception occurred and the process was terminated.
Application ID: DefaultDomain
Process ID: 8732
Exception: System.Security.Cryptograp
hy.Cryptog
raphicExce
ption
Message: Keyset does not exist
StackTrace: at System.Security.Cryptograp
hy.Cryptog
raphicExce
ption.Thro
wCryptogap
hicExcepti
on(Int32 hr)
at System.Security.Cryptograp
hy.SafeKey
Handle._Fr
eeHKey(Int
Ptr pKeyCtx)
at System.Security.Cryptograp
hy.SafeKey
Handle.Rel
easeHandle
()
at System.Runtime.InteropServ
ices.SafeH
andle.Inte
rnalFinali
ze()
at System.Runtime.InteropServ
ices.SafeH
andle.Disp
ose(Boolea
n disposing)
at System.Runtime.InteropServ
ices.SafeH
andle.Fina
lize()
Event Xml:
<Event xmlns="
http://schemas.microsoft.com/win/2004/08/events/event">
<System>
<Provider Name="ASP.NET 2.0.50727.0" />
<EventID Qualifiers="49152">1334</E
ventID>
<Level>2</Level>
<Task>0</Task>
<Keywords>0x80000000000000
</Keywords
>
<TimeCreated SystemTime="2015-07-05T10:
11:01.0000
00000Z" />
<EventRecordID>29051</Even
tRecordID>
<Channel>Application</Chan
nel>
<Computer>SERV013.FQDN.com
</Computer
>
<Security />
</System>
<EventData>
<Data>An unhandled exception occurred and the process was terminated.
Application ID: DefaultDomain
Process ID: 8732
Exception: System.Security.Cryptograp
hy.Cryptog
raphicExce
ption
Message: Keyset does not exist
StackTrace: at System.Security.Cryptograp
hy.Cryptog
raphicExce
ption.Thro
wCryptogap
hicExcepti
on(Int32 hr)
at System.Security.Cryptograp
hy.SafeKey
Handle._Fr
eeHKey(Int
Ptr pKeyCtx)
at System.Security.Cryptograp
hy.SafeKey
Handle.Rel
easeHandle
()
at System.Runtime.InteropServ
ices.SafeH
andle.Inte
rnalFinali
ze()
at System.Runtime.InteropServ
ices.SafeH
andle.Disp
ose(Boolea
n disposing)
at System.Runtime.InteropServ
ices.SafeH
andle.Fina
lize()</Da
ta>
</EventData>
</Event>
Reported this a while back so I am opening it again.
I found this
https://msdn.microsoft.com/en-us/library/aa702621.aspx
How to retrieve thumb Print
https://msdn.microsoft.com/en-us/library/ms734695.aspx
User.FindPrivateKey My CurrentUser -n "CN=localhost" -a
findprivatekey.exe My CurrentUser -t "46 dd 0e 7a ed 0b 7a 31 9b 02 a3 a0 43 7a d8 3f 60 40 92 9d" -a
cacls.exe "C:\Documents and Settings\All Users\Application Data\Microsoft\Crypto\RSA\
MachineKey
s\8aeda5eb
81555f14f8
f9960745b5
a40d_38f7d
e48-5ee9-4
52d-8a5a-9
2789d7110b
1" /E /G "NETWORK SERVICE":R
It took me awhile to find "FindPrivateKey.EXE" but I now have it if anyone needs it you can find it here
http://blog.rhysgoodwin.com/windows-admin/findprivatekey-exe-pre-compiled/
so I ran the one above
C:\Util>findprivatekey My currentuser -n "CN=localhost" -a
FindPrivateKey failed for the following reason:
No certificates with key 'CN=localhost' found in the store.
Use /? option for help
I need to find which thumb pint it is so I can issue the cacls command
Also the path in the cacls is not correct for Windows 2012 Server after research I found the location of the machinekeys
C:\ProgramData\Microsoft\C
rypto\RSA\
MachineKey
s
I found another article that said to give administrators and system full control
I tried that and I received access denied on the machinekeys
So my questions are this
1. how to use the findprivtekey.exe properly to obtain the thumb print then the cacls command should work?
2. Why can't I add permissions to the folder "C:\ProgramData\Microsoft\
Crypto\RSA
\MachineKe
ys" access denied
Thanks
Tom