Views: 28773
Number of votes: 10
Average rating:

EPiServer CMS 6.0 now supporting ASP.NET 4.0

We are pleased to announce that after thorough investigation we can now officially confirm that EPiServer CMS 6.0 supports running on ASP.NET 4 as a platform. It is also possible to work with EPiServer CMS projects in Visual Studio 2010, although there does not yet exist an integration package with it. The integration with Visual Studio 2010 is scheduled for the next release of EPiServer CMS.

ASP.NET 4 introduces a number of features that improve core ASP.NET services such as output caching and session-state storage. With ASP.NET 4, web forms controls now render clean, semantically correct, and CSS friendly HTML markup. In ASP.NET 4.0, there is a new concept of Generate From Usage - this generates properties, methods, classes, and other types based on existing code. Built-in URL routing functionality allows you to expose clean, search engine friendly, URLs and increase the traffic to your website. ViewState within applications is smaller and can now be more easily controlled.

In order to run EPiServer CMS 6 on ASP.NET 4.0 you will have to make certain changes to your configuration files.

The following steps will guide you through the procedure:

  1. A default installation of EPiServer CMS will usually run in a 2.0 app-pool in .NET 3.5 after installation. Change the app-pool to v.4.0.
  2. Update web.config so the <compilation> tag has the attribute targetFramework set to “4.0”.
  3. In web.config, find the <system.web> tag. Update the <httpRuntime> tag below <system.web> by setting the attribute requestValidationMode to “2.0”.
  4. Find the <pages> tag and set the attributes controlRenderingCompatibilityVersion="3.5" and clientIDMode=”AutoID”.
  5. Make sure that you have a reference to the System.Web.Routing assembly under the <assemblies> tag:

    1: <add assembly="System.Web.Routing, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
  6.  
  7. If you when developing a site in Visual Studio 2010, need to add a reference to System.ComponentModel.Composition, make sure that you use the version of that which is included in the EPiServer installation (for CMS 6.0 the version number is "2009.26.8.0"), and not the one installed with .NET 4. In Visual Studio, the referencing can be done by following these steps:
     
    1. Unload the project in VS 2010 by right-clicking on the project and choose “Unload project”.
    2. Right click on the project again and select “Edit project”.
    3. Locate the line : <Reference Include=”System.ComponentModel.Composition” /> and change it to:
     
    <Reference Include="System.ComponentModel.Composition" >
    <HintPath><location of episerver bin> \System.ComponentModel.Composition.dll</HintPath>
    </Reference>

Most of these changes will be made automatically if you upgrade your solution using the Visual Studio 2010 upgrade functionality – but you need to do them manually to upgrade a running production environment.

Important Information Regarding Live Monitor

The following information was added to this article after further investigation regarding the compatibility of LiveMonitor with EPiServer CMS 6 and ASP.NET 4.

In order to ensure that an updated EPiServer CMS 6 site will be compatible with Live Monitor, please check the following:

  • Remove the ASP.NET 3.5 <compiler> specification under <system.codedom> section if present.
  • If using Live Monitor, replace the HTTP handler named svc-Integrated that is specified under the UI location with:
     
    <add name="svc-Integrated-4.0" path="*.svc" verb="*" type="System.ServiceModel.Activation.ServiceHttpHandlerFactory, System.ServiceModel.Activation, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" preCondition="integratedMode,runtimeVersionv4.0" />Related information

Related Information

System requirements for EPiServer CMS 6.0

Download EPiServer CMS 6.0

More about EPiServer CMS 6.0

anders.nordby
(By anders.nordby, 9/8/2011 12:51:29 PM)

Wouldn't it be nice if this was included in new downloads of EPiServer? (Getting tired of doing this manually, and the NuGet package supposed to do this for me doesn't seem to work.)

Mats Persson
(By Mats Persson, 10/24/2011 3:31:57 PM)

Thank you for the information!

I addition to get my EPiServer CMS 6.1.379.0 running in a Net 4.0 environment I needed to manually change the tag setting the . Default it is 3.5.

Now it works like a charm using VS2008 (but with .NET 4.0 features).

manoj.dube
(By manoj.dube, 1/5/2012 1:41:31 PM)

Thanks allan this worked for me.

steven pap
(By steven pap, 3/13/2012 12:50:40 PM)

the manual part with migrations + upgrades does prove to painful but 'auto' anything can go wrong too without u knowing what changed.

Suppose it lets u know the INS n Outs of episerver more n more.

Kianoush Eshaghi
(By Kianoush Eshaghi, 3/26/2012 6:48:32 PM)

I have installed BVN.404Handler version 2.2 on an CMS 6 project which runs on IIS 7 and .Net Framework v4.0. I get the same error when I start the project in VS2010

1) The export 'BVNetwork.FileNotFound.CustomRedirects.CustomRedirectInitialization (ContractName="EPiServer.Framework.IInitializableModule")' is not assignable to type 'EPiServer.Framework.IInitializableModule'.

Resulting in: Cannot set import 'EPiServer.Framework.Initialization.InitializationEngine.Modules (ContractName="EPiServer.Framework.IInitializableModule")' on part 'EPiServer.Framework.Initialization.InitializationEngine'.
Element: EPiServer.Framework.Initialization.InitializationEngine.Modules (ContractName="EPiServer.Framework.IInitializableModule") --> EPiServer.Framework.Initialization.InitializationEngine

I have done the workaround, in the step 6 it points to right "CMS's dll" for System.ComponentModel.Composition.dll. The dll which has been installed on my PC, has the product version 2009.22.10.0. I am not sure whether it is right DLL.

I appreciate any pointers.

pjones
(By pjones, 10/28/2012 5:11:36 AM)

This was just what I needed, thanks!

Please login to comment.