No Users or Roles in New Install

Vote:
 

Hi,

I just installed EpiServer 7.5 CMS.

I tried to login with 'admin' and 'store' but my login failed.

I looked in the database, and there are no users in aspnet_Users and no Roles in aspnet_Roles.

Although the install successed with no errors, it does not seem to have set the database up correctly.

Using the Deployment Center app, i ran again the 'Install SQL Server database' task. Once the completed, I can see in the 'Details' the scripts that were run:

Executing database script "C:\Program Files (x86)\EPiServer\Framework\7.5.394.2\Database\sql\EPiServer.Data.sql"
Executing database script "C:\Program Files (x86)\EPiServer\CMS\7.5.394.2\Database\MSSQL\EPiServerRelease75.sql"

Neither of these scripts though contain the initial admin credentials.

How do I fix this?

Thnaks!

#120205
Apr 13, 2015 18:22
Vote:
 

Hi Adam,

No users are installed in a vanilla CMS install. You're thinking of EPiServer Commerce. In a vanilla CMS site you need to login with your windows user. That user will have admin rights (if he is in the local administrator group in Windows) and you can create users with that user.

/T

#120207
Apr 13, 2015 19:35
Vote:
 

Hi Adam,

As Toni said, you'll have to create users manually.

If you can't log in to epi using your windows account, then follow this article: http://dcaric.com/blog/episerver-how-to-log-in-to-admin-edit-mode

Or if you want something quicker, follow this one: http://dcaric.com/blog/episerver-how-to-create-admin-users-from-the-code

Hope this helps :)

#120208
Apr 13, 2015 20:02
Vote:
 

Toni - I tried logging in with my Windows account, with and without the domain name, but that didn't work.

Dejan - The second article, with the backdoor.aspx worked perfectly. The only bit missing from the post was to change the Role and Membership providers from Multiplexing to SqlServer, as mentioned in the first article.

Thanks very much - I'm in now!

Still a bit confused as to why such hacks are required on first install though. Not the most user friendly introduction to EPiServer. Would have thought it would be easy enough to add some SQL to C:\Program Files (x86)\EPiServer\CMS\7.5.394.2\Database\MSSQL\EPiServerRelease75.sql in order to create an initial login, as the Commerce app appears to.

#120256
Apr 14, 2015 10:10
Vote:
 

I think this is the professional way and that Commerce and other CMSs are doing it wrong.

Since you can use a variety of login methods I'd prefer not getting the database cluttered by the default SQL script.

In fact I'd like it also if EPi completely removed the aspnet_-tables and tblWindows-tables that aren't necessary when running for example Federated Security.

#120265
Apr 14, 2015 12:06
Vote:
 

Not cluttering up the database with uneeded objects is, I agree, a good thing.

However, if that is the case, then the install routine (which I've discovered this morning is rather flaky - one small error and the whole thing breaks, with no option other than starting all over again) should ask what login method will be used and configure it to allow a login once the site has been installed.

Having to find third party blogs, such as Dejan's (appreciated though it is) and install files like 'backdoor.aspx' just to allow a first time login is hacky and makes EPIServer look incomplete.

#120268
Apr 14, 2015 12:35
Vote:
 

I disagree it makes EPi look incomplete, rather the opposite since they can't possibly know what type of security and role setup you need. The SQL role and membership providers are supplied by Microsoft and they ship a configuration tool with Visual Studio so you should already have everything in place to create such a user and the Roles you see fit for your site. Also the whole provider concept is getting old and will more and more often be replaced by Federated Security solutions.

I do agree though that certain setups launched by Deployment Center have been flaky historically. But for later versions you shouldn't need to use Deployment Center. You instead get the Visual Studio add-on and create your site from the "New Project" guides.

https://visualstudiogallery.msdn.microsoft.com/4ad95160-e72f-4355-b53e-0994d2958d3e

#120273
Apr 14, 2015 13:28
Vote:
 

I agree with Adam.

Some kind of installation wizard which allows developers to set different role / membership providers and create an admin user would be more than welcome.

Many developers who are new to EPi have this problem. Visual Studio addon is great and EPiServer has very good documentation about edit / admin mode and API, but this part is missing.

#120274
Edited, Apr 14, 2015 13:37
Vote:
 

Hi Dejan,

you are a gem dude, backdoor worked for me.

And yes VS 2013 doesn't shows ASP.NET Configuration tool

Thanks,

MD

#151328
Jul 15, 2016 14:11
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* 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.