Geeks With Blogs
Magnus Karlsson

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 problemLer

I followed the instructions step by step here:

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.

Log in to http://rootsitename:17000/episerver

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);
   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 = "";
  13:             Membership.CreateUser(username, password, email);
  14:             Roles.CreateRole("Administrators");
  15:             Roles.AddUserToRole(username, "Administrators");
  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!

Posted on Sunday, March 24, 2013 5:54 PM | Back to top

Comments on this post: EPiServer 7 – issue with debugging and creating login user on brand new alloy default site

No comments posted yet.
Your comment:
 (will show your gravatar)

Copyright © Magnus Karlsson | Powered by: