Patch available - fixing issues with .NET 4.5
Two weeks ago Microsoft released version 4.5 of their .NET Framework and if you install it on the machine hosting Composite C1 key functionality will break. The issues we have identified are:
- "Save" and "Save and publish" occasionally fail. Once it has failed it will keep failing, preview will not work and you will need to close the affected tab and re-edit the page or data item, losing your changes.
- Previewing a page that contains an ASP.NET Web Form results in an error screen "A potentially dangerous Request.Form value was detected from the client" instead of the preview.
These issues have been confirmed on IIS and IIS Express 7.5 and 8.0 with .NET Framework 4.5 installed.
Composite C1 3.2 Patch 1
We have released a patch for Composite C1 3.2 which brings everything back to normal and it is available via the C1 Package Server.
- Make sure you have a backup of your website
- Log into the C1 Console
- Verify you are running Composite C1 version 3.2 – use "Help | About" in the top menu. If you have an earlier release, see below.
- Go to the System perspective
- Open the folders "Packages | Available Packages | Composite.Updates"
- Select "Composite C1 3.2 Patch 1" and click "Package Info"
- Click the "Install" button and complete the setup wizard
We recommend that you install this patch even though you are not currently affected – it works with both .NET 4.0 and .NET 4.5.
After you have applied the patch you should consider installing .NET 4.5 - we have see very significant performance gains with this release, so things are not all bad.
What if I run Composite C1 3.1 or earlier?
You need to upgrade to Composite C1 3.2 to apply this patch. There are manual upgrade guidelines available at http://compositec1.codeplex.com/releases/view/86614#ReleaseNotes.
You can also get access to 12 months of easy upgrades by purchasing an upgrade subscription. Aside from being kept up to date with very little work you also help fund the open source development.
Making a backup of your website
We have not identified any issues with this upgrade, but as a precautionary measure you should ensure you have a backup before upgrading.
You can very easily make a backup by installing a C1 Package and using the one click backup feature is has. See http://docs.composite.net/Composite.Tools.XmlBasedSiteBackup for details on how to install and use it.
If you have migrated data to an SQL Server you should also backup the SQL Server database.
Why did this problem occur?
Version 4.5 of the .NET Framework will replace 4.0 when installed on a machine and Composite C1 websites are immediately affected by this. .NET 4.5 contains a number of changes and also what we believe is a bug. We did test Composite C1 3.2 on beta releases of .NET 4.5 and all seemed good, but the final release did create problems for us.
A major issue is related to how ASP.NET treats a web page request. When .NET 4.5 is installed we identified that a request could be handled by different threads and this unearthed a bug in our code which you can read about on this CodePlex thread.
Another issue is related to a change in behavior of a framework method called HttpServerUtility.TransferRequest - as far as we can see this method broke in .NET 4.5; it stopped respecting the preserveForm parameter. We have been able to work around this in a way that works on both .NET 4.0 and .NET 4.5.