This post is meant as a simple proof-of-concept and basic primer into XCOPY deployment with EPiServer CMS 7.5.
The TL;DR version:
Why XCOPY deployment matters
NOTE: Fundamental features like .NET framework, IIS and SQL Server are still required.
That's possible because EPiServer sites** no longer have any external system dependencies, everything is self-contained within your web site.
NOTE: XCOPY deployment is currently only fully supported for CMS sites. EPiServer Commerce and Relate still have some external dependencies.
For sysadmins and developers, this means less time spent setting up and maintaining website environments.
Deploying to Azure environments
- "Azure Virtual Machines" - where you basically get full control over a virtual Windows Server. You are allowed to play virtual sysadmin and install programs/services, partition your disks, setup Remote Desktop access etc - without having to worry about hardware or scaling.
For database needs, you can install SQL Server directly on the server if you wish.
- "Azure Websites" - where you have practically no control over the server environment, you're not allowed to install anything, you just get an empty folder to drop your web application into (typically via Azure Management Portal).
For database needs, you would use the Azure SQL Server feature, which is a virtual, Cloud hosted SQL Server instance (Database-as-a-Service) to drop your database into.
Configuring basic features
NOTE: Often, these basic features are already configured by your hosting partner.
IIS 8 features
Open Control Panel > Turn Windows features on or off. This will open the Add Roles or Features wizard.
In the Server Roles section, check the following boxes:
In the Features section, check the following boxes:
After installation, restore (or attach) the database you copied from your other environment and make sure there is a valid login to put in your connectionstring config.
Deploying application files
For simplicity, the folder I'm deploying to will look something like this:
- D:\EPiServer\Sites\MySite\AppData\ (will contain all media, index, modules etc)
- D:\EPiServer\Sites\MySite\Web\ (will contain all application files, EPiServer CMS/Shell, license etc)
If you want to browse the site locally using its host name, add the host header to your C:\Windows\System32\Drivers\etc\hosts file.
Make sure all your .config files (web.config, episerver.config, episerverframework.config) reference the correct path to your folders, and the correct URL to your website.
(This is normally handled with config transformations via your build server.)
Manage site settings
By now, you should have a functional web site that you can log onto.
There's one more bit of config to be done - managing the website settings in Admin mode. Previously this was done via <siteSettings> in episerver.config, but this is now available in the database only (through the Admin UI).
Log into EPiServer and goto Admin mode > Config tab > Manage websites.
Add your website and the hostname you gave it in IIS.
Add any language versions you want the site to respond to.
- We copied a functional site onto another server, keeping the website, appdata and database structures intact
- Aside from some basic IIS bindings, all necessary config is included with the site
- We avoided installing proprietary software (e.g. Deployment Center) onto the server
- There are no EPiServer assemblies installed in the GAC
- There are no EPiServer services installed, nor is the site dependent on any Windows Services on the server