jakobosr posted on junij 26, 2024 12:11
PAW BackOffice
As of version 38.00 there have been some significant changes to the Web.config file in PAW frontend. The aim was to separate the pure technical configuration related to framework, components and their versions, from the user settings. This should simplify future updates, here the former need to be updated, but we want to keep the user settings intact.
The preexisting structure of the Web.config file looked like this:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<configSections>
…
</configSections>
<connectionStrings>
<add name="Master" connectionString … />
</connectionStrings>
<appSettings>
<add key="ApplicationName" value="PantheonRA_BO" />
<add key=... />
…
</appSettings>
<POSConfigurationGroup>
<POSConfiguration>
<SiteConfig type="backoffice" defaultController="CashRegister" defaultAction="Index" defaultLocalization="SI" defaultLanguage="SI" databaseLocalization="SI" localizationi18n="sl" localizationDate="sl" licencingEnabled="false" />
…
</POSConfiguration>
</POSConfigurationGroup>
…
</configuration>
The sections highlights in green represent the affected settings. They have been transferred to separate configuration files - connectionStrings.config, appSettings.config and POS.config. The changes to the Web.config are highlighted in orange.
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<configSections>
…
</configSections>
<connectionStrings configSource="ConnectionStrings.config"></connectionStrings>
<appSettings configSource="AppSettings.config"></appSettings>
<POSConfigurationGroup>
<POSConfiguration configSource="POS.config">
</POSConfiguration>
</POSConfigurationGroup>
The settings are simply moved to the new files. ConnectionStrings.config is actually obsolete and shall be removed in future versions, so it is fairly simple (but it has to be present).
ConnectionStrings.config
<connectionStrings>
</connectionStrings>
AppSettings.config
<appSettings>
<add key="ApplicationName" value="PantheonRA_BO" />
<add key=... />
…
</appSettings>
POS.config
<POSConfiguration>
<SiteConfig type="backoffice" defaultController="CashRegister" defaultAction="Index" defaultLocalization="SI" defaultLanguage="SI" databaseLocalization="SI" localizationi18n="sl" localizationDate="sl" licencingEnabled="false" />
…
</POSConfiguration>
Be mindful of the POSConfiguration tag being the root in the latter, not POSConfigurationGroup.
WebAPI changes
ASP.NET Core Runtime 5.0.17 Hosting Bundle has to be installed on the server. It can be acquired here: Hosting Bundle
Additionally, the ConnectionString in AppSettings.config has to be amended by adding TrustServerCertificate=true in order to properly establish the certificate trust.
Localization: EU
DL WebSites: