Installing AdminUI

Installing AdminUI with an existing IdentityServer

If you already have a working IdentityServer installation up and running then this walkthrough is for you.

This walkthrough will take you through the entire IIS configuration process, resulting in a working environment for IdentityExpress AdminUI, with the UI and backend API running on the same machine and targeting an existing IdentityServer. This will also include migrating your user store to the AdminUI Identity Schema.

This walkthrough will assume you already haveĀ IIS and the .NET Core Windows Server Hosting bundle installed.

Configure a Database.

AdminUI currently only supports MySql, PostgreSQL and SqlServer. This also includes SqlExpress.

Any used databases must accept remote connections, also ensure that your firewall allows connections on any used ports.

Create IIS Websites

Initially you will want to create 2 IIS Websites pointing at the folders we have provided in the emails. This will be one site for the UI front end, and another for backend API.

Once created you need to configure the applications for run no managed code. You can do this by going to Application Pools -> [Website Name] -> Basic Settings -> Change .NET CLR Version to No Managed Code.

AdminAPI Configuration

Once you have a Website Setup for the API, you will need to add some variables to the site in order to get it to run. The variables to be aware of for the API are:

  • DbProvider: This sets the database type you are using. Supported types and their values are: SqlServer, MySql, or PostreSql

  • IdentityConnectionString: The connection string for your Identity database (users)

  • IdentityServerConnectionString: The connection string for your IdentityServer database (clients, resources & grants).

  • AuthorityUrl: Url of the IdentityServer installation

  • UiUrl: Url of the AdminUI frontend (the idxui container)

  • RequireHttpsMetadata: Set to true or false if you want to ensure IdentityServer discovery endpoint uses TLS. Must be true for production

  • RunIdentityServerMigrations: Set to true or false if you require AdminUI to run Entity Framework migrations for IdentityServer DbContext's. This is useful if you have a new instance of IdentityServer currently without databases.

  • IdentityDatabaseToMigrateConnectionString (optional): The connection string of your existing ASP.NET Core Identity Entity Framework database that will be migrated to the database used in IdentityConnectionString (this must not be equal to IdentityConnectionString).

There are 2 ways to configure these variables. Either by going to the website in IIS and using the Configuration Edit -> Environment Varialblages Page and adding them one by one. Or by going directly to the web.config in the folder provided and adding these variables underneath the AspnetCore node. (note: the variables surrounded with ** will need to be changed):

<environmentVariables>
            <environmentVariable name="DbProvider" value="**SqlServer**" />
            <environmentVariable name="IdentityConnectionString" value="**ConnectionString**" />
            <environmentVariable name="IdentityServerConnectionString" value="**ConnectionString**" />
            <environmentVariable name="UiUrl" value="**UiURL**" />
            <environmentVariable name="AuthorityUrl" value="**IdentityServer URL**" />
            <environmentVariable name="RequireHttpsMetadata" value="**false**" />
            <environmentVariable name="RunIdentityServerMigrations" value="**true**" />
            <environmentVariable name="LicenseKey" value="**Your Licence Key**" />
         </environmentVariables>

Note: Migrations should run on Website startup, if not you can hit the URL for the API to ensure they have ran.

AdminUI Configuration

Once you have a Website Setup for the UI, you will need to add some variables to the site in order to get it to run. The variables to be aware of for the UI are:

  • AuthorityUrl: Url of the IdentityServer installation

  • UiUrl: Url of the AdminUI frontend

  • ApiUrl: Url of the API setup in the previous step.

For the UI there is an extra configuration step needed after the Web.Config has been changed.

There are 2 ways to configure these variables. Either by going to the website in IIS and under Management using the Configuration Editor -> Environment Varialblages Page and adding them one by one. Or by going directly to the web.config in the folder provided and adding these variables underneath the AspnetCore node. (note: the variables surrounded with ** will need to be changed):

<environmentVariables>
    <environmentVariable name="UiUrl" value="**Url Of this Website**" />
    <environmentVariable name="AuthorityUrl" value="**IdentityServer URL**" />
    <environmentVariable name="ApiUrl" value=**Api Setup in the Previous Step**" />
  </environmentVariables>

Once you have configured these variables you will need to navigate to navigate to the provided folder and edit the env.js file in wwwroot. The variables in this will need to match the variables above:

var ENV = {
    AuthorityUrl: '**Identity Server Url Here**',
    UiUrl: '**Url of this website**',
    ApiUrl: '**Url Setup in the previous step**'
};