Today I made a clean, brand new install of EPiServer 7 on a Windows 2012 server using VS2012. For googlers finding this post with any issue present in title, just look for the bold text to try my solutions for your problem
I followed the instructions step by step here: http://world.episerver.com/en/Download/EPiServer-CMS/?id=66773&epslanguage=en&version=7
When the installation was finished I added my license file and browsed the site. So far so good. Then however I tried to start the site in debug mode to be able too look around for any news under the hood of the alloy site. Pressing F5 kept sending me to a page stating "This installation contains only core files."
Weird. Opened IIS and choose: Browse site. Site starts good and all. Checked the properties for IIS in VS2012. Nothing weird(changed site path from computer name to localhost though). Then I tried Release mode. No luck there either. BUT Release mode without debug mode worked so I tried to attach to process when site running. This is where I noticed the “Attach to:” was set for Automatically detect(..) option. Switching it to Managed code solved the problem.
User name?? Password?? I have no idea. Guess I should go by the ASP.NET Configuration option and set up a user with administrator rights there. But, for whatever reason I wanted to try out setting the user from code. here goes:
1: protected override void OnLoad(System.EventArgs e)
2: {
3: base.OnLoad(e);
4:
5: if (Master != null) // We only do this initialization for the top-level master page
6: {
7: return;
8: }
9: string username = "epiadmin";
10: string password = "epiadmin";
11: string email = "m.karlsson@outlook.com";
12:
13: Membership.CreateUser(username, password, email);
14: Roles.CreateRole("Administrators");
15: Roles.AddUserToRole(username, "Administrators");
16:
17: SetupMetaTags();
18: }
19: }
Compiling and then browsing the start page adds my user to the database and I’m able to login. Butt ugly solution I know BUT-quick as a weasel!