Installation Hints

  • The .NET Framework and .NET Core Hosting Bundle both require a reboot after installation. Also, the ASP.NET Core Runtime and the .NET Core Runtime must be on the same version.
  • If the installation breaks when attempting to install the Video API with HTTPS enabled, check the Windows execution policy for PowerShell scripts. The permissions need to be at least RemoteSigned or better Unrestricted to execute the scripts necessary during the reverse proxy setup. To change this policy, use the Set-ExecutionPolicy command.

Random Failure of Installer

  • Due to Windows locking the service, the installer can fail if the Windows Service Manager UI is open.
  • Issues might occur when a mixture of ASP.NET Core and .NET Core runtime versions were installed. Make sure that the latest version of ASP.NET Core and .NET Core is installed. Using the recommended hosting bundle from Microsoft solves this by installing both. If the installation fails, check the list of .NET runtimes using dotnet --list-runtimes.

Checking VideoAPI Installation Connection

You can check the connection to the Video API installation.

  • You are logged in on a different computer than the VMS server.
  1. Open a browser.
  1. Enter the following URL:
    https://[vms-server-hostname]:7442/settings?video_api_key=[token] where [vms-server-hostname] is the name of the VMS server and [token] is the REST Api Token created during installation of VideoAPI.
  • The following is displayed:
  1. If connection fails, perform the following steps on the VMS server:
  • Go to folder Setup\iis-reverse-proxy of the unpacked coresdk-x.zip bundle.
  • Run the PowerShell script remove_iis_video_proxy.ps1.
  • Run both installers request-router.msi and url-rewrite.msi.
  • Run the PowerShell script iis_video_proxy.ps1.
  • Restart the VideoAPI.
  1. If the connection fails again, it might help to reboot the VMS server.

Enabling Logging while Installing the Video API

  • A powershell window has been started with Administrator rights.
  1. Change to the directory where the installation file is located. The default installation path is %ProgramFiles%\Siemens\Video API.
  1. Enter the following command:
    msiexec /i InstallVideoApi.msi /l*v [path/to/file/]LogFile.txt
  1. Replace the value [path/to/file] with an existing path.
  • The installer writes a registry entry with the current installed Video API version to the following entry: HKEY_LOCAL_MACHINE\SOFTWARE\Siemens\VideoApi
  • The log files are stored to the following path: %ProgramData%\Siemens\VideoApi

Configuration of the Logging

For the logging of the main Video API service, the %ProgramFiles%\Siemens\VideoAPI\Service\log4net.config contains the relevant settings:

<log4net>

<appender name="Console" type="log4net.Appender.ConsoleAppender">

<layout type="log4net.Layout.PatternLayout">

<conversionPattern value="%date [%thread] %-5level %logger - %message%newline" />

</layout>

</appender>

<appender name="AppLogFile" type="log4net.Appender.RollingFileAppender">

<file value=".\VideoApiService.log" />

<appendToFile value="true" />

<maximumFileSize value="100MB" />

<maxSizeRollBackups value="3" />

<rollingStyle value="Size" />

<layout type="log4net.Layout.PatternLayout">

<conversionPattern value="%date [%thread] %-5level %logger - %message%newline" />

</layout>

</appender>

<appender name="MipSdkApiLogFile" type="log4net.Appender.RollingFileAppender">

<file value=".\MipSdkApi.log" />

<appendToFile value="true" />

<maximumFileSize value="100MB" />

<maxSizeRollBackups value="3" />

<rollingStyle value="Size" />

<layout type="log4net.Layout.PatternLayout">

<conversionPattern value="%date [%thread] %-5level - %message%newline" />

</layout>

</appender>

<logger name="MipSdkApiLogger" additivity="false">

<level value="OFF" />

<appender-ref ref="MipSdkApiLogFile" />

</logger >

<root>

<level value="INFO" />

<appender-ref ref="AppLogFile" />

</root>

</log4net>

  1. To enable full logging of the Video, change the log level in section root from INFO to DEBUG.
  • Additional output is written in the %ProgramData%\Siemens\VideoApi\VideoApiService.log.
  1. For logs that concern the VMS interface with Milestone, the section with the name MipSdkApiLogger can be turned on. Change the level value from OFF to INFO or DEBUG.

For the logging of the Video API Provider host process, the %ProgramFiles%\Siemens\VideoAPI\ProviderHost\Siemens.VideoApi.ProviderHost.exe.config contains the relevant settings:

<?xml version="1.0" encoding="utf-8"?>

<configuration>

<configSections>

<section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler, log4net" />

</configSections>

<startup>

<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2" />

</startup>

<log4net>

<appender name="Console" type="log4net.Appender.ConsoleAppender">

<layout type="log4net.Layout.PatternLayout">

<conversionPattern value="%date [%3thread] %-5level %logger - %message%newline" />

</layout>

</appender>

<appender name="AppLogFile" type="log4net.Appender.RollingFileAppender">

<file value="${ProgramData}\Siemens\VideoApi\ProviderHost\ProviderHost.log" />

<appendToFile value="true" />

<maximumFileSize value="100MB" />

<maxSizeRollBackups value="3" />

<rollingStyle value="Size" />

<layout type="log4net.Layout.PatternLayout">

<conversionPattern value="%date [%3thread] %-5level %logger - %message%newline" />

</layout>

</appender>

<appender name="MipSdkApiLogFile" type="log4net.Appender.RollingFileAppender">

<file value="${ProgramData}\Siemens\VideoApi\ProviderHost\MipSdkApi.log" />

<appendToFile value="true" />

<maximumFileSize value="100MB" />

<maxSizeRollBackups value="3" />

<rollingStyle value="Size" />

<layout type="log4net.Layout.PatternLayout">

<conversionPattern value="%date [%3thread] %-5level - %message%newline" />

</layout>

</appender>

<appender name="VmsSdkApiLogFile" type="log4net.Appender.RollingFileAppender">

<file value="${ProgramData}\Siemens\VideoApi\ProviderHost\VmsSdkApi.log" />

<appendToFile value="true" />

<maximumFileSize value="100MB" />

<maxSizeRollBackups value="3" />

<rollingStyle value="Size" />

<layout type="log4net.Layout.PatternLayout">

<conversionPattern value="%date [%3thread] - %message%newline" />

</layout>

</appender>

<logger name="MipSdkApiLogger" additivity="false">

<level value="OFF" />

<appender-ref ref="MipSdkApiLogFile" />

</logger>

<logger name="VmsProviderApiLogger" additivity="false">

<level value="OFF" />

<appender-ref ref="VmsSdkApiLogFile" />

</logger>

<root>

<level value="INFO" />

<appender-ref ref="AppLogFile" />

</root>

<logger name="Siemens.VideoApi.ProviderHost">

<level value="INFO" />

</logger>

</log4net>

<appSettings>

</appSettings>

<runtime>

<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">

<dependentAssembly>

<assemblyIdentity name="System.Runtime.CompilerServices.Unsafe" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />

<bindingRedirect oldVersion="0.0.0.0-6.0.0.0" newVersion="6.0.0.0" />

</dependentAssembly>

</assemblyBinding>

<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">

<dependentAssembly>

<assemblyIdentity name="System.Text.Json" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />

<bindingRedirect oldVersion="0.0.0.0-6.0.0.2" newVersion="6.0.0.2" />

</dependentAssembly>

</assemblyBinding>

</runtime>

</configuration>

 

The logging output for the provider host process is by default located in directory %ProgramData%\Siemens\VideoApi\ProviderHost\.