Share via


Benign OWSTimer unhandled exception popup – System.Security.Cryptographic.CryptographicException

Have you seen this popup exception message from the Visual Studio Just-In-Time (JIT) Debugger?

clip_image002[6]

Here’s the resulting event log error:

 

An unhandled exception occurred and the process was terminated.

Application ID: DefaultDomain

Process ID: 6148

Exception: System.Security.Cryptography.CryptographicException

Message: Keyset does not exist

StackTrace: at System.Security.Cryptography.CryptographicException.ThrowCryptogaphicException(Int32 hr)

   at System.Security.Cryptography.SafeProvHandle._FreeCSP(IntPtr pProvCtx)

   at System.Security.Cryptography.SafeProvHandle.ReleaseHandle()

   at System.Runtime.InteropServices.SafeHandle.InternalFinalize()

   at System.Runtime.InteropServices.SafeHandle.Dispose(Boolean disposing)

   at System.Runtime.InteropServices.SafeHandle.Finalize()

 

If you see this error message from SharePoint 2010 you can relax, nothing bad is happening. When SharePoint 2010 and Visual Studio 2010 are both installed on the same machine you may see this error every 24 hours. This occurs when the OWSTimer service has a regular process recycle and in the shutdown of the old process an exception is raised. The exception doesn’t interfere with the normal process shutdown and recycle and is only ever seen if you have a JIT debugger installed on the machine. You should never see this error on a production SharePoint 2010 server, because you should not be installing Visual Studio 2010 on those servers. You can safely ignore these exceptions and close the window, or leave it there. You actually cannot debug the process, because it will already have been closed by the time you click the button and start your debugger.

You can avoid the popup exception message entirely by disabling JIT debugging on your machine. Bear in mind this will disable JIT debugging for all applications on the machine.

To configure the server to no longer show a dialog when an unhandled exception occurs, use the registry editor to delete the following registry keys:

· HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AeDebug\Debugger

· HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework\DbgManagedDebugger

On a 64-bit operating system also delete the following registry keys:

· HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows NT\CurrentVersion\AeDebug\Debugger

· HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\.NETFramework\DbgManagedDebugger

More details on JIT Debugging are at:

https://msdn.microsoft.com/en-us/library/5hs4b7a6(VS.80).aspx

Comments

  • Anonymous
    July 18, 2011
    Thanks to Paul Andrew for his permission to re-post this issue for the Project Server audience.