Skip to main content
Version: 4.3.0

Creating Administrator site (examples)

This topic contains examples on how to create the Administrator site under a specific set of conditions. The examples are complements to the instructions in Installing the Administrator.

note

Also note that the examples assume that the Administrator binary files have already been installed.

Creating the Administrator site (forms authentication)

Conditions:

  • The Administrator site and System Access Service (SAS) are installed on the same computer, which is also running a local iCPS installation.
  • The Administrator site is created with the PowerShell installation script.
  • The Administrator site uses forms authentication.

To create the Administrator site

  1. Create an installation configuration file with the following contents:
    <?xml version="1.0" encoding="utf-8"?>
    <Configuration xmlns="http://schemas.icore.se/web/installConfig/1.1"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://schemas.icore.se/web/installConfig/1.1 ../WebInstallConfig.xsd">
    <!-- Install iCore Administrator as a new web site using forms authentication. -->
    <Site SiteName="My iCore Site" PhysicalPath="%SYSTEMDRIVE%\inetpub\My iCore Site" xsi:type="WebAdmin.Site" >
    <Binding Port="8080" IPAddress="*" Type="http" />
    <ApplicationPool Name="My iCore Site" CreationDisposition="CreateIfNotExists"/>
    <Authentication Type="Forms"/>
    <Connections>
    <!-- This endpoint is pointing to the default endpoint of the iCore System Access service on the local
    machine. It may be desired to change this to the endpoint of the SAS on a remote machine, or
    add additional endpoints to remote system access services. -->
    <SystemAccessService Endpoint="net.pipe://localhost/iCore/SAS" Name="Default" />
    </Connections>
    </Site>
    </Configuration>
  2. Save the file as "MyWebInstallConfig.xml" in the iCore Administrator\{Version} folder.
  3. Start Windows PowerShell (64-bit version), with administrative privileges (right-click and select Run as administrator).
  4. Change directory to C:\Program Files (x86)\iCore Administrator\{Version} and run the installation script:
    & .\Install-iCoreWebAdmin.ps1 –SiteName "My iCore Site" –ConfigurationFile "MyWebInstallConfig.xml"
  5. Import the module containing the Administrator cmdlets.
    note

    To import the module To import the iCore.Administrator.Configuration module, run the Load-AdminModules.ps1 script from the correct Administrator version subdirectory, for example "C:\Program Files (x86)\iCore Administrator\{Version}\Load-AdminModules.ps1". See also Directory structure.

  6. Add a new Admin user:
    New-iCoreWebAdminUser -SiteName 'My iCore Site' -UserName 'admin' -Password 'password'
  7. Assign the new user to a role:
    Add-iCoreWebAdminRoleMember -SiteName 'My iCore Site' -RoleName 'Administrators' -WebAdminUser 'admin'

You should now be able to access the Forms login page, and use your new Administrator credentials to log in: 

  • Start Internet Explorer, and enter http://localhost:8080 in the browser's address bar. OR
  • Open the IIS manager, navigate to Sites/iCoreWebAdmin and select Browse *:8080 (http) in the Actions menu.

Creating the Administrator site (Open ID Connect authentication)

Conditions:

  • The Administrator site and System Access Service (SAS) are installed on the same computer, which is also running a local iCPS installation.
  • The Administrator site is created with the PowerShell installation script.
  • The Administrator site uses Open ID Connect authentication, with Azure AD as authentication provider.

To create the Administrator site

  1. Create an installation configuration file with the following contents:

    <?xml version="1.0" encoding="utf-8"?>
    <Configuration xmlns="http://schemas.icore.se/web/installConfig/1.1"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://schemas.icore.se/web/installConfig/1.1 ../WebInstallConfig.xsd">
    <!-- Install iCore Administrator as a new web site using openidconnect authentication. -->
    <Site SiteName="My iCore Site" PhysicalPath="%SYSTEMDRIVE%\inetpub\My iCore Site" xsi:type="WebAdmin.Site" >
    <Binding Port="8082" IPAddress="*" Type="http" />
    <ApplicationPool Name="My iCore Site" CreationDisposition="CreateIfNotExists"/>
    <Authentication Type="OpenIdConnect"/>
    <Connections>
    <!-- This endpoint is pointing to the default endpoint of the iCore System Access service on the local
    machine. It may be desired to change this to the endpoint of the SAS on a remote machine, or
    add additional endpoints to remote system access services. -->
    <SystemAccessService Endpoint="net.pipe://localhost/iCore/SAS" Name="Default" />
    </Connections>
    </Site>
    </Configuration>
  2. Save the file as "MyWebInstallConfig.xml" in the iCore Administrator\{Version} folder.

  3. Start Windows PowerShell (64-bit version), with administrative privileges (right-click and select Run as administrator).

  4. Change directory to C:\Program Files (x86)\iCore Administrator\{Version} and run the installation script:

    & .\Install-iCoreWebAdmin.ps1 –SiteName "My iCore Site" –ConfigurationFile "MyWebInstallConfig.xml"
  5. Import the module containing the Administrator cmdlets.

    To import the module

    To import the iCore.Administrator.Configuration module, run the Load-AdminModules.ps1 script from the correct Administrator version subdirectory, for example "C:\Program Files (x86)\iCore Administrator\{Version}\Load-AdminModules.ps1". See also Directory structure.

  6. Use PowerShell cmdlets to configure the Open ID connect provider.

    Set-iCoreWebAdminOidcProvider -SiteName "My iCore Site" -Authority "https://login.microsoftonline.com/[tenant ID]/v2.0" -ClientId "ClientIdValue" RedirectUri https://localhost:8082/ -IdentifierClaims "oid"
    Set-iCoreWebAdminOidcClientSecret -SiteName "My iCore Site" -ClientSecret "ClientSecretValue"
  7. Create a user and assign it to a role to be able to log in to the web application.

    $user = New-iCoreWebAdminOidcUser -SiteName "My iCore Site" -Name "admin"
    Add-iCoreWebAdminOidcUserIdentifier -SiteName "My iCore Site" -UserId $user.Id -Name "oid" -Value "AzureUserOidValue"
    Get-iCoreWebAdminOidcUser -SiteName "My iCore Site" -Name "admin" | Add-iCoreWebAdminRoleMember -SiteName "My iCore Site" -RoleName "Administrators"

You should now be able to access the login page, and use the new Administrator credentials to log in:

  • Start Internet Explorer, and enter http://localhost:8082 in the browser's address bar.
    OR
  • Open the IIS manager, navigate to Sites/iCoreWebAdmin and select Browse *:8082 (http) in the Actions menu.

See Also

Installing the Administrator