Don't miss out Virtual Happy Hour this Friday (April 26).

Try our conversational search powered by Generative AI!

Need additional information on setting up Episerver site using an Empty project VS template

Vote:
 

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.

#245974
Dec 23, 2020 11:35
Paulson - Dec 23, 2020 11:37
Would be great if the official documentation has steps for setting this up
Vote:
 
#245976
Dec 23, 2020 12:18
Paulson - Dec 23, 2020 15:38
Thanks Ravindra! I already tried this link - I got "No owin.Environment item was found in the context."
I changed the setting optimizeCompilations="false" in Web.config, Then it was resolved. I ha other errors too, I'll share them in the answers section.
I also removed all the registration page files.
Now I can see the dashboard..!!
Vote:
 

Resolved!

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=2.0.0.0"

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 

#245978
Edited, Dec 23, 2020 15:41
Vote:
 

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.

#245979
Dec 23, 2020 16:25
Paulson - Dec 24, 2020 7:40
Thanks for your notes Chris! Incase for those who are using windows domain-based account, they may not be able to login though they enter the right credentials. This was my scenario - so I think in this situation we must create a CMS user through coding as Kristoffer posted in his blog.
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.