diff --git a/Resources/ChangeLog.html b/Resources/ChangeLog.html
index 2d64ae7..6d14fa4 100644
--- a/Resources/ChangeLog.html
+++ b/Resources/ChangeLog.html
@@ -1,6 +1,6 @@
WebDoorCreator - Egalware
- Version: 0.9.2404.2315
+ Version: 0.9.2404.2316
Release note:
-
diff --git a/Resources/VersNum.txt b/Resources/VersNum.txt
index 8a864dd..27860b9 100644
--- a/Resources/VersNum.txt
+++ b/Resources/VersNum.txt
@@ -1 +1 @@
-0.9.2404.2315
+0.9.2404.2316
diff --git a/Resources/manifest.xml b/Resources/manifest.xml
index fed505c..5b83be9 100644
--- a/Resources/manifest.xml
+++ b/Resources/manifest.xml
@@ -1,6 +1,6 @@
-
- 0.9.2404.2315
+ 0.9.2404.2316
http://nexus.steamware.net/repository/SWS/WDC/stable/WDC.UI.zip
http://nexus.steamware.net/repository/SWS/WDC/stable/ChangeLog.html
false
diff --git a/WebDoorCreator.UI/Program.cs b/WebDoorCreator.UI/Program.cs
index e57cfcb..5a4bb4d 100644
--- a/WebDoorCreator.UI/Program.cs
+++ b/WebDoorCreator.UI/Program.cs
@@ -23,7 +23,7 @@ using WebDoorCreator.UI.Areas.Identity;
using WebDoorCreator.UI.Data;
using static Org.BouncyCastle.Math.EC.ECCurve;
- var builder = WebApplication.CreateBuilder(args);
+var builder = WebApplication.CreateBuilder(args);
// configuration setup
Microsoft.Extensions.Configuration.ConfigurationManager configuration = builder.Configuration;
@@ -37,17 +37,24 @@ string redisSrvAddr = connStringRedis.Substring(0, connStringRedis.IndexOf(":"))
var redisMultiplexer = ConnectionMultiplexer.Connect(connStringRedis);
string dbServerAddr = "127.0.0.1";
-if(connectionString.Contains("Server"))
+if (connectionString.Contains("Server"))
{
- var dbTokens = connectionString.Split(";");
bool trovato = false;
+ var dbTokens = connectionString.Split(";");
int numTok = dbTokens.Count();
int idx = 0;
- while(!trovato && idx< numTok)
+ while (!trovato && idx < numTok)
{
if (dbTokens[idx].StartsWith("Server="))
{
+ // rimuovo la chaive Server...
dbServerAddr = dbTokens[idx].Replace("Server=", "");
+ // se ci fosse un nome (tipo \\sqlexpress) rimuovo...
+ if (dbServerAddr.Contains("\\"))
+ {
+ int sIdx = dbServerAddr.IndexOf("\\");
+ dbServerAddr = dbServerAddr.Substring(0, sIdx);
+ }
trovato = true;
}
idx++;
@@ -55,7 +62,7 @@ if(connectionString.Contains("Server"))
}
// healthchecks
builder.Services.AddHealthChecks()
- //.AddSqlServer(connectionString, "MsSql instance")
+ .AddSqlServer(connectionString, healthQuery: "SELECT 1;", name: "sql", failureStatus: HealthStatus.Degraded, tags: new string[] { "DB", "MsSql" })
.AddAsyncCheck($"DB PING ({dbServerAddr})", () => WebDoorCreator.UI.Health.Checks.PingCheck(dbServerAddr))
.AddAsyncCheck($"Redis PING ({redisSrvAddr})", () => WebDoorCreator.UI.Health.Checks.PingCheck(redisSrvAddr))
//.AddProcessAllocatedMemoryHealthCheck(512, "Max Process memory (<512MB)", failureStatus: HealthStatus.Degraded) // 512 MB max allocated memory
diff --git a/WebDoorCreator.UI/WebDoorCreator.UI.csproj b/WebDoorCreator.UI/WebDoorCreator.UI.csproj
index 8153591..6a25632 100644
--- a/WebDoorCreator.UI/WebDoorCreator.UI.csproj
+++ b/WebDoorCreator.UI/WebDoorCreator.UI.csproj
@@ -3,7 +3,7 @@
net6.0
enable
- 0.9.2404.2315
+ 0.9.2404.2316
enable
aspnet-WebDoorCreator.UI-dfe95fed-1398-4144-bd43-8b3a765d6608