Try our conversational search powered by Generative AI!

login failed with new empty project.

Vote:
 

If you create a new empty project in visual studio, and hit "localhost:xxxx" you get "Server error in / Application" which is expected as you have not created a page yet. The online guide then tells you to hit: localhost:xxxx/episerver and login with your "Windows credentials".  The web page shows "digital experience cloud" and asks for name and password. There is no forgot password option. I have tried my windows login which I use to login to the machine and it doestwork. How do I login?

for "name" i have tried "internal\first.last", "first.last", "first.last@myorg.com" etc.  my actual windows login is just "first.last".

The response is always "Login failed"

I also notice that shortly after, it says "iisexpress.exe" has exited with code -1 (see below).

This is a brand new re-imaged machine which I instlaled the lastest VS code, episerver plugin, iis and ms sql server last week.  Nothing else has been done to the machine - no other tools or config.  Its windows 10 pro (with latest updates).

'iisexpress.exe' (CLR v4.0.30319: /LM/W3SVC/2/ROOT-1-132176722790494652): Loaded 'Anonymously Hosted DynamicMethods Assembly'.
'iisexpress.exe' (CLR v4.0.30319: /LM/W3SVC/2/ROOT-1-132176722790494652): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_32\System.Transactions\v4.0_4.0.0.0__b77a5c561934e089\System.Transactions.dll'.
'iisexpress.exe' (CLR v4.0.30319: /LM/W3SVC/2/ROOT-1-132176722790494652): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\SMDiagnostics\v4.0_4.0.0.0__b77a5c561934e089\SMDiagnostics.dll'.
'iisexpress.exe' (CLR v4.0.30319: /LM/W3SVC/2/ROOT-1-132176722790494652): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.ServiceModel.Internals\v4.0_4.0.0.0__31bf3856ad364e35\System.ServiceModel.Internals.dll'.
'iisexpress.exe' (CLR v4.0.30319: /LM/W3SVC/2/ROOT-1-132176722790494652): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Data.Linq\v4.0_4.0.0.0__b77a5c561934e089\System.Data.Linq.dll'.
'iisexpress.exe' (CLR v4.0.30319: /LM/W3SVC/2/ROOT-1-132176722790494652): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.IO.Compression\v4.0_4.0.0.0__b77a5c561934e089\System.IO.Compression.dll'.
'iisexpress.exe' (CLR v4.0.30319: /LM/W3SVC/2/ROOT-1-132176722790494652): Loaded 'C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE\Extensions\Microsoft\Web Tools\Browser Link\Microsoft.WebTools.BrowserLink.Tracing.dll'.
Exception thrown: 'System.IO.FileNotFoundException' in mscorlib.dll
'iisexpress.exe' (CLR v4.0.30319: /LM/W3SVC/2/ROOT-1-132176722790494652): Loaded 'Microsoft.GeneratedCode'.
'iisexpress.exe' (CLR v4.0.30319: /LM/W3SVC/2/ROOT-1-132176722790494652): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Runtime\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Runtime.dll'.
'iisexpress.exe' (CLR v4.0.30319: /LM/W3SVC/2/ROOT-1-132176722790494652): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Threading.Tasks\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Threading.Tasks.dll'.
'iisexpress.exe' (CLR v4.0.30319: /LM/W3SVC/2/ROOT-1-132176722790494652): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Diagnostics.Tracing\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Diagnostics.Tracing.dll'.
'iisexpress.exe' (CLR v4.0.30319: /LM/W3SVC/2/ROOT-1-132176722790494652): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Collections.Concurrent\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Collections.Concurrent.dll'.
Exception thrown: 'EPiServer.Licensing.LicenseException' in EPiServer.Licensing.dll
Exception thrown: 'System.IO.FileNotFoundException' in mscorlib.dll
'iisexpress.exe' (CLR v4.0.30319: /LM/W3SVC/2/ROOT-1-132176722790494652): Loaded 'Microsoft.GeneratedCode'.
'iisexpress.exe' (CLR v4.0.30319: /LM/W3SVC/2/ROOT-1-132176722790494652): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Numerics\v4.0_4.0.0.0__b77a5c561934e089\System.Numerics.dll'.
'iisexpress.exe' (CLR v4.0.30319: /LM/W3SVC/2/ROOT-1-132176722790494652): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Net.Http\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Net.Http.dll'.
'iisexpress.exe' (CLR v4.0.30319: /LM/W3SVC/2/ROOT-1-132176722790494652): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Web.Mobile\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Web.Mobile.dll'.
'iisexpress.exe' (CLR v4.0.30319: /LM/W3SVC/2/ROOT-1-132176722790494652): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Web.RegularExpressions\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Web.RegularExpressions.dll'.
Exception thrown: 'System.Web.HttpException' in System.Web.dll
'iisexpress.exe' (CLR v4.0.30319: /LM/W3SVC/2/ROOT-1-132176722790494652): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Xaml.Hosting\v4.0_4.0.0.0__31bf3856ad364e35\System.Xaml.Hosting.dll'.
'iisexpress.exe' (CLR v4.0.30319: /LM/W3SVC/2/ROOT-1-132176722790494652): Loaded 'C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\vs\16e97345\f70c98fd\App_Web_login.aspx.e1633260.zudqi_6e.dll'.
'iisexpress.exe' (CLR v4.0.30319: /LM/W3SVC/2/ROOT-1-132176722790494652): Loaded 'C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\vs\16e97345\f70c98fd\App_Theme_Default.dll'.
'iisexpress.exe' (CLR v4.0.30319: /LM/W3SVC/2/ROOT-1-132176722790494652): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\Microsoft.VisualBasic\v4.0_10.0.0.0__b03f5f7f11d50a3a\Microsoft.VisualBasic.dll'.
Exception thrown: 'System.IO.FileNotFoundException' in mscorlib.dll
'iisexpress.exe' (CLR v4.0.30319: /LM/W3SVC/2/ROOT-1-132176722790494652): Loaded 'Microsoft.GeneratedCode'.
'iisexpress.exe' (CLR v4.0.30319: /LM/W3SVC/2/ROOT-1-132176722790494652): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_32\System.Data.OracleClient\v4.0_4.0.0.0__b77a5c561934e089\System.Data.OracleClient.dll'.
'iisexpress.exe' (CLR v4.0.30319: /LM/W3SVC/2/ROOT-1-132176722790494652): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Dynamic\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Dynamic.dll'.
Exception thrown: 'System.Data.SqlClient.SqlException' in System.Data.dll
Exception thrown: 'System.Data.SqlClient.SqlException' in System.Data.dll
Exception thrown: 'System.Data.SqlClient.SqlException' in System.Data.dll
Exception thrown: 'System.Data.SqlClient.SqlException' in EntityFramework.dll
Exception thrown: 'System.Data.SqlClient.SqlException' in EntityFramework.SqlServer.dll
Exception thrown: 'System.Data.SqlClient.SqlException' in System.Data.dll
Exception thrown: 'System.Data.SqlClient.SqlException' in System.Data.dll
Exception thrown: 'System.Data.SqlClient.SqlException' in System.Data.dll
Exception thrown: 'System.Data.SqlClient.SqlException' in EntityFramework.dll
Exception thrown: 'System.Data.SqlClient.SqlException' in EntityFramework.SqlServer.dll
'iisexpress.exe' (CLR v4.0.30319: /LM/W3SVC/2/ROOT-1-132176722790494652): Loaded 'EntityFrameworkDynamicProxies-System.Web.Providers'.
Exception thrown: 'System.Web.HttpException' in System.Web.dll
The thread 0x39a0 has exited with code 0 (0x0).
The thread 0x33ec has exited with code 0 (0x0).
Exception thrown: 'System.Security.Principal.IdentityNotMappedException' in mscorlib.dll
Exception thrown: 'System.Security.Principal.IdentityNotMappedException' in mscorlib.dll
Exception thrown: 'System.Security.Principal.IdentityNotMappedException' in mscorlib.dll
Exception thrown: 'System.Security.Principal.IdentityNotMappedException' in mscorlib.dll
Exception thrown: 'System.Security.Principal.IdentityNotMappedException' in mscorlib.dll
Exception thrown: 'System.Security.Principal.IdentityNotMappedException' in mscorlib.dll
The program '[21440] iisexpress.exe' has exited with code -1 (0xffffffff).

