CMS edit mode search and Community edit mode not working after upgrade to .NET 4


I recently upgraded a CMS 6 site with Community 4 to .NET 4 and am now getting errors.

The AJAX request made to /login/shell/Search/Index/?searchArea=CMS when searching from edit mode returns 500 (Internal Server Error) with the following stack trace:

[NullReferenceException: Object reference not set to an instance of an object.]
EPiServer.Shell.UI.Controllers.SearchController.Index(String searchArea) +105
lambda_method(Closure , ControllerBase , Object[] ) +107
System.Web.Mvc.ActionMethodDispatcher.Execute(ControllerBase controller, Object[] parameters) +17
System.Web.Mvc.ReflectedActionDescriptor.Execute(ControllerContext controllerContext, IDictionary`2 parameters) +201
System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary`2 parameters) +27
System.Web.Mvc.<>c__DisplayClassd.<InvokeActionMethodWithFilters>b__a() +56
System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodFilter(IActionFilter filter, ActionExecutingContext preContext, Func`1 continuation) +267
System.Web.Mvc.<>c__DisplayClassf.<InvokeActionMethodWithFilters>b__c() +20
System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodWithFilters(ControllerContext controllerContext, IList`1 filters, ActionDescriptor actionDescriptor, IDictionary`2 parameters) +190
System.Web.Mvc.ControllerActionInvoker.InvokeAction(ControllerContext controllerContext, String actionName) +343
System.Web.Mvc.Controller.ExecuteCore() +115
System.Web.Mvc.ControllerBase.Execute(RequestContext requestContext) +42
System.Web.Mvc.ControllerBase.System.Web.Mvc.IController.Execute(RequestContext requestContext) +10
System.Web.Mvc.<>c__DisplayClass8.<BeginProcessRequest>b__4() +34
System.Web.Mvc.Async.<>c__DisplayClass1.<MakeVoidDelegate>b__0() +21
System.Web.Mvc.Async.<>c__DisplayClass8`1.<BeginSynchronous>b__7(IAsyncResult _) +12
System.Web.Mvc.Async.WrappedAsyncResult`1.End() +55
System.Web.Mvc.MvcHandler.EndProcessRequest(IAsyncResult asyncResult) +45
System.Web.Mvc.MvcHandler.System.Web.IHttpAsyncHandler.EndProcessRequest(IAsyncResult result) +9
System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +8967885
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +184


Trying to access Community edit or admin mode (/EPiServerCommunity/Moderate.aspx, /EPiServerCommunity/Admin.aspx) also results in a 500 (Internal Server Error) with the stack trace:

[MissingMethodException: Method not found: 'Void System.Web.Mvc.ViewPage.set_Html(System.Web.Mvc.HtmlHelper)'.]
EPiServer.Shell.Web.UI.MasterPageBase.CreateViewPage() +0
EPiServer.Shell.Web.UI.MasterPageBase.get_ViewPage() +55
EPiServer.Community.Web.Administration.EPiServerCommunity.CommunityMasterPage.set_Title(String value) +50
EPiServer.Community.Web.Administration.Moderate.OnLoad(EventArgs e) +80
System.Web.UI.Control.LoadRecursive() +74
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2207


Rolling back to .NET 3.5 fixes the problem, but that is not acceptable as the newest version of IntelliSearch (.NET 4 only) has to run on the site.

Following the EPiServer guides to upgrade to .NET 4 from the rolled back project results in the same errors again (bleh).

Does anyone have any insight on this or maybe even a solution? EPiServer Developer Support's answer is to roll back and upgrade again, but that doesn't work.

Aug 24, 2012 10:09

I have upgraded at least two projects based on Relate (Relate 2.1, Community 4.1, CMS 6.1 (6 R2)) to .NET 4 (and obviously switched to a Framework 4 application pool) and at least the moderate/admin interfaces were working just fine (not sure i checked the search). So it is possible to get it working.

Could it be a problem with the MVC version? Or some problem with handlers/modules being different in .NET 4? 

Aug 24, 2012 13:26

Yeah, it's possible.

I am in the process of comparing configuration files to a working green field CMS 6 / Community 4 project on .NET 4 (another customer) and I have already found some differences (none of them fixed the problem, though).

The project having issues was originally on EPiServer <=4 and has behaved all the way up to the .NET 3.5 to .NET 4 upgrade, but it seems that I now have a lot of configuration cleanup to do.

Aug 24, 2012 13:34

Nice! Yeah, I bet there's some old mold in that config :)

Aug 24, 2012 14:03

After lots of agony I finally fixed it.

It seems that EPiServer sites that are upgraded to CMS 6 have to use the MVC 1 DLL that comes with EPiServer and not the MVC 2 DLL.

Why? I have no idea. The method not found (System.Web.Mvc.ViewPage.set_Html) exists in MVC 2.

Aug 24, 2012 15:39

While there is still a property by the same name, 'Void System.Web.Mvc.ViewPage.set_Html(System.Web.Mvc.HtmlHelper)' (as referenced in the error message) does not exist in MVC 2 and later.

In its place you will find 'Void System.Web.Mvc.ViewPage.set_Html(System.Web.Mvc.HtmlHelper<Object>)', ie the type of the property has changed.

Edited, Aug 27, 2012 10:37

It does exist, but not in .NET 4, so running on .NET 3.5 works fine:

.NET 4:

.NET 3.5:


It's still wierd that a green field CMS 6 + Community 4 works fine while a migrated/upgraded CMS 6 + Community 4 does not.

Edit: Nevermind. The dropdown in the MS reference changes MVC version as well and not just .NET version>.<

Edited, Aug 27, 2012 10:44
This thread is locked and should be used for reference only. Please use the Episerver CMS 7 and earlier versions forum to open new discussions.