Friday, February 13, 2009

Installing EPiServer Community standalone

When installing the standalone version of EPiServer Community, or actually when installing any version of EPiServer Community on a IIS 7 there is a small glitch in the Web.config that is installed. But the glitch will only be a problem in the standalone version.

If you install the site with the default settings you will be able to reach the administration interface by accessing http://localhost:17000/EPiServerCommunity. This will however result in the following error:

[NullReferenceException: Object reference not set to an instance of an object.]
   EPiServer.Common.Settings.get_DefaultSecurity() +29
   EPiServer.Community.Web.Administration.CommunityModule.context_AcquireRequestState(Object sender, EventArgs e) +9
   System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +79
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +170

The is due to the glitch I mentioned, more specifically the attribute preCondition="managedHandler" is lacking from the EPiServerCommunity module section in the Web.config. The obvious fix is to add this attribute. After you have done this you will end up with something like this:

<modules>
   <add name="EPiServerCommon" type="EPiServer.Common.Web.HttpModule, EPiServer.Common.Web" preCondition="managedHandler" />
   <add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" preCondition="managedHandler" />
   <add name="EPiServerCommunity" type="EPiServer.Community.Web.Administration.CommunityModule, EPiServer.Community.Web.Administration" preCondition="managedHandler" />
</modules>

And now your standalone EPiServer Community site will rock!

0 comments: