Überarbeitung Mok Session Handling
This commit is contained in:
@@ -1,19 +1,27 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<configuration>
|
||||
<startup>
|
||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2"/>
|
||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2" />
|
||||
</startup>
|
||||
<appSettings>
|
||||
<add key="ServerName" value="app3.bewoplaner.de"/>
|
||||
<add key="ConnectionStringServer" value="127.0.0.1"/>
|
||||
<add key="ConnectionStringUserId" value="root"/>
|
||||
<add key="ConnectionStringPassword" value="root"/>
|
||||
<add key="ConnectionStringPort" value="2206"/>
|
||||
<add key="MultitenancyPath" value="..\Multitenancy\Configs"/>
|
||||
<add key="CreateScriptsFolderPath" value="CreateScripts\"/>
|
||||
<add key="InsertScriptName" value="inserts.sql"/>
|
||||
<add key="CreateScriptName" value="create_Empty_MySQL.sql"/>
|
||||
<add key="ChangesScriptName" value="Changes_alle_fuer_neue_db.sql"/>
|
||||
<add key="LogFilePath" value="Logs\"/>
|
||||
<add key="ServerName" value="app7.bewoplaner.de" />
|
||||
<add key="ConnectionStringServer" value="127.0.0.1" />
|
||||
<add key="ConnectionStringUserId" value="root" />
|
||||
<add key="ConnectionStringPassword" value="root" />
|
||||
<add key="ConnectionStringPort" value="2206" />
|
||||
<add key="MultitenancyPath" value="..\Multitenancy\Configs" />
|
||||
<add key="CreateScriptsFolderPath" value="CreateScripts\" />
|
||||
<add key="InsertScriptName" value="inserts.sql" />
|
||||
<add key="CreateScriptName" value="create_Empty_MySQL.sql" />
|
||||
<add key="ChangesScriptName" value="Changes_alle_fuer_neue_db.sql" />
|
||||
<add key="LogFilePath" value="Logs\" />
|
||||
</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>
|
||||
</runtime>
|
||||
</configuration>
|
||||
|
||||
@@ -37,16 +37,45 @@
|
||||
<ApplicationIcon>bdt.ico</ApplicationIcon>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="MySql.Data">
|
||||
<HintPath>..\..\Lib\MySql.Data.dll</HintPath>
|
||||
<Reference Include="Microsoft.Bcl.AsyncInterfaces, Version=8.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.Bcl.AsyncInterfaces.8.0.0\lib\net462\Microsoft.Bcl.AsyncInterfaces.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.Extensions.DependencyInjection.Abstractions, Version=8.0.0.2, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.Extensions.DependencyInjection.Abstractions.8.0.2\lib\net462\Microsoft.Extensions.DependencyInjection.Abstractions.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.Extensions.Logging.Abstractions, Version=8.0.0.2, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.Extensions.Logging.Abstractions.8.0.2\lib\net462\Microsoft.Extensions.Logging.Abstractions.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="MySqlConnector, Version=2.0.0.0, Culture=neutral, PublicKeyToken=d33d3e53aa5f8c92, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\MySqlConnector.2.4.0\lib\net471\MySqlConnector.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Newtonsoft.Json.13.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Buffers, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Buffers.4.5.1\lib\net461\System.Buffers.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Configuration" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Diagnostics.DiagnosticSource, Version=8.0.0.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Diagnostics.DiagnosticSource.8.0.1\lib\net462\System.Diagnostics.DiagnosticSource.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Memory, Version=4.0.1.2, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Memory.4.5.5\lib\net461\System.Memory.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Net" />
|
||||
<Reference Include="System.Numerics" />
|
||||
<Reference Include="System.Numerics.Vectors, Version=4.1.4.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Numerics.Vectors.4.5.0\lib\net46\System.Numerics.Vectors.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Runtime.CompilerServices.Unsafe, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Runtime.CompilerServices.Unsafe.6.0.0\lib\net461\System.Runtime.CompilerServices.Unsafe.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Threading.Tasks.Extensions, Version=4.2.0.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Threading.Tasks.Extensions.4.5.4\lib\net461\System.Threading.Tasks.Extensions.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Transactions" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Xml" />
|
||||
|
||||
@@ -4,7 +4,7 @@ using System.Data;
|
||||
using System.IO;
|
||||
using BeWoDatabaseTerminator.Security;
|
||||
using BeWoDatabaseTerminator.Utils;
|
||||
using MySql.Data.MySqlClient;
|
||||
using MySqlConnector;
|
||||
|
||||
namespace BeWoDatabaseTerminator.MySql
|
||||
{
|
||||
@@ -118,6 +118,7 @@ namespace BeWoDatabaseTerminator.MySql
|
||||
{
|
||||
try
|
||||
{
|
||||
return;
|
||||
_Connection.Open();
|
||||
|
||||
var command = new MySqlCommand($"DROP SCHEMA IF EXISTS `{schemaName}`;", _Connection);
|
||||
|
||||
@@ -96,6 +96,7 @@ namespace BeWoDatabaseTerminator
|
||||
|
||||
private static async Task Main(string[] args)
|
||||
{
|
||||
|
||||
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;
|
||||
|
||||
PinCertificate();
|
||||
@@ -281,9 +282,9 @@ namespace BeWoDatabaseTerminator
|
||||
private static async Task ActivateDatabase(string tenant, ContractStatus contractStatus)
|
||||
{
|
||||
var connectionString = $"Server={_ConnectionStringServer};Password={_ConnectionStringPassword};User ID={_ConnectionStringUserID};Port={_ConnectionStringPort}";
|
||||
|
||||
//connectionString += ";Charset=utf8mb4";
|
||||
var isExisting = new MySqlHelper(connectionString).CheckForDatabase(tenant);
|
||||
|
||||
|
||||
var configFilePath = Path.Combine(_MultitenancyPath, $"{tenant}.config");
|
||||
|
||||
// Config-Datei existiert bereits
|
||||
|
||||
@@ -1,4 +1,14 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="Microsoft.Bcl.AsyncInterfaces" version="8.0.0" targetFramework="net472" />
|
||||
<package id="Microsoft.Extensions.DependencyInjection.Abstractions" version="8.0.2" targetFramework="net472" />
|
||||
<package id="Microsoft.Extensions.Logging.Abstractions" version="8.0.2" targetFramework="net472" />
|
||||
<package id="MySqlConnector" version="2.4.0" targetFramework="net472" />
|
||||
<package id="Newtonsoft.Json" version="13.0.1" targetFramework="net481" />
|
||||
<package id="System.Buffers" version="4.5.1" targetFramework="net472" />
|
||||
<package id="System.Diagnostics.DiagnosticSource" version="8.0.1" targetFramework="net472" />
|
||||
<package id="System.Memory" version="4.5.5" targetFramework="net472" />
|
||||
<package id="System.Numerics.Vectors" version="4.5.0" targetFramework="net472" />
|
||||
<package id="System.Runtime.CompilerServices.Unsafe" version="6.0.0" targetFramework="net472" />
|
||||
<package id="System.Threading.Tasks.Extensions" version="4.5.4" targetFramework="net472" />
|
||||
</packages>
|
||||
Reference in New Issue
Block a user