Setup environment


Hi I have a question about setting up an environment locally. In this case I have access to code from a revision system ( TFS in this case ). But after I have checked out the code how do I do to get it to work locally on my machine and with my own database. Because I want to be able to test things locally while developing and also have my own database to enter data to while testing stuff.

So basically my questions is. After I have checked out the code:

1. Before when I have setup an EPiserver project I have used the plugin in Visual Studio which takes care of setting up the database and creating tables and so forth. How do I do this step when I already have the code and wants the database? Can the needed tables be generated somehow?

2. What configuration files do I need to change to enter proper values for my own database and whatever other settings may be needed?

Mar 30, 2013 23:21


1. You can either use the deployment center to create a local database or take a backup of the existing one (which I recommend) and restore it locally.

2. If the database is not the same you need to update the pagestartid in episerver.config for this site. In addition you also need to update the connection string in connectionstrings.config

Hope this helps


Mar 31, 2013 8:51

Thanks Frederik!

For various reason I can't make a backup of the existing database for a while so I need to create a local database so I can work now. I did as you suggested and created a new database through deployment center ( Install SQL Server Database option ) and changed the connectionstrings.config and pagestartid.

After these changes the site seems to work ( but it is empry of course ), so if I go to, in this case, http://localhost:37001/gui/cms/ I get the loginscreen there but after I enter my credentials and it looks like the EPiServer Edit mode is about to load I get an message saying:

"Unable to connect to the web server. What would you like to do? Reload or Ignore".

If I choose reload there nothing happens, but if I choose ignore I can enter Edit mode and if I choose for example to add a new Page I can see the Page Types available in this project so it kind of works.

Do you know if there is somewhere else I need to change to fix it to work properly with IIS? If I check in IIS Express under sites this project is called EpiServerSite1 for some reason and not the actual name of my project which has been the case in all other projects when I have created them locally from the beginning.

Mar 31, 2013 12:45

What page id have you set as your start page? Afaik if you set it to 1 (the root), then this will happen. In that case create a new start page in edit mode and update episerver.config with the id.

You can change the site name in episerver.config, under the siteDisplayName attribute.


Mar 31, 2013 12:51

Thanks again Frederik. I used page id 0 as my start page to begin with. I changed it to 1 and created a start page and updated episerver.config with that new id ( 4 in this case ). I can see the start page in "forms editing" but get errors in "on page editing". However what is more strange is that If I am in Edit mode and click the Root "page" in the page hierarchy I get an error like this which seems like something is very wrong:

"Server Error in '/' Application.

The resource cannot be found.

Description: HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable. Please review the following URL and make sure that it is spelled correctly.

Requested URL: /GUI/CMS/en/,,1_1/"

Even if I change the name of the site in episerver.config under the siteDisplayName I still see it as EpiServerSite1 if I check in IIS Express.

I'm not sure what may be the problem but it seems there is some problem with IIS perhaps or can I check the database for something to be able to try to find out what is wrong?

Mar 31, 2013 14:30

The on page editing errors could be something in your template. siteDisplayName will only change the name of the site in EPiServer not in IIS Express. Not sure how you change it in IIS express, but guessing it is either a configuration file somewhere or in your project file (might need to unload it).

Also, do you have the VPP modules? (in episerverframework.config you can see the path to them).


Mar 31, 2013 14:34

Thanks again Frederik and sorry for the late answer. I had to go away over the day.

I can see tags like these in episerverframework.config:

<add virtualPath="~/GUI/" physicalPath="[appDataPath]\Modules"
name="ProtectedAddons" type="EPiServer.Web.Hosting.VirtualPathNonUnifiedProvider, EPiServer.Framework" />

What are those VPP modules for, how does it work? I have never really understood that. Those may be responsible for my problem.


Apr 01, 2013 16:08

Basically they map a virtual path (~/GUI/) to a physical path (that can be outside your web application, under program files, network share etc). In this case what is interesting is the AppData path. Inside there should be a Modules and ModulesRepository folder that has some of the modules needed for EPiServer CMS to run. The rest should be under C:\Program Files (x86)\EPiServer\CMS\xxxxx (if you're running 64 bit, under 32 bit it is just C:\Program Files\EPiServer\CMS\).


Apr 01, 2013 17:36

Thanks again Frederik, appreciate your help. I set your last reply as the answer to this thread.

Apr 02, 2013 13:25
This thread is locked and should be used for reference only. Please use the Episerver CMS 7 and earlier versions forum to open new discussions.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.