Skip to main content
Logo
There is a newer version of Contensis. Click to find out more and download the latest version.

Contensis published file fixer

IMPORTANT: This tool should be run BEFORE upgrading publishing servers to .Net 4.6 or later.

This tool fixes this compilation error on published web pages after the publishing server has been upgraded to .Net 4.6+ :

Compiler Error Message: BC30561: 'AppContext' is ambiguous, imported from the namespaces or types 'System, Contensis.Framework.Web'

In .Net 4.6 Microsoft introduced a new “System.AppContext” namespace, which conflicted with the namespace already in use by Contensis (“Contensis.Framework.Web.AppContext”). To resolve this issue we have developed a Contensis Published File Fixer tool to replace a line in the published web page .aspx file to define the Contensis namespace unambiguously:

replace: Public Property CurrentContext As AppContext

with: Public Property CurrentContext As Contensis.Framework.Web.AppContext

Note: This issue affects web pages published before these releases:

  • R7.2: 7.2.1.2715
  • R8.0: 8.0.1.2439
  • R8.1: 8.1.1.2781
  • R8.2: 8.2.1.1078

Pages published by versions of Contensis from R8.3 onwards are not affected by this issue. However, if you have pages which were last published using a version of Contensis earlier than R8.3 (e.g. they were originally created in R8.1 or R8.2 and haven't been republished since then), then these pages will be affected.

Upgrading Contensis to a version later than the ones listed above and republishing the entire site will fix the compilation error. However for large sites this may take a considerable amount of time, so we recommend running the Contensis Published File Fixer tool.

Running the tool will only modify pages affected by the issue. Any pages which already have the correct namespace defined, or have already been fixed by the tool, will not be modified in any way.

Running the tool

The Contensis Published File Fixer tool can be downloaded from here.

  1. Download the files to your publishing server (no installation is required).
  2. Run ContensisPublishedFileFixer.exe as administrator.
  3. Select the root folder of the published Contensis website you wish to fix the pages for, and click the Fix Files button. Only webpages which contain the ambiguous namespace declaration will be processed. No other files will be affected.

Note: It is strongly recommended that you back up your site folder(s) before running the Contensis Published File Fixer. The tool has been extensively tested but due to the nature of software development and the variety of operating system environments Zengenti cannot guarantee that there will not be unforeseen side effects.

If there is more than one website on the publishing server then you will need to run the Contensis Published File Fixer for each website. If any errors occur then the full error details will be written to a log file in the same folder as the tool.