Hi Dev's, I'm new to Episerver. I tried installing alloy site and was able to register and login to the CMS.
But, when I tried to follow the empty project VS template to learn better, I couldn't succeed in creating an admin user in Episerver CMS as my organization is using domains for windows account.
I tried copying the registration page files from alloy site project to my empty template project, but when I ran the project browsing /Register , I'm getting 404 error.
Any help is much appreciated!
I couldn't get through this problem using the earlier information/solutions under this topic.
Create a user using the Initialization module.
Followed this link https://world.episerver.com/blogs/kristoffer-linden/dates/2017/12/create-episerver-login-account-by-code/
I got "No owin.Environment item was found in the context." I then changed the setting optimizeCompilations="false" in Web.config, Then it was resolved.
I also removed all the registration page files that I copied from Alloy project.
In the beginning, I got a little confused on seeing the UserStore & ApplicationUser classes because I have only seen this in ASP.Net Core Identity namespaces. So I installed those .NET Core nuget packages. Later I removed those packages and referenced "using EPiServer.Cms.UI.AspNetIdentity" for resolving the namespace errors for UserStore & ApplicationUser
After running the empty project, I browsed to /util/login.aspx and entered the credentials I created using the code that Kristoffer posted in that link. I got another error saying "The type 'System.Object' is defined in an assembly that is not referenced. You must add a reference to assembly 'netstandard, Version=22.214.171.124"
This error was resolved by removing the other dependent .NET Core packages that were still referenced in my project though ASP.Net Core Identity packages were uninstalled.
Now I can login and see the CMS dashboard...! Thank you JESUS
So I know you already figured everything out and answered the question, but I want to add a couple notes for those seeing this after the fact.
The Alloy sample site uses ASP.NET Identity for auth. This is not something that comes pre-configured for a new empty Episerver site.
A new empty Episerver site will be set up with multiplexing using WindowsMembershipProvider and SqlServerMembershipProvider, and there are no SQL membership users created by default. The only way you'll be able to log in (without doing additional configuration or coding) is with your Windows account.
But once you log in, you can access Admin mode and create a SQL membership user from there for future access.