Upgrade to version 2.4.0.9 on Azure

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.
7/23/2015 10:19:30 AM
Gravatar
Total Posts 47

Upgrade to version 2.4.0.9 on Azure

Hi!

I have to upgrade a website (version 2.4.0.3) running on Azure to version 2.4.0.9. As it is a production site I decided to create a new site from scratch to test that everithing works. In fact with a brand new DB (MSSQL) I have no problem, but if I connect the production DB (a copy of the running one) I get this error:


2015-07-23 14:42:22,598 INFO (null) - (null) - (null) - mojoPortal.Web.Global - Global.asax.cs Application_End 2015-07-23 14:43:33,964 INFO (null) - (null) - (null) - mojoPortal.Web.Global - Application Started. 2015-07-23 14:43:35,527 ERROR 92.223.209.194 - it-IT - / - mojoPortal.Web.Global - Referrer(none) useragent Mozilla/5.0 (Windows NT 6.3; WOW64; Trident/7.0; rv:11.0) like Gecko System.InvalidCastException: Object cannot be cast from DBNull to other types. at System.DBNull.System.IConvertible.ToBoolean(IFormatProvider provider) at System.Convert.ToBoolean(Object value) at mojoPortal.Business.PageSettings.LoadFromReader(IDataReader reader) at mojoPortal.Business.PageSettings.GetPage(Int32 siteId, Int32 pageId) at mojoPortal.Business.PageSettings..ctor(Int32 siteId, Int32 pageId) at mojoPortal.Business.WebHelpers.CacheHelper.LoadPage(Int32 pageID) at mojoPortal.Business.WebHelpers.CacheHelper.LoadCurrentPage() at mojoPortal.Business.WebHelpers.CacheHelper.GetCurrentPage() at mojoPortal.Web.SiteUtils.GetSkinName(Boolean allowPageOverride, Page page) at mojoPortal.Web.mojoBasePage.SetupMasterPage() at mojoPortal.Web.mojoBasePage.OnPreInit(EventArgs e) at mojoPortal.Web.UI.CmsPage.OnPreInit(EventArgs e) at System.Web.UI.Page.PerformPreInit() at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
 

I have to use my DB as we developed several controls we needed for the project and we created additional tables in the DB.

Any suggestion?

 

P.S.

I also tried to work on the SQL side using a brand new DB and importing the data. I have no problems with my tables, but if I import my data in Mojoportal tables  I get:


2015-07-23 14:45:34,164 INFO (null) - (null) - (null) - mojoPortal.Web.Global - Global.asax.cs Application_End 2015-07-23 14:45:39,304 INFO (null) - (null) - (null) - mojoPortal.Web.Global - Application Started. 2015-07-23 14:50:58,174 ERROR 92.223.209.194 - it-IT - /Secure/Register.aspx?returnurl=/ - mojoPortal.Web.Global - Referrer(http://mysitetest.azurewebsites.net/Secure/Register.aspx?returnurl=/) useragent Mozilla/5.0 (Windows NT 6.3; WOW64; Trident/7.0; rv:11.0) like Gecko System.Data.SqlClient.SqlException (0x80131904): Cannot insert the value NULL into column 'UserID', table 'mysiteTest07.dbo.mp_Users'; column does not allow nulls. INSERT fails. The statement has been terminated. at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction) at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction) at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose) at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady) at System.Data.SqlClient.SqlDataReader.TryConsumeMetaData() at System.Data.SqlClient.SqlDataReader.get_MetaData() at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString) at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, SqlDataReader ds) at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource`1 completion, Int32 timeout, Task& task, Boolean asyncWrite) at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method) at System.Data.SqlClient.SqlCommand.ExecuteScalar() at mojoPortal.Data.SqlHelper.ExecuteScalar(String connectionString, CommandType commandType, String commandText, Int32 commandTimeout, SqlParameter[] commandParameters) at mojoPortal.Data.SqlParameterHelper.ExecuteScalar() at mojoPortal.Data.DBSiteUser.AddUser(Guid siteGuid, Int32 siteId, String fullName, String loginName, String email, String password, String passwordSalt, Guid userGuid, DateTime dateCreated, Boolean mustChangePwd, String firstName, String lastName, String timeZoneId, DateTime dateOfBirth, Boolean emailConfirmed, Int32 pwdFormat, String passwordHash, String securityStamp, String phoneNumber, Boolean phoneNumberConfirmed, Boolean twoFactorEnabled, Nullable`1 lockoutEndDateUtc) at mojoPortal.Business.SiteUser.Create() at mojoPortal.Business.SiteUser.Save() at mojoPortal.Web.mojoMembershipProvider.CreateUser(String userName, String password, String email, String passwordQuestion, String passwordAnswer, Boolean isApproved, Object providerUserKey, MembershipCreateStatus& status) at System.Web.UI.WebControls.CreateUserWizard.AttemptCreateUser() at System.Web.UI.WebControls.CreateUserWizard.OnNextButtonClick(WizardNavigationEventArgs e) at System.Web.UI.WebControls.Wizard.OnBubbleEvent(Object source, EventArgs e) at System.Web.UI.WebControls.CreateUserWizard.OnBubbleEvent(Object source, EventArgs e) at System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) at System.Web.UI.WebControls.Button.OnCommand(CommandEventArgs e) at System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) at System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) at System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) ClientConnectionId:9b17444d-a09c-4d21-ad45-bbfeb857f995 Error Number:515,State:2,Class:16
 

 

How can I solve?

Thanks

 

Mari

 

 

  

7/23/2015 11:46:30 AM
Gravatar
Total Posts 18439

Re: Upgrade to version 2.4.0.9 on Azure

part of the upgrade process is running scripts to upgrade the database.

if you take a site that is using the new version of code and point the connection string to a database using the old version errors would be expected since the old database has not yet been upgraded.

the code and the database must be in sync, do not upgrade the production database without updating the production code and do not upgrade the code until you are ready to run the setup page which will run the sql scripts to upgrade the db

make a backup of the db and the file system before upgrading in case something goes wrong so it will be possible to restore it to the previous state

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