31 July, 2013

EPiServer sites with long start up time

Some sites built on EPiServer (mostly with Relate+) might be slow to start after a deploy. It can in worst case take several minutes for the site to compile and start.

To solve this you can add optimizeCompilations="true" to the Compilation tag i web.config

 <compilation defaultLanguage="c#" debug="false" targetFramework="4.0" optimizeCompilations="true" >


By adding optimizeCompilations="true" to the compilation tag we can improve the start up performance of our site considerably, but you might experience run-time errors if you delete, rename or change the signature of a method referenced by an already-compiled page. If this happens simply set it to false, rebuild and then set it to true again.

One of those errors could be "Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information."

23 April, 2013

Errors while updating from EPiServer 7.0 to 7.1

Errors when updating from EPiServer 7.0 to 7.1 in the Add on store


Error #1

You update by using EPiServers built in Add-on system and suddenly the Editmode tab and possibly the Add-on tab disappears.

The problem is that the update removes the old add-ons and then crashes with no rollback because it can't overwrite files in the modules and modulesbin folders in the site.

To repair this, copy the folders Modules and ModulesRepository (usually located in the vpp-folder) from a working site.
Then restart the site.

Now it works, but is still in the old version.

Ensure that the files in modules and modulesbin folders in the site are not write protected and accessible by the system.

Try to update through the add-on tab again.

Error #2

You update by using EPiServers built in Add-on system. The Editmode remains but the content of Edit mode is blank (white)

Try to clear the .net cache
It's usually stored in a folder that looks like this: "c:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\root\"

Restart the site

Error #3

You update by using EPiServers built in Add-on system. And then the site responds with "An item with the same key has already been added."

You probably have the same dll in both the bin and modulesbin folder.
Remove the duplicate from the bin folder (probably EPiServer.Cms.Shell.UI.dll)

25 February, 2013

Cannot find form to submit

I added an XForm to a page in EPiServer 7 using the built in XForms functionality.

When the user submitted the form they got the following error:

Cannot find form to submit (in EPiServer.XForms.WebControls.Submit.SubmitForm)

My stupid mistake was that I accidentally datda bound the xform property on page load...

I had a placeholder around it to control what to display when, and I data bound it without checking for post back... (I know, a newbie misstake ;-) )


 protected override void OnLoad(EventArgs e)
        {
            base.OnLoad(e);

            //FormPlaceHolder.DataBind();
            if(!IsPostBack) FormPlaceHolder.DataBind();


Stupid mistake, easy solution :-)