System.Security.Cryptography.CryptographicException

This is an open forum for any mojoPortal topics that don't fall into the other categories.

This thread is closed to new posts. You must sign in to post in the forums.
3/31/2009 3:24:27 PM
Gravatar
Total Posts 2239

System.Security.Cryptography.CryptographicException

I am receiving the error below after specifying SMTP settings via the Mail Settings tab on the Site Settings page.

 

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) +7710462
System.Security.Cryptography.RSACryptoServiceProvider.ImportParameters(RSAParameters parameters) +258
System.Security.Cryptography.RSA.FromXmlString(String xmlString) +470
mojoPortal.Web.Framework.CryptoHelper..cctor() +216

[TypeInitializationException: The type initializer for 'mojoPortal.Web.Framework.CryptoHelper' threw an exception.]
mojoPortal.Web.Framework.CryptoHelper.Encrypt(String clearText) +0
mojoPortal.Web.AdminUI.SiteSettingsPage.SetMailSettings() +95
mojoPortal.Web.AdminUI.SiteSettingsPage.btnSave_Click(Object sender, EventArgs e) +5064
System.Web.UI.WebControls.Button.OnClick(EventArgs e) +111
System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +110
System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +10
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +36
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1565

4/1/2009 7:24:28 AM
Gravatar
Total Posts 18439

Re: System.Security.Cryptography.CryptographicException

Does the file mojoEncryption.config exist in the root of the web? 

4/1/2009 7:02:45 PM
Gravatar
Total Posts 2239

Re: System.Security.Cryptography.CryptographicException

Yep, it's there. I didn't generate my own key or anything either.

4/2/2009 6:46:24 AM
Gravatar
Total Posts 18439

Re: System.Security.Cryptography.CryptographicException

Is it Medium Trust or any other configuration that might be relevant to produce this symptom?

I have added some extra error handling around that code in svn trunk, but I was not able to produce the problem so I'm not 100% sure if I fixed it.

Best,

Joe 

4/2/2009 10:47:25 AM
Gravatar
Total Posts 2239

Re: System.Security.Cryptography.CryptographicException

It's not Medium Trust. It is pretty much a basic install. I will see if I can reproduce in a different environment.

Thanks,
Joe

4/14/2009 8:19:13 AM
Gravatar
Total Posts 1

Re: System.Security.Cryptography.CryptographicException

Hi,

I have the same problem when i try to login, any solutions ???

You must sign in to post in the forums. This thread is closed to new posts.