Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

...

Introduction

This article describes, how to configure the logs for the Authentication service and how to run the authentication service in the development mode. This includes the activation of the logs and how to change the path of the log files. Running it in the development mode can be helpful to see more output in the UI and to use the default OTP (111111) without having access to the OTP device or mail itself.

Activate logs

Step 1 - Navigate to the web.config file

You have to navigate to the follwoing path and open the web.config file: "Authentication Service: C:\ProgramData\itsense\AuthenticationService_900000

Step 2 - Make changes in the web.config file

Set the parameter “stdoutLogEnabled“ on “true“ in the web.config file.

Code Block
stdoutLogEnabled="true"

Step 3 - Read your logs

Now the Authentication sevice is writing the logs in the specified path in the web.config file.

Code Block
stdoutLogFile=".\logs\stdout" />

Change path of the log-files

Step 1 - Create new folders

For this example, create a new folder in any path you want. You can name the folder as you want. Create a subfolder in the just created folder, which you name AuthenticationService_900000. Create again a subfolder in AuthenticationService_900000, which you name logs.

Step 2 - Change the configuration of the web.config file

Open the Server, where the CoreOne Suite Authentication Service is running on. Navigate to the path: C:\ProgramData\itsense\AuthenticationService_900000. Now open the Web.config file in Notepad, Notepad++ or an other text edit program. In this file you have to change the path for the log files. The new path must be exactly the same as you created in step one.

Change the path for the log file at “ stdoutLogFile=”.\logs\stdout” />

Code Block
languagenone
<?xml version="1.0" encoding="utf-8"?>
<configuration>
    <location path="." inheritInChildApplications="false">
        <system.webServer>
            <handlers>
                <add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModule" resourceType="Unspecified"/>
            </handlers>
            <aspNetCore processPath="dotnet" arguments='"C:\Program Files\ITSENSE AG\Authentication service\Server\iTsense.CoreLogin2.Server.dll" -db moving_appcustomer_900000 -appCustomer 900000' stdoutLogEnabled="true" stdoutLogFile=".\logs\stdout" />
        </system.webServer >
    </location>
</configuration>

Step 3 - Change the configuration of the CoreLogin_Log4Net.config file

Stay on the server, where the Authentication Service is running. Navigate to the the file “CoreLogin_Log4Net.config”. This file is located here: C:\ProgrammData\itsense\configuration. Now open the CoreLogin_Log4Net.config file in Notepad, Notepad++ or an other text edit program.

...

Code Block
<file value=”path” />

Step 4 - Change Privileges of the created folder

Open the properties of the main folder which you have created in step one. In this case it is the folder “D:\itsense“. Add the User which starts the App Service of the CoreOne Suite and give him all privileges.
You can proof which User needs to have the privileges. Just start the application “Services“ an search for CoreOne Suite - Core. The User which is deposit as “Log On As“ is the user which has to get all the privileges to the new folder. If you won’t do that the User can’t write in to the folder an you won’t have your log-files.

...

Run Authentication service in Development mode

  • Open the IIS

  • Click on the server root level node

  • Click on “Configuration Editor”

  • Go to section “system.applicationHost/applicationPools”

  • Click the “…” on the collection

  • Click on “CoreOne Authentication Service”

  • Click on “…” on the “environmentVariables” in the Properties view below

  • Click “Add” and add the environment variable key “ASPNETCORE_ENVIRONMENT” with the value “Development”

  • Save everything and restart the authentication service apppool

...