Try our conversational search powered by Generative AI!

Episerver login issues in local environment

Vote:
 

HI all,

I am trying to set up our company website application into my virtual local environment.

I got the Episerver db and custom db backup into my local. Application is loading fine, however, I could not able login to my local Episerver CMS dashboard using my windows credentials.

I am trying to access the local CMS dashboard with the URL : localhost:mysite/episerver

The login screen is loading, but could not able to login with my windows credentials, I tried login using Stage environment credentials where I got the back up of both DBS(Episerver/custom).

Getting below error. Can someone please suggest how to load the CMS dashboard in my virtual local environment

The trust relationship between the primary domain and the trusted domain failed.

#225845
Jul 28, 2020 19:18
Sanjay Kumar - Jul 31, 2020 2:23
This is password mismatch issue in your local computer so you need to reset it.

You can try steps:
https://support.microsoft.com/en-in/help/2771040/the-trust-relationship-between-this-workstation-and-the-primary-domain
Vote:
 

One thing to try - albeit it requires the help from your IT - is to quit and rejoin the domain. 

#225868
Jul 29, 2020 5:23
Vote:
 

Hi Sasi

Do your computer have access to the environment's domain controllers?

To just get started quickly, you can try creating a local account (with admin rights) on your computer, and log in to Episerver using that.

#225886
Edited, Jul 29, 2020 18:51
Vote:
 

Hi Stefan,

Thank you for your response.

I have no idea about your question. And as suggested I created a local account with admin rights, but still getting the same error.

What could be the reason for this issue? It is blocking my development activities.

Please suggest..!!

#225935
Jul 30, 2020 21:42
Vote:
 

Hi Sasi

This error message stated that the trust relationship between the workstation and the primary domain failed. You'll need your IT people help you solve this issue. Meanwhile, you can swith to use SQL membership on your local environment to continue your development activities. 

I'm not sure which CMS version do you currently use. The follow instruction assumes you're using membership not asp.net identity

1. Take a look in web.config->membership section, change defaultProvider to SqlServerMembershipProvider

    <membership defaultProvider="MultiplexingMembershipProvider" userIsOnlineTimeWindow="10" hashAlgorithmType="HMACSHA512">
      <providers>
        <clear />
        <add name="MultiplexingMembershipProvider" type="EPiServer.Security.MultiplexingMembershipProvider, EPiServer.Framework.AspNet" provider1="SqlServerMembershipProvider" provider2="WindowsMembershipProvider" />
        <add name="WindowsMembershipProvider" type="EPiServer.Security.WindowsMembershipProvider, EPiServer.Cms.AspNet" deletePrefix="BUILTIN\" searchByEmail="true" />
        <add name="SqlServerMembershipProvider" type="System.Web.Providers.DefaultMembershipProvider, System.Web.Providers, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" connectionStringName="EPiServerDB" enablePasswordRetrieval="false" enablePasswordReset="true" requiresQuestionAndAnswer="false" requiresUniqueEmail="false" maxInvalidPasswordAttempts="5" minRequiredPasswordLength="6" minRequiredNonalphanumericCharacters="0" passwordAttemptWindow="10" applicationName="/" />
      </providers>
    </membership>

2. Using the follow initialization code to create an admin user in your database

[InitializableModule]
[ModuleDependency(typeof(EPiServer.Web.InitializationModule))]
public class CreateAdminUserForMembershipInitiialization : IInitializableModule
    {
        private static readonly ILog Log = LogManager.GetLogger(typeof(CreateAdminUserForMembershipInitiialization));

        public void Initialize(InitializationEngine context)
        {
#if DEBUG
            var mu = Membership.GetUser("EpiSQLAdmin");

            if (mu != null) return;

            try
            {
                Membership.CreateUser("EpiSQLAdmin", "6hEthU", "EpiSQLAdmin@site.com");

                try
                {
                    this.EnsureRoleExists("WebEditors");
                    this.EnsureRoleExists("WebAdmins");

                    Roles.AddUserToRoles("EpiSQLAdmin", new[] { "WebAdmins", "WebEditors" });
                }
                catch (ProviderException pe)
                {
                    Log.Error(pe);
                }
            }
            catch (MembershipCreateUserException mcue)
            {
                Log.Error(mcue);
            }
#endif
        }

        public void Uninitialize(InitializationEngine context)
        {
        }

        private void EnsureRoleExists(string roleName)
        {
            if (Roles.RoleExists(roleName)) return;

            try
            {
                Roles.CreateRole(roleName);
            }
            catch (ProviderException pe)
            {
                Log.Error(pe);
            }
        }
    }
#225955
Jul 31, 2020 1:34
This thread is locked and should be used for reference only.
* 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.