Error in upgrade

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/24/2012 7:06:30 AM
Gravatar
Total Posts 17

Error in upgrade


Hello

I use OS win xp sp3 and .net 4


When i upgrade my mojoportal site on my computer
as a test
I download mojoportal last release and change connection string in user.config
and web site work well all page but

this massage show when i log in
after i entered username and password


The specified cryptographic algorithm is not supported on this platform.
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.PlatformNotSupportedException: The specified cryptographic algorithm is not supported on this platform.

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:

[PlatformNotSupportedException: The specified cryptographic algorithm is not supported on this platform.]
   System.Security.Cryptography.CapiNative.AcquireCsp(String keyContainer, String providerName, ProviderType providerType, CryptAcquireContextFlags flags, Boolean throwPlatformException) +549587
   System.Security.Cryptography.CapiHashAlgorithm..ctor(String provider, ProviderType providerType, AlgorithmId algorithm) +83
   System.Security.Cryptography.SHA512CryptoServiceProvider..ctor() +44
   mojoPortal.Web.mojoMembershipProvider.GetSHA512Hash(String cleanText) +88
   mojoPortal.Web.mojoMembershipProvider.HashedSha512PasswordIsValid(SiteSettings siteSettings, SiteUser siteUser, String providedPassword) +30
   mojoPortal.Web.mojoMembershipProvider.PasswordIsValid(SiteSettings siteSettings, SiteUser siteUser, String providedPassword) +272
   mojoPortal.Web.mojoMembershipProvider.ValidateUser(String userName, String password) +470
   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.3053; ASP.NET Version:2.0.50727.3053

6/24/2012 8:02:58 AM
Gravatar
Total Posts 18439

Re: Error in upgrade

Hi,

SHA512CryptoServiceProvider is not supported on XP, for testing on XP you will have to use clear text or encrypted passwords, hashed passwords are not going to work on XP because we use SHA512 hashing.

Hope that helps,

Joe

6/24/2012 8:08:36 AM
Gravatar
Total Posts 17

Re: Error in upgrade

Hi,

No i can't get it , becuase i use mojoportal version: 2.3.8.5 on OS win xp sp3 and it works well

But the upgrade is the problem

Thanks for help

Mohamed

6/24/2012 8:34:25 AM
Gravatar
Total Posts 18439

Re: Error in upgrade

If you read the page I linked, it says it is supported on Win 2003 SP2 and on Windows 2008 except for "Core", core is a stripped down OS with no GUI. On Win 2008 R2 it is also supported on Core.

6/24/2012 10:40:36 AM
Gravatar
Total Posts 18439

Re: Error in upgrade

We changed to stronger sha512 hashing in mojoPortal version 2.3.8.1, so if it was working you must have been using an older version than that.

You will not be able to get newer versions of mojoPortal working on XP with hashed passwords. XP is a legacy OS. With hashed passwords you won't be able to upgrade on XP, or you could change to encrypted or clear text for your dev machine. 

6/25/2012 3:08:25 AM
Gravatar
Total Posts 17

Re: Error in upgrade

Hi Joe,

Thank you for your reply.

I want to say , when i use version: 2.3.8.5 for first time instillation web site running very well.

The problem show just when i upgrade from the last version.

This is the trick i can't get it.

If the problem that you say , how version: 2.3.8.5 for first time instillation web site running very well and no problem at all???? How?

Sorry for bothering you.

Best,

Mohamed Ramadan

6/25/2012 6:42:23 AM
Gravatar
Total Posts 18439

Re: Error in upgrade

When you create a new installation it is using clear text passwords by default, that is why it works. The error will happen if you try to change to hashed passwords in Site Settings. The copy of the site you are trying to upgrade is already configured for hashed passwords so it has this error when it gets updated to the newer stronger sha512 hashing which is not supported on XP. The error only happens with hashed passwords, there is no solution for this error on Windows XP.

Best,

Joe

7/2/2012 1:23:25 PM
Gravatar
Total Posts 17

Re: Error in upgrade

Hello!

Joe,

I download the last Version: 2.3.8.5 and upload it on server.

this error happen when i start run setup page

 http://www.eaega.com/Setup/Default.aspx

 ------------------------------------------------------------------------------ 

Probing system...
File system permissions ok.
MSSQL database connection ok.
database permissions are sufficient to alter schema.
database initial schema needs to be created.
Running script mojoportal-core - 2.3.4.8 - 00:00:00.9375000
System.Data.SqlClient.SqlException (0x80131904): There is already an object named 'PersianDay' in the database. at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection) at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning() at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) at System.Data.SqlClient.SqlCommand.RunExecuteNonQueryTds(String methodName, Boolean async) at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult result, String methodName, Boolean sendToPipe) at System.Data.SqlClient.SqlCommand.ExecuteNonQuery() at mojoPortal.Data.SqlHelper.ExecuteNonQuery(SqlTransaction transaction, CommandType commandType, String commandText, Int32 commandTimeout, SqlParameter[] commandParameters) at mojoPortal.Data.DBPortal.DatabaseHelperRunScript(String script, String overrideConnectionInfo) at mojoPortal.Data.DBPortal.DatabaseHelperRunScript(FileInfo scriptFile, String overrideConnectionInfo) at mojoPortal.Business.DatabaseHelper.RunScript(Guid applicationId, FileInfo scriptFile, String overrideConnectionInfo) - 00:00:04.5156250
Note: This page shows some information that is helpful during setup and upgrades but for security it would be best not to show any information when the system is up to date. You can disable setup and suppress all information on this page by setting DisableSetup=true in Web.config. When you need to upgrade, you can set this back to false. If you are logged in as Administrator setup will run and you will be able to see this page even if it is disabled in Web.config so you can easily leave it disabled and just login before upgrading. But if you are not logged in you will need to enable setup in Web.config.

 

 

Best,

Mohamed Ramadan

7/2/2012 3:30:56 PM
Gravatar
Total Posts 18439

Re: Error in upgrade

Hi,

It sounds like your database is not an empty database, it already contains some User Defined Functions that mojoPortal is trying to add, so it throws this error.

You can either delete the existing user defined functions for Persian dates or edit the mojoPortal script to remove the sql statements for those functions if they already exist in your database.

The script is at:

/Setup/applications/mojoportal-core/SchemaInstallScripts/mssql/2.3.4.8.config

you can find the Persian date functions by searching for the word Persian

Hope that helps,

Joe

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