#209131
Edited, Nov 08, 2019 8:44
Vote:
 

If your system account is a domain based account then the credentials will not work.

A simple solution provided in this blog to create admin user via code

https://world.episerver.com/blogs/kristoffer-linden/dates/2017/12/create-episerver-login-account-by-code/

#209132
Nov 08, 2019 9:32
johnv - Nov 13, 2019 9:52
Hi Pfaful, Thanks for the help. I have not figured out how to run any code yet. Any suggestions?
Praful Jangid - Nov 13, 2019 10:03
In short, create a EpiserverInitialization.cs file and copy paste that code into your file. Press ctrl + F5 to run site. Now you need to enter the credentials that you are passing into CreateUser() method (username: sysadmin, password:p@ssword).
Here code inside Initialize() method will be executed when site runs. So your user will be created automatically.
johnv - Nov 13, 2019 11:16
Thanks for the suggestion. I created the file in the project root with the exact conents from that post, but when I run the project I get this:
The type or namespace name 'InitializableModuleAttribute' could not be found (are you missing a using directive or an assembly reference?) empty C:\Users\xxx\dev\empty\EpiserverInitialization.cs 1 Active
Praful Jangid - Nov 13, 2019 11:20
Add following

using System;
using System.Collections.Generic;
using System.Linq;
using EPiServer.Cms.UI.AspNetIdentity;
using EPiServer.Framework;
using EPiServer.Framework.Initialization;
using Microsoft.AspNet.Identity;
using Microsoft.AspNet.Identity.EntityFramework;
johnv - Nov 13, 2019 12:56
got a bit further. Now I get:
The type or namespace name 'UI' doe
1>s not exist in the namespace 'EPiServer.Cms' (are you missing an assembly reference?)
1>C:\Users\xxx\dev\empty\EpiserverInitialization.cs(8,17,8,23): error CS0234: The type or namespace name 'AspNet'
1> does not exist in the namespace 'Microsoft' (are you missing an assembly reference?)
1>C:\Users\xxx\dev\empty\EpiserverInitialization.cs(9,17,9,23): error CS0234: The type or namespace name 'AspNet'
1> does not exist in the namespace 'Microsoft' (are you missing an assembly reference?)
1>C:\Users\xxx\dev\empty\EpiserverInitialization.cs(31,40,31,66): error CS0246: The type or namespace name 'UserS
1>tore' could not be found (are you missing a using directive or an assembly reference?)
1>C:\Users\xxx\dev\empty\EpiserverInitialization.cs(31,50,31,65): error CS0246: The type or namespace name 'Appli
1>cationUser' could not be found (are you missing a using directive or an assembly reference?)
1>C:\Users\xxx\dev\empty\EpiserverInitialization.cs(31,13,31,28): error CS0246: The type or namespace name 'Appli
1>cationUser' could not be found (are you missing a using directive or an assembly reference?)
1>C:\Users\xxx\dev\empty\EpiserverInitialization.cs(55,33,55,59): error CS0246: The type or namespace name 'UserS
1>tore' could not be found (are you missing a using directive or an assembly reference?)
1>C:\Users\xxx\dev\empty\EpiserverInitialization.cs(55,43,55,58): error CS0246: The type or namespace name 'Appli
1>cationUser' could not be found (are you missing a using directive or an assembly reference?)
1>C:\Users\xxx\dev\empty\EpiserverInitialization.cs(55,67,55,82): error CS0246: The type or namespace name 'Appli
1>cationUser' could not be found (are you missing a using directive or an assembly reference?)
Praful Jangid - Nov 13, 2019 13:09
Now I guess your are missing some of the things
Epi nuget source added?
https://ravindrasrathore.wordpress.com/2019/01/10/configure-your-development-environment-episerver-for-beginners/

Here is steps to create empty site
https://ravindrasrathore.wordpress.com/2019/01/29/creating-your-first-solution-episerver-for-beginners/
johnv - Nov 13, 2019 14:30
Yes, I have follewed the exact steps in your tutorial to create a new empty site.

I just followed this page: https://world.episerver.com/documentation/Items/Installation-Instructions/Installing-Episerver-updates/ to install nuget.

However, the errors are the same.

Vote:
 

Make sure you are using the adminstrator account for login.

#209168
Nov 08, 2019 20:25
Vote:
 

What version of Episerver are you installing, generally if 10+ you should be presented with a create new user screen on first load, ensure bootstrap:execute is set to true in AppSettings. 

If pre 7, set the Roles and Membership providers to multiplexing, then locate the Episerver UI and Admin locations and add Everyone group to the allowed users (Web.config). 

#209180
Nov 10, 2019 0:46
Vote:
 

Thanks Minesh.  Its the curent version 11.  Yes, when I created an alloy project, it did prompt, but I just put dummy info as I was not planning to use this project. When I installed an empty project, I assumed that it would promt for new credentials for this project.  From you description, I guess that as I dont have the credentials, and I dont have a local admin account, I am now locked out.

Is there a way to wipe everthing and start again so I can login to a new empty episerver project?

#209185
Nov 10, 2019 17:15
Vote:
 

If you have database acess their is stored procedure to delete users, if that table is empty you should be given the prompt again to create a new user.

if you have code access look at the Register Controller and some quick modifications here should let you create new users programmatically 

#209186
Nov 10, 2019 17:20
Vote:
 

thanks Minesh. I have sql server and sql server management studio 18 installed, but when I open this, there are no databases. i am guessing that episerver is using some embeded database.  Does anyone know how to access this database with some sort of UI based tool?  If this was mySQL, I woudl just fire up mysql workbench or heidi sql and enter the port/user/pass, but for sqlserver express or whatever episerver is using, I have no idea how to access it to fix this issue unfortunately.  

#209274
Nov 13, 2019 8:59
Vote:
 

I got a bit further. I found the DB exporer in visual studio.  However, I cant find the user to delete it. I see the following tables:

1) User. This is empty

2) tblSynchedUser. This has one row  with the username of my local microsoft login whichi doesnt work.

3) Memberships. Empty

4) Roles. Empty

5) tblUserPermission has one row "Administrators".

6) usersInRoles. Empty

I cant find where the user is I have to delete to be able to move forward?

Also, I cant find the suggested stored procudure to delete users, althoug it wont help if I cant find the name of the user to delete?

This databaes is called EPiServerDB(mytestproj). Presumably this database is for my second project - the blank one.  The first project I created was the alloy one, which would have the "lost" admin user details.  So How does the mytestproj get the user setup in the alloyproject?  This is what I dont get - I expected each project to have its own admin user, and for the new project to promt to create an admin user like the first one did.  

#209275
Edited, Nov 13, 2019 9:17
Vote:
 

Given that there is no solution, I am wondering if my only option is to reinstall windows? The problem is that this has to be done by the IT department, and this takes days.  Is there some less drastic solution (e.g. some way to wipe the DBs completely and start again?)

#209276
Edited, Nov 13, 2019 9:24
Vote:
 

Why don't you try the above link (in my last reply) to Create Episerver admin user by code? That is an easy fix to setup new admin user.

#209277
Nov 13, 2019 9:24
Vote:
 

Create a new Empty database in SQL Server, update you connection string and run the Site.

This should now bootstrap with the New User screen. 

#209278
Nov 13, 2019 9:34
johnv - Nov 13, 2019 9:56
Thanks Minesh. I have the full blown MSSQL server installed, and could use the SQL server manager to create a database. However, epsierver by default uses databases running under the visual studio built in sql server express. I cant find any tool which allows me to create a new database for sqlserver express. I am guessing epsiserver creates them on the fly for each new project, but the crux is, if each project gets its own database, how can creating a new one help? It seems to be storing this admin user somewhere outside of the database, or in some global database I cant see.
johnv - Nov 13, 2019 10:03
I have looked for where the database connection string is defined. According to this document: https://world.episerver.com/forum/developer-forum/Developer-to-developer/Thread-Container/2019/1/how-to-get-the-name-of-the-database/, it is stored in a file called "connections.config"

Unfortunately, this file does not exist in my newly created empty project. Any idea where this is configured?

Vote:
 

In Web.config look for EpiserverDB

#209284
Nov 13, 2019 10:04
johnv - Nov 13, 2019 12:58
I found that reference. The next question is how to "connect" to the sqlserver express that was installed with visualstudion, and create a new db. sqlserver Managment studio (SSMS) doesnt see any databases - it doesnt seem to know about the express system. I am guessing I need to use the cmd "sqlcmd".

The problem is I dont know what to put in to sqlcmd as parameters to connect to the DB so I can create a new DB?

The crux is I dont know if the express DB, which I have never worked with, only runs when the program runs, so I can only connect to it if epsiserver is running, or if its some service which always runs like the full version of MS SQL server?
Minesh Shah (Netcel) - Nov 13, 2019 13:03
You can use any database provider with Episerver SQL Lite, SQL Server, Azure SQL etc etc

If you create a blank database and run the solution it should initialise setting up the schema for you and then asking you to create a new user.

e.g. connection string :

I'm not quite sure on how you have set up your solution and recommend at looking at the visual studio extension and starting again : https://marketplace.visualstudio.com/items?itemName=EPiServer.EpiserverCMSVisualStudioExtension
Minesh Shah (Netcel) - Nov 13, 2019 13:04
add name="EPiServerDB" connectionString="Server=localhost,1433;Initial Catalog=xxx;Persist Security Info=False;User ID=xxx;Password=xxx!;MultipleActiveResultSets=False;Encrypt=True;TrustServerCertificate=False;Connection Timeout=30;" providerName="System.Data.SqlClient"
johnv - Nov 13, 2019 13:31
Ok, I did this:
1) created a database in MS SQL Server (not express, I have no access to the built in express) called epiempty1
2) i edited the 3 lines in web.config and replaced EpiserverDB with epiempty1.

Now when I run the project, it gives this:

Parser Error Message: The connection name 'epiempty1' was not found in the applications configuration or the connection string is empty.
Minesh Shah (Netcel) - Nov 13, 2019 13:34
EPiServerDB connection name has to stay as is do not update this
johnv - Nov 13, 2019 14:27
Ok, I found this at the bottom of Web.config (which is not in the solution explorer, had to look on the file system)
I have created a database in the full version of ms sql server, called epiempty1, but have no idea what I need to change the abvove sting to.
Any Suggestions?
Vote:
 

Below are the steps to solver your problem if you do these exactly your login will work:

  1. Make sure your account is administrator on your windows.
  2. If your account is some web account or domain account try to create a local administrator account, On my system my account is administrator but is logged in through web or domain user, so below are steps to create a local administrator user. I assure you it work as i had tested myself.
    1. Go to control panel
    2. Go to user accounts
    3. Go to add new user and create a local administrator user
  3. Now run your site, and enter local administrator user credentials it will work
#255644
May 27, 2021 17:48
* 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.