Wage Connector V2 Configuration¶
appsettings.json Example¶
{
"App": {
"ApiKey": "SOME_GENERATED_KEY",
"ApiHelpEnabled": false,
"IpFilter": null
},
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft.AspNetCore": "Warning"
}
},
"KestrelComment": "To enable HTTPS follow the guide on https://kb.total-view.com/documentation/hr/wage-connector-v2-configuration.html",
"Kestrel": {
"Endpoints": {
"Http": {
"Url": "http://+:8000"
}
}
},
"AllowedHosts": "*"
}
App:ApiKey¶
The API key that should be used by Totalview HR to connect to the Totalview HR Wage Connector
App:IpFilter¶
A list of IP address that are allowed to make requests to the endpoint.
If set to
null then no filter is applied.Example
"IpFilter": "127.0.0.1, ::1" will only allow traffic from localhost (often used if using a reverse proxy)Changing this does need a restart.
App:ApiHelpEnabled¶
If set to
true the WSDL will be made available. Should be false in production.Changing this does need a restart.
Logging¶
The
default logging is controlled by the Admin Client and should not be changed manually.It is possible to add specific logging for sections. E.g., below the “Microsoft” log is set to trace.
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft": "Trace",
"Microsoft.AspNetCore": "Warning"
}
},
See Configure logging on learn.microsoft.com for more details.
How to switch from Http to Https¶
"Kestrel": {
"Endpoints": {
"Http": {
"Url": "http://+:8000"
}
}
}
}
Replace the Http section so it looks like this.
Remember to keep the Url port the same as before.
Change the Certificate to a valid certificate that is available on the computer.
"Kestrel": {
"Endpoints": {
"Https": {
"Url": "https://+:8000",
"Certificate": {
"Subject": "localhost",
"Store": "My",
"Location": "LocalMachine",
"AllowInvalid": false
}
}
}
}
}
NB! The Totalview HR Wage Connecter needs to be restarted for this to take effect.
To verify if this works you can navigate to the page https://[dns-name-of-wcf].fo with “app:ApiHelpEnabled = true” and you should get a response without a certificate error.
How to list certificates on the machine¶
The best way is using Manage Computer Certificate and looking in Local Computer / Personal / Certificates. It is also possible to use PowerShell as administrator and running.
(Get-ChildItem -Path Cert:\LocalMachine\My | ForEach-Object { 'Thumbprint: {0} | Subject: {1}, | HasPrivateKey: {2}' -f $_.Thumbprint, $_.Subject, $_.HasPrivateKey })
