Thursday, April 1, 2010

Sitecore - CryptographicException file not found

I’ve got an issue with CryptographicException file not found in Sitecore. See details below

Server Error in '/' Application.

The system cannot find the file specified.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Security.Cryptography.CryptographicException: The system cannot find the file specified.
Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:

[CryptographicException: The system cannot find the file specified.
System.Security.Cryptography.Utils.CreateProvHandle(CspParameters parameters, Boolean randomKeyContainer) +7715070
System.Security.Cryptography.DSACryptoServiceProvider.ImportParameters(DSAParameters parameters) +258
System.Security.Cryptography.DSA.FromXmlString(String xmlString) +501
Sitecore.Nexus.Licensing.NexusLicenseApi.(String xml, Guid instance) +124
Sitecore.Nexus.Licensing.NexusLicenseApi.GetSnapShot(Guid instance) +683
Sitecore.SecurityModel.License.LicenseManager.GetSnapshotData(Guid instance) +47
Sitecore.SecurityModel.License.LicenseManager.UpdateSnapshot() +70
Sitecore.SecurityModel.License.LicenseManager.Initialize() +8
Sitecore.Nexus.Web.HttpModule.Application_Start() +76
Sitecore.Nexus.Web.HttpModule.Init(HttpApplication app) +435
System.Web.HttpApplication.InitModulesCommon() +65
System.Web.HttpApplication.InitModules() +43
System.Web.HttpApplication.InitInternal(HttpContext context, HttpApplicationState state, MethodInfo[] handlers) +729
System.Web.HttpApplicationFactory.GetNormalApplicationInstance(HttpContext context) +298
System.Web.HttpApplicationFactory.GetApplicationInstance(HttpContext context) +107
System.Web.HttpRuntime.ProcessRequestInternal(HttpWorkerRequest wr) +289

Version Information: Microsoft .NET Framework Version:2.0.50727.4927; ASP.NET Version:2.0.50727.4927

After hours of trying to find the solution I’ve found out that this is IIS settings issue.   This issue was caused by MVC 2 installation, unfortunately it’s uninstall didn’t help.

To fix this:
1. go to IIS Manager
2. go to the application pool instance
3. click advanced settings
4. Under Process model, set Load User Profile to true
Hope this will help!


Anonymous said...

it works! thanks for the fix!

Anonymous said...

thanks a lot. it work)

realnero said...

Great! I'm always happy to help you guys!

MK said...

I am facing same issue... hosting provider said they using IIS 6.0 and it shared hosting.. is there any other way to solve this...

realnero said...

Is it 64bit or 32bit application?