System.Security.Cryptography.CryptographicException

Post here for help with installing or upgrading mojoPortal pre-compiled release packages. When posting in this forum, please provide all relevant details. You may also want to review the installation or upgrading documentation.

If you have questions about using the source code or working with mojoPortal in Visual Studio, please post in the Developer forum.

Post here for help with installation of mojoPortal pre-compiled release packages

When posting in this forum, please try to provide as many relevant details as possible. Particularly the following:

  • What operating system were you running when the bug appeared?
  • What database platform is your site using?
  • What version of mojoPortal are you running?
  • What version of .NET do you use?
  • What steps are necessary to reproduce the issue? Compare expected results vs actual results.

You may also want to review the installation or upgrading documentation.

If you have questions about using the source code or working with mojoPortal in Visual Studio, please post in the Developer forum.

This thread is closed to new posts. You must sign in to post in the forums.
6/22/2009 9:57:47 PM
Gravatar
Total Posts 9

Re: System.Security.Cryptography.CryptographicException

Sorry for the delay.  This is with the new dll - looks the same to me.

2009-06-22 19:31:52,447 INFO mojoPortal.Web.Global - Global.asax.cs Application_End
2009-06-22 19:39:58,457 INFO mojoPortal.Web.Global - Application Started.
2009-06-22 19:52:14,143 ERROR mojoPortal.Web.mojoBasePage - 68.167.146.229-en-US - /Admin/SiteSettings.aspx
System.Security.Cryptography.CryptographicException: The system cannot find the file specified.

at System.Security.Cryptography.Utils.CreateProvHandle(CspParameters parameters, Boolean randomKeyContainer)
at System.Security.Cryptography.RSACryptoServiceProvider.ImportParameters(RSAParameters parameters)
at System.Security.Cryptography.RSA.FromXmlString(String xmlString)
at mojoPortal.Web.Framework.CryptoHelper.Decrypt(String encryptedText)
at mojoPortal.Web.AdminUI.SiteSettingsPage.PopulateMailSettings()
at mojoPortal.Web.AdminUI.SiteSettingsPage.PopulateControls()
at mojoPortal.Web.AdminUI.SiteSettingsPage.Page_Load(Object sender, EventArgs e)
at System.Web.UI.Control.OnLoad(EventArgs e)
at mojoPortal.Web.mojoBasePage.OnLoad(EventArgs e)
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
2009-06-22 19:52:14,439 ERROR mojoPortal.Web.Global - 68.167.146.229-en-US - /Admin/SiteSettings.aspx
System.Security.Cryptography.CryptographicException: The system cannot find the file specified.

at System.Security.Cryptography.Utils.CreateProvHandle(CspParameters parameters, Boolean randomKeyContainer)
at System.Security.Cryptography.RSACryptoServiceProvider.ImportParameters(RSAParameters parameters)
at System.Security.Cryptography.RSA.FromXmlString(String xmlString)
at mojoPortal.Web.Framework.CryptoHelper.Decrypt(String encryptedText)
at mojoPortal.Web.AdminUI.SiteSettingsPage.PopulateMailSettings()
at mojoPortal.Web.AdminUI.SiteSettingsPage.PopulateControls()
at mojoPortal.Web.AdminUI.SiteSettingsPage.Page_Load(Object sender, EventArgs e)
at System.Web.UI.Control.OnLoad(EventArgs e)
at mojoPortal.Web.mojoBasePage.OnLoad(EventArgs e)
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
 

6/23/2009 8:58:16 AM
Gravatar
Total Posts 18439

Re: System.Security.Cryptography.CryptographicException

Hi Jill,

I've sent anopther dll to try please let me know how it goes.

Thanks,

Joe 

6/23/2009 10:43:05 AM
Gravatar
Total Posts 9

Re: System.Security.Cryptography.CryptographicException

Yea! The site settings appears and the email still goes forth with EnableSiteSettingsSmtpSettings = true.

6/23/2009 10:54:45 AM
Gravatar
Total Posts 18439

Re: System.Security.Cryptography.CryptographicException

Hi Jill,

Very glad to hear it! Thanks for your patience and help in resolving this. The final solution was found here:

http://support.microsoft.com/default.aspx?scid=KB;EN-US;322371

Which made me understand that by default a temporary key is stored in the folders associated with a user profile, but since in the context of an asp.net thread the user has no profile it needed to have "RSACryptoServiceProvider.UseMachineKeyStore = true;" which tells it to store the temporary file in the machine key store instead.

Not sure why it doesn't happen locally unless somehow the local account is using a user profile or perhaps its handled differently in IIS 7 by default.

Best,

Joe

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