This is a little how-to on making it easier to share your episerver projects between multiple developers by making the location of the episerver resources more abstract.
1. Don't use absolute file locations in your web.config.
Instead of pointing directly to the absolute file locations of your unified filesystem like:
- c:\EPiServer\VPP\MySite\Global
- c:\EPiServer\VPP\MySite\PageFiles
- c:\EPiServer\VPP\MySite\Documents
or even the episerver installation folder
- C:\Program Files (x86)\EPiServer\CMS\5.2.375.133\application\Util
- C:\Program Files (x86)\EPiServer\CMS\5.2.375.133\application\UI
- C:\Program Files (x86)\EPiServer\CMS\5.2.375.133\application\App_Themes\Default
- C:\Program Files (x86)\EPiServer\CMS\5.2.375.133\application\WebServices
You should rater create local shares on the C:\EPiServer\VPP\MySite and the C:\Program Files (x86)\EPiServer folders. This helps you abstract the physical disk location of these resources. Some developers might need to store on a seperat disk than the c-drive and some developers might not have 64-bit machines and the episerver installation would be located under C:\Program Files\EPiServer instead of C:\Program Files (x86)\EPiServer. This is useful when dealing with a large web.config files that you would like to share through the source control.
 |
 |
<!-PageFiles folder ->
<add showInFileManager="false" virtualName="Page Files" virtualPath="~/PageFiles/" bypassAccessCheck="false" name="SitePageFiles" type="EPiServer.Web.Hosting.VirtualPathVersioningProvider,EPiServer" indexingServiceCatalog="Web" physicalPath="\\127.0.0.1\MySite$\PageFiles" />
<!-Global folder -->
<add showInFileManager="true" virtualName="Global Files" virtualPath="~/Global/" bypassAccessCheck="false" name="SiteGlobalFiles" type="EPiServer.Web.Hosting.VirtualPathVersioningProvider,EPiServer" indexingServiceCatalog="Web" physicalPath="\\127.0.0.1\MySite$\Global" />
<!-Documents folder-->
<add showInFileManager="true" virtualName="Documents" virtualPath="~/Documents/" bypassAccessCheck="false" maxVersions="5" name="SiteDocuments" type="EPiServer.Web.Hosting.VirtualPathVersioningProvider,EPiServer" physicalPath="\\127.0.0.1\MySite$\Documents" />
<!-EPiServer folders -->
<add name="UtilFiles" virtualPath="~/Util/" physicalPath="\\127.0.0.1\EPiServer$\CMS\5.2.375.133\application\Util" type="EPiServer.Web.Hosting.VirtualPathNonUnifiedProvider,EPiServer" />
<add name="App_Themes_Default" virtualPath="~/App_Themes/Default/" physicalPath="\\127.0.0.1\EPiServer$\CMS\5.2.375.133\application\App_Themes\Default" type="EPiServer.Web.Hosting.VirtualPathNonUnifiedProvider,EPiServer" />
<add name="WebServiceFiles" virtualPath="~/WebServices/" physicalPath="\\127.0.0.1\EPiServer$\CMS\5.2.375.133\application\WebServices" type="EPiServer.Web.Hosting.VirtualPathNonUnifiedProvider,EPiServer" />
<add name="UI" virtualPath="~/cms/" physicalPath="\\127.0.0.1\EPiServer$\CMS\5.2.375.133\application\UI" type="EPiServer.Web.Hosting.VirtualPathNonUnifiedProvider,EPiServer" />
NB You might abstract the location of the "Global", "PageFiles" and "Documents" even more by replacing the local machine mapping \\127.0.0.1\ with a custom machine name. e.g \\mysitefilesystem\. Then do a mapping to the wanted machine through c:\windows\system32\drivers\etc\host file.
2. Exclude the connectionStrings.config file from the source control
Some developers might want to use a local database and some might use a database stored on a shared location during the development process.