2.2.7.9 post upgrade CryptographicException: The system cannot find the file specified

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.
3/9/2009 12:50:45 PM
Gravatar
Total Posts 13

Re: 2.2.7.9 post upgrade CryptographicException: The system cannot find the file specified

FYI -

I created the admin account on my "local" installation before I uploaded it to my hosting provider.  It was working fine there.   

I'll try the web config work around.  I'm not too worried about the site content at this particular time...

I'll let you know what happens...

3/9/2009 12:54:38 PM
Gravatar
Total Posts 13

Re: 2.2.7.9 post upgrade CryptographicException: The system cannot find the file specified

 Could this be a .net version issue?

If I look on the error page - I see ASP.Net version - 

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

 

I'm not on my windows machine at this particular time, but could that be the issue?

3/9/2009 12:56:47 PM
Gravatar
Total Posts 18439

Re: 2.2.7.9 post upgrade CryptographicException: The system cannot find the file specified

I recommend that you don't try to populate the database on your dev machine and then upload it or restore it on production. Run setup on production and create the data on production, you can get a backup and restore it on your local machine for testing purposes, but populating on a dev machine and trying to then move the data to production is problematic. Especially if going from http://localhost/mojoportal/ to http://www.somedomain.com, the difference in url structure will cause problems.

Hope it helps,

Joe

3/9/2009 12:59:05 PM
Gravatar
Total Posts 18439

Re: 2.2.7.9 post upgrade CryptographicException: The system cannot find the file specified

 

Microsoft .NET Framework Version:2.0.50727.3074; ASP.NET Version:2.0.50727.3074

I think that looks correct, it doesn't change to 3.5 as you might expect it would because 3.5 .NET is really 2.0 with some things bolted on top.

Best,

Joe

3/9/2009 1:04:46 PM
Gravatar
Total Posts 13

Re: 2.2.7.9 post upgrade CryptographicException: The system cannot find the file specified

Regarding not moving the db back and forth - 

Is there a best practice on how to best roll out data from a development environment to production?  

I envisioned using my dev machine to make some changes in content, and then publishing those changes by updating the database?  That just seems flexible to me.

Sorry if I haven't examined the docs as much as I should have for this kind of best practice, I'll check that out  - but as long as I have you here :) ...

3/11/2009 8:57:58 AM
Gravatar
Total Posts 18439

Re: 2.2.7.9 post upgrade CryptographicException: The system cannot find the file specified

Hi,

Currently we don't have support for staged publishing from one server to another. You can create private pages to write and review content and then you can move the content to public pages after you are satified with it. A strategy like this is described at the bottom of this page.

I do have it on my roadmap to implement a more formal yet easy to use workflow/approval process and I will look into supporting staged server to server publishing at that point. I think it really needs to be at the feature level perhaps using web services to publsih from the one server to the other.

I don't think you should restore a db from dev to production because so much of the site data comes into the system from the public/production side, like user registratiosn, forum posts, product purchases, blog comments etc.

Best,

Joe

3/14/2009 10:15:27 AM
Gravatar
Total Posts 13

Re: 2.2.7.9 post upgrade CryptographicException: The system cannot find the file specified

Bringing this subject up again - I went for a clean install on the web site, a blank database and the latest download of mojoportal. Here's the error I get (in medium trust mode).  One thing I didn't track - was when I ran the setup the first time, there was an error on the grey setup page - I ran it again, and everything worked, but now I'm wondering what that first error was.  I could try that again, but do you have any ideas?  Here's the error:

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) +7712542
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.Hash(String cleanText) +0
mojoPortal.Web.mojoMembershipProvider.EncodePassword(String pass, MembershipPasswordFormat passwordFormat) +36
mojoPortal.Web.mojoMembershipProvider.EncodePassword(String pass, SiteSettings site) +45
mojoPortal.Web.mojoMembershipProvider.ValidateUser(String userName, String password) +139
System.Web.UI.WebControls.Login.AuthenticateUsingMembershipProvider(AuthenticateEventArgs e) +60
System.Web.UI.WebControls.Login.OnAuthenticate(AuthenticateEventArgs e) +119
System.Web.UI.WebControls.Login.AttemptLogin() +115
System.Web.UI.WebControls.Login.OnBubbleEvent(Object source, EventArgs e) +101
System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +37
System.Web.UI.WebControls.Button.OnCommand(CommandEventArgs e) +118
System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +166
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

 


--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:2.0.50727.3074; ASP.NET Version:2.0.50727.3074

 

 

3/14/2009 10:39:00 AM
Gravatar
Total Posts 18439

Re: 2.2.7.9 post upgrade CryptographicException: The system cannot find the file specified

Hi,

This problem seems to be happening to some users with Medium Trust installations. I have a solution to prevent this problem for the next release.

For the current release I think you could work past it if you add this to Web.config:

<add key="InitialSitePasswordFormat" value="0" />

then you will need to clean out all objects from the db and then visit /Setup/Default.aspx again.

This will make the initial password format clear text and avoid calling the crypto helper when it creates the admin user. I think this error is preventing the creation of the admin user.

Hope it helps,

Joe

 

3/14/2009 9:00:00 PM
Gravatar
Total Posts 13

Re: 2.2.7.9 post upgrade CryptographicException: The system cannot find the file specified

FYI  - that worked.

Thanks for the follow up...

 

Dan

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