There’s a couple of gotchas for getting EPiServer to run under .Net 4.0
New default ClientID generation scheme in .net 4 disrupts EPiServer’s javascripts
If you find youself getting the following javascript exception when creating pages or expanding nodes in the edit tree in episerver:
error: the target Fullregion$explorertreeview$treeview for the callback could not be found or dit not implement icallbackeventhandler
The solution is to add the following attribute to web.config: under configuration > system.web > pages : clientIDMode=”AutoID”
You can scope this to only be applied on the util and UI locations if you don’t want the old school ID generation scheme applied globally
Validation is more strict in .net 4.0
When editing pages and submitting rich text content containing tags you might get Asp.net complaining to you that you need to turn off eventvalidation, but in addition you also need to instruct asp.net 4.0 to use <httpRuntime requestValidationMode=”2.0″ /> under configuration > system.web

Thanks for this article it helped me.
Strangely enough EPiserver didn’t have any good information on the subject.
Your article was short and informative thanks again.
Comment by Jimmy Engström — April 27, 2011 @ 15:28 |