I’m sure that, like a lot of people working with EPiServer I have a play area that I use to try things out and start off any proof of concept work that I’m going to be implementing later on in various projects. For this, I use the SDK Installation of EPiServer CMS along with an instance of the Visual Studio Web Server when my laptop boots up so that it’s always running.
Today, I wanted to have a play with Composer with a view to knowing enough about it to be able to get sign-off some projects that can use it. First thing is just install it and see what happens. There were some pretty good videos on the EPiServer site that give you basic tutorials on what to do once it was installed, but installing it is a minor stumbling block if you’re running the SDK, as your site it not hosted in IIS. Cunningly, the EPiServer Deployment Center seems to look at sites in IIS and you don’t appear to have the ability to connect to a different web server (please, someone correct me if I am wrong).
You can get past this little ‘glitch’ assuming that you have and instance of IIS installed locally and it’s pretty simple to get around if you follow the steps below:
- Crack open the web.config file of your SDK site. Remove the port from the siteUrl, uiUrl and utilUrl attributes in the siteSettings element.
More than likely the value is 6666, but note it down, as you will be putting it back later.
- Open up IIS administration and create a new virtual directory with the same name as your SDK site. Point thin new virtual directory at your SDK site installation folder and ensure that you create an application for it (if not automatically done).
- IIS will now be able to server your site, but EPiServer will rightly inform you that you don’t have a license file. Don’t worry too much about that, because we have no intention of really using IIS to serve the files and will be scurrying back to Visual Studio’s web server before too long.
- Your next step is a potential setting change in the web.config again. Look for the virtualPathMappings element (if there is one already) and make sure that the url attribute starts ‘~/’. I had a full URL in here, but this could well have been to a previous bungled attempt at doing this. It’s worth checking and making sure it’s right. If you cant find it, don’t worry.
- From here, you should be able to open the EPiServer Deployment Centre and see your site. Select the site and install the Composer, and click ‘Next’ a couple of times until the installation is complete.
After you have done this, maybe install the samples too for good measure – chances are you are about to have a play anyway.
- Now that we have done that, we can reset the web.config to use the Visual Studio in-built web server by putting the port numbers back in. You can delete the IIS virtual directory at this point, or leave it there for later use, possibly with other EPiServer extension installations.
- If you now look at your website in the Visual Studio solution explorer, click ‘View All Files’ and add the ‘Composer’ and ‘Dropit’ folders to the project. Also, a reference to each of the DropIt DLLs that now reside in your bin folder:
- Dropit.ComponentArt.Web.UI.dll
- Dropit.Extension.dll
- Dropit.Extension.UI.dll
- You should now be able to build your site without any problems, so cross you fingers and hit <CTRL>+<SHIFT>+<B>.
- Assuming it all builds, your next step is to go and set up the Dropit.Extension plug-in. To do this, start your site and go to the Config tab in the Admin section. Select Plug-in Manager and edit the setting for Dropit.Extension. If the first property (‘Set the page ID for the root Composer data container’) is not set, click the little button and select the [Extension data Container] page from the root of your site. This should have been created during the installation of the Composer on your site.
That should be enough to get you running so that you can run through some of the sample videos on the EPiServer site and have a jolly good play.
It’s worth noting that I was running around in circles with a simple error until some nice fellow on twitter told me to check this article that contains logging information for composer (thanks, Mr. Hellstrom). It’s worth having on at least whilst you are getting to grips with it.
This is what i tried, although I suppose it is probably not en exact science, but it certainly should be a stab in the right direction.