Error when upgrading from 2.9.0.3 to current version

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.

10/21/2026 9:04:44 AM
Gravatar
Total Posts 32

Error when upgrading from 2.9.0.4 to current version

I am seeing this issue with MS SQL Express platform and therefore have a number of websites offline. 
 

Welcome to mojoPortal Setup

Checking Filesystem and Database

File system permissions ok.

MSSQL database connection ok.

database permissions are sufficient to alter schema.

database initial schema already exists.

database core schema needs upgrade.

94 site(s) found.

Upgrading mojoportal-core

2.9.0.4

System.Data.SqlClient.SqlException (0x80131904): Incorrect syntax near the keyword 'IF'. at System.Data.SqlClient.SqlConnection.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.SqlCommand.RunExecuteNonQueryTds(String methodName, Boolean async, Int32 timeout, Boolean asyncWrite) at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry) 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.Business.DatabaseHelper.RunScript(Guid applicationId, FileInfo scriptFile, String overrideConnectionInfo) ClientConnectionId:89e9898b-129d-4d2f-9c45-c4648f0cecfb Error Number:156,State:1,Class:15

 

Note

upgradeNeeded

 

Database Platform

MSSQL

Database Schema Version

2.9.0.3

Application Code Version

3.1.6.0

Message

upgradeNeeded

10/21/2026 9:29:02 AM
Gravatar
Total Posts 2273

Re: Error when upgrading from 2.9.0.4 to current version

Hi Kari,

Which version of SQL Express are you running?

It looks like you're upgrading from 2.9.0.3. The script trying to run is to upgrade to 2.9.04 and it is trying to run several DROP .... IF EXISTS statements. That feature was added in SQL Server 2016, so if you're on an older version than 2016, you'll need to edit the/Setup/applications/mojoportal-core/SchemaUpgradeScripts/mssql/2.9.0.4.config file to remove the IF EXISTS from each line. Once you do that, you can re-run setup and it should get you to the next upgrade script at least.

I recommend upgrading to a newer version of SQL Server because we don't target or test for 2016 anymore.

Thanks,
Joe

 

 

10/21/2026 9:33:54 AM
Gravatar
Total Posts 32

Re: Error when upgrading from 2.9.0.3 to current version

Thank you for speedy reply. I am certainly using an older MS SQL on this web server. 2008 R2 to be exact. 

I'll upgrade this asap. 

10/21/2026 11:32:06 AM
Gravatar
Total Posts 32

Re: Error when upgrading from 2.9.0.3 to current version

Upgrading SQL Express 2008 to SQL Express 2025 is easier said than done. 

I think I have everything correct, the mojoportal database has been backed up and restored in the new 2025 database platform, and I have edited the line 

add key="MSSQLConnectionString" value="server=DatabaseServerName\SQLExpress;UID=DatabaseSQLUser;PWD=SQLUserPassword;database=DatabaseName"

to match my new instance.

like this

add key="MSSQLConnectionString" value="server=.\SQLExpress01;UID=DatabaseSQLUser;PWD=SQLUserPassword;database=mojoportal"

and have put the user account into the logins group for the new database. 

I am now facing a local browser message can't reach this page for the url /setup/default.aspx and no asp.net error messages which is unusual. 

If I restore the old settings string the need upgrade message appears but the /setup/default.aspx page at least runs fine. 

Karl

 

10/21/2026 2:31:14 PM
Gravatar
Total Posts 2273

Re: Error when upgrading from 2.9.0.3 to current version

Hi Karl,

Getting a local browser message is weird. Have you checked the log (/data/currentlog.config)?

I know you added the user account but you may not have done all of what is needed there. 

-- Create a SQL Server authenticated login
CREATE LOGIN NewLogin WITH PASSWORD = 'StrongPassword123!';
GO

-- Enable the login if it was disabled
ALTER LOGIN NewLogin ENABLE;
GO   

-- Switch to the target database
USE TargetDatabase;
GO

-- Create the user mapped to the existing login
CREATE USER NewUser FOR LOGIN NewLogin;
GO   
10/22/2026 3:49:34 AM
Gravatar
Total Posts 32

Re: Error when upgrading from 2.9.0.3 to current version

Thank you, the not starting at all was my fault I had not enable SQL and Windows Authentication, for the SQL 2025 database and only allowed Windows.

The Setup worked fine and offers to open the home page, I am not stuck with this message:

 

Server Error in '/mojoportal' Application.

Parser Error

Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.

Parser Error Message: Could not find a part of the path 'C:\websites\mojoportalcms\Content\failsafeskin\includes\favicons.html'.


Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.8.4110.0


The site should be in this path location C:\websites\mojoportalcms\mojoportal so it seems the PATH has got confused. I'll look for that in the config files. 

10/22/2026 3:50:51 AM
Gravatar
Total Posts 32

Re: Error when upgrading from 2.9.0.3 to current version

meta name="viewport" content="width=device-width, initial-scale=1" 

meta name="SKYPE_TOOLBAR" content="SKYPE_TOOLBAR_PARSER_COMPATIBLE" 

-- #include file="/Content/failsafeskin/includes/favicons.html"

portal:MetaContent ID="MetaContent" runat="server" DisableContentType="true" PreZoomForIPhone="false"

10/22/2026 12:23:00 PM
Gravatar
Total Posts 2273

Re: Error when upgrading from 2.9.0.3 to current version

Hi Karl,

I'll log a bug for this to see what we can do about it including the favicons.html properly when the site is installed in a virtual directory, which seems to be what you're doing. 

Thanks,
Joe

10/24/2026 12:46:59 AM
Gravatar
Total Posts 32

Re: Error when upgrading from 2.9.0.3 to current version

Thank you Joe,

I have attempted to move the site out of this virtual configuration

C:/websites/mojoportalcms/mojoportal

to have everything in 

C:/websites/mojoportalcms

That improved the situation and the again the /setup/default.aspx ran fine and then when pressing on the home page link, the error for favicon.html was not seen.

I am seeing this error message though on the local host, which seems to be linked to a skin I had made. Obviously, the skin used to run fine. 

 

Server Error in '/' Application.

Parser Error

Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.

Parser Error Message: Unknown server tag 'mp:WatermarkTextBox'.

Source Error:

 

Line 135:/>

Line 136:

Line 137:<mp:WatermarkTextBox runat="server"

Line 138: CssClass=" "

Line 139:/>


Source File: /App_Themes/pageskin-1chem-moasic5/theme.skin    Line: 137


 

10/24/2026 1:12:43 AM
Gravatar
Total Posts 32

Re: Error when upgrading from 2.9.0.3 to current version

Strangely the folder /App_Themes/

Does not contain a folder 

pageskin-1chem-moasic5/

so I don't understand how it is reading the file theme.skin 

10/24/2026 1:58:23 AM
Gravatar
Total Posts 32

Re: Error when upgrading from 2.9.0.3 to current version

I found the relevant theme.skin file in the mojoportalcms\Data\Sites\1\skins folder and removing this line allows the site to load more and now the page content is present and I have the message 

If you're seeing this page there is a problem with the layout.master file of the site or page skin.

 

 I managed to login and get to the Admin pages and whatever skin I choose has the error for mp:WatermarkTextBox'. Removing this code from each theme.skin file allows me to load the page again with a different skin but not found one yet which does have the problem with the layout.master file of the site or page skin.

 

I will plan to download a new skin from here and see if that helps.