-
- An error has occurred. This application may no longer respond until reloaded.
-
-
- An unhandled exception has occurred. See browser dev tools for details.
-
- Reload
- 🗙
-
-
-
-
-
diff --git a/MP.Stats/Program.cs b/MP.Stats/Program.cs
index f159f7fc..1726dc14 100644
--- a/MP.Stats/Program.cs
+++ b/MP.Stats/Program.cs
@@ -2,6 +2,7 @@ using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.Hosting;
using Microsoft.Extensions.Logging;
+using NLog.Web;
using System;
using System.Collections.Generic;
using System.Linq;
@@ -11,16 +12,43 @@ namespace MP.Stats
{
public class Program
{
- public static void Main(string[] args)
- {
- CreateHostBuilder(args).Build().Run();
- }
+ #region Public Methods
public static IHostBuilder CreateHostBuilder(string[] args) =>
Host.CreateDefaultBuilder(args)
.ConfigureWebHostDefaults(webBuilder =>
{
webBuilder.UseStartup();
- });
+ })
+ .ConfigureLogging(logging =>
+ {
+ logging.ClearProviders();
+ logging.SetMinimumLevel(Microsoft.Extensions.Logging.LogLevel.Trace);
+ })
+ .UseNLog();
+
+ public static void Main(string[] args)
+ {
+ // inclusione NLog:
+ // https://github.com/NLog/NLog/wiki/Getting-started-with-ASP.NET-Core-5
+ // https://codewithmukesh.com/blog/logging-with-nlog-in-aspnet-core/
+ var logger = NLog.Web.NLogBuilder.ConfigureNLog("NLog.config").GetCurrentClassLogger();
+ try
+ {
+ logger.Info("MP.STATS Application Starting Up");
+ CreateHostBuilder(args).Build().Run();
+ }
+ catch (Exception exception)
+ {
+ logger.Error(exception, "Stopped MP.STATS program because of exception");
+ throw;
+ }
+ finally
+ {
+ NLog.LogManager.Shutdown();
+ }
+ }
+
+ #endregion Public Methods
}
-}
+}
\ No newline at end of file
diff --git a/MP.Stats/Properties/PublishProfiles/FolderProfile.pubxml b/MP.Stats/Properties/PublishProfiles/FolderProfile.pubxml
new file mode 100644
index 00000000..cb2062ae
--- /dev/null
+++ b/MP.Stats/Properties/PublishProfiles/FolderProfile.pubxml
@@ -0,0 +1,16 @@
+
+
+
+
+ False
+ False
+ True
+ Release
+ Any CPU
+ FileSystem
+ bin\publish\net5.0\
+ FileSystem
+
+
\ No newline at end of file
diff --git a/MP.Stats/Properties/PublishProfiles/FolderProfile.pubxml.user b/MP.Stats/Properties/PublishProfiles/FolderProfile.pubxml.user
new file mode 100644
index 00000000..a8c8c11f
--- /dev/null
+++ b/MP.Stats/Properties/PublishProfiles/FolderProfile.pubxml.user
@@ -0,0 +1,10 @@
+
+
+
+
+ <_PublishTargetUrl>C:\Users\samuele\source\repos\MAPO-CORE\MP.Stats\bin\publish\net5.0\
+ True|2021-05-25T06:38:44.6280246Z;
+
+
\ No newline at end of file
diff --git a/MP.Stats/Properties/PublishProfiles/IIS01.pubxml.user b/MP.Stats/Properties/PublishProfiles/IIS01.pubxml.user
new file mode 100644
index 00000000..15ec3170
--- /dev/null
+++ b/MP.Stats/Properties/PublishProfiles/IIS01.pubxml.user
@@ -0,0 +1,12 @@
+
+
+
+
+
+ AQAAANCMnd8BFdERjHoAwE/Cl+sBAAAA+11nhJeDSkeTlSej+COD3AAAAAACAAAAAAADZgAAwAAAABAAAACFCXZ0UR7Czo59aaRCHU5QAAAAAASAAACgAAAAEAAAACYlKt9E6s77uEikpKwyhdQYAAAAUwae989LovFbsfjRp69HCVpyUQZbqLyYFAAAAMW8mLSAxWmKaOvB4nkDgUpS27/b
+ True|2021-05-26T17:49:30.0427896Z;False|2021-05-26T19:49:14.9065510+02:00;True|2021-05-25T17:48:33.3901785+02:00;True|2021-05-25T17:46:09.2063020+02:00;True|2021-05-25T17:42:47.8167539+02:00;True|2021-05-25T17:22:03.1877438+02:00;True|2021-05-25T17:21:05.1565775+02:00;True|2021-05-25T16:26:34.1426996+02:00;True|2021-05-25T16:14:28.2842402+02:00;True|2021-05-25T15:02:11.7131495+02:00;
+
+
\ No newline at end of file
diff --git a/MP.Stats/Properties/PublishProfiles/IIS02.pubxml.user b/MP.Stats/Properties/PublishProfiles/IIS02.pubxml.user
new file mode 100644
index 00000000..4572facb
--- /dev/null
+++ b/MP.Stats/Properties/PublishProfiles/IIS02.pubxml.user
@@ -0,0 +1,12 @@
+
+
+
+
+
+ AQAAANCMnd8BFdERjHoAwE/Cl+sBAAAA+11nhJeDSkeTlSej+COD3AAAAAACAAAAAAADZgAAwAAAABAAAAB3zVMW24A4himhWJ5CNqgeAAAAAASAAACgAAAAEAAAAA7IL1n8zHn2/ljDNL4/zlsYAAAAgAEg9RYKHV0xl3wnafZiN9Q954GOBAvdFAAAACSBJkwDndNTiIrUuk7zJls84fN1
+ True|2021-05-26T17:49:44.3836006Z;
+
+
\ No newline at end of file
diff --git a/MP.Stats/Properties/PublishProfiles/IISProfile.pubxml b/MP.Stats/Properties/PublishProfiles/IISProfile.pubxml
new file mode 100644
index 00000000..7159a5db
--- /dev/null
+++ b/MP.Stats/Properties/PublishProfiles/IISProfile.pubxml
@@ -0,0 +1,21 @@
+
+
+
+
+ Package
+ Release
+ Any CPU
+
+ True
+ False
+ d9901b50-e61c-400c-b62c-fa060cf72c29
+ bin\publish\MP.Stats.zip
+ true
+ Default Web Site/MP/STATS
+ net5.0
+ false
+
+
\ No newline at end of file
diff --git a/MP.Stats/Properties/PublishProfiles/IISProfile.pubxml.user b/MP.Stats/Properties/PublishProfiles/IISProfile.pubxml.user
new file mode 100644
index 00000000..2a7c708a
--- /dev/null
+++ b/MP.Stats/Properties/PublishProfiles/IISProfile.pubxml.user
@@ -0,0 +1,11 @@
+
+
+
+
+
+ True|2021-05-26T17:51:13.5051479Z;True|2021-05-26T19:51:04.9283608+02:00;True|2021-05-25T16:38:26.4142377+02:00;
+
+
\ No newline at end of file
diff --git a/MP.Stats/Properties/PublishProfiles/W2019-IIS-DEVProfile.pubxml.user b/MP.Stats/Properties/PublishProfiles/W2019-IIS-DEVProfile.pubxml.user
new file mode 100644
index 00000000..5d77153d
--- /dev/null
+++ b/MP.Stats/Properties/PublishProfiles/W2019-IIS-DEVProfile.pubxml.user
@@ -0,0 +1,12 @@
+
+
+
+
+
+ AQAAANCMnd8BFdERjHoAwE/Cl+sBAAAA+11nhJeDSkeTlSej+COD3AAAAAACAAAAAAADZgAAwAAAABAAAADHiGtCyOetOyeT2xaFL+NDAAAAAASAAACgAAAAEAAAAAuYw1PbVDVdZhloQ7eVuTsYAAAAfA8iFmY49U48HUeRwWwQNsvZg5FRMf9SFAAAACB+0njgnTZ+1teEqoJcNV16idHL
+ True|2021-05-26T17:49:56.4831784Z;True|2021-05-25T16:56:57.0194126+02:00;True|2021-05-24T18:44:45.5388713+02:00;True|2021-05-24T18:23:50.6056375+02:00;True|2021-05-24T18:01:51.1166144+02:00;True|2021-05-24T17:07:21.6348703+02:00;True|2021-05-24T17:07:10.8304877+02:00;True|2021-05-24T11:12:19.8440009+02:00;True|2021-05-24T11:12:08.1362921+02:00;True|2021-05-22T12:03:42.2864462+02:00;True|2021-05-21T19:54:05.6348108+02:00;False|2021-05-21T19:53:46.2134560+02:00;True|2021-05-21T08:11:55.5022811+02:00;True|2021-05-20T19:40:34.2462833+02:00;True|2021-05-20T19:40:10.3931366+02:00;True|2021-05-20T17:27:02.9543079+02:00;True|2021-05-20T16:59:12.4323448+02:00;True|2021-05-20T16:58:55.5021812+02:00;False|2021-05-20T16:58:03.5161910+02:00;True|2021-05-19T19:28:03.8104716+02:00;True|2021-05-18T19:48:52.9083044+02:00;True|2021-05-18T18:15:50.2374168+02:00;True|2021-05-18T18:06:20.0997789+02:00;True|2021-05-18T14:56:33.7479984+02:00;True|2021-05-17T17:03:39.9822588+02:00;True|2021-05-17T16:33:53.4419457+02:00;True|2021-05-17T16:33:10.5405414+02:00;False|2021-05-17T16:30:04.8648550+02:00;False|2021-05-17T16:29:49.5085445+02:00;
+
+
\ No newline at end of file
diff --git a/MP.Stats/Startup.cs b/MP.Stats/Startup.cs
index ce61a417..b835f23a 100644
--- a/MP.Stats/Startup.cs
+++ b/MP.Stats/Startup.cs
@@ -1,20 +1,15 @@
+using Blazorise;
+using Blazorise.Bootstrap;
+using Blazorise.Icons.FontAwesome;
+using ElmahCore.Mvc;
using Microsoft.AspNetCore.Builder;
-using Microsoft.AspNetCore.Components;
using Microsoft.AspNetCore.Hosting;
-using Microsoft.AspNetCore.HttpsPolicy;
+using Microsoft.AspNetCore.Localization;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
using MP.Stats.Data;
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Threading.Tasks;
-using Microsoft.AspNetCore.Localization;
using System.Globalization;
-using Blazorise;
-using Blazorise.Bootstrap;
-using Blazorise.Icons.FontAwesome;
namespace MP.Stats
{
@@ -62,6 +57,11 @@ namespace MP.Stats
FallBackToParentCultures = false
});
CultureInfo.DefaultThreadCurrentCulture = CultureInfo.CreateSpecificCulture("it-IT");
+
+ // Registrazione Elmah:
+ // https://github.com/ElmahCore/ElmahCore
+ app.UseElmah();
+
app.UseHttpsRedirection();
app.UseStaticFiles();
@@ -85,6 +85,14 @@ namespace MP.Stats
.AddBootstrapProviders()
.AddFontAwesomeIcons();
+ // Elmah
+ services.AddElmah();
+ //string elmaConn = "Data Source=SQL2016DEV;Initial Catalog=Elmah;User ID=sa;Password=keyhammer16;integrated security=False;MultipleActiveResultSets=True;App=SHERPA.BBM;";
+ //services.AddElmah(options =>
+ //{
+ // options.ConnectionString = elmaConn;
+ //});
+
services.AddStackExchangeRedisCache(options =>
{
options.Configuration = "localhost:6379";
diff --git a/MP.Stats/appsettings.Production.json b/MP.Stats/appsettings.Production.json
index 305d1b92..a3a64aa0 100644
--- a/MP.Stats/appsettings.Production.json
+++ b/MP.Stats/appsettings.Production.json
@@ -9,7 +9,7 @@
},
"AllowedHosts": "*",
"ConnectionStrings": {
- "DefaultConnection": "Server=SQL2016DEV;Database=MoonPro_STATS;Trusted_Connection=True;MultipleActiveResultSets=true",
- "Mp.Stats": "Server=SQL2016DEV;Database=MoonPro_STATS;User ID=sa;Password=keyhammer16;integrated security=False;MultipleActiveResultSets=True;App=MP.STATS;"
+ "DefaultConnection": "Server=localhost\\SQLEXPRESS;Database=MoonPro_STATS;Trusted_Connection=True;MultipleActiveResultSets=true",
+ "Mp.Stats": "Server=localhost\\SQLEXPRESS;Database=MoonPro_STATS;User ID=sa;Password=keyhammer16;integrated security=False;MultipleActiveResultSets=True;App=MP.STATS;"
}
}
\ No newline at end of file
diff --git a/MP.Stats/appsettings.json.bak b/MP.Stats/appsettings.json.bak
deleted file mode 100644
index d9d9a9bf..00000000
--- a/MP.Stats/appsettings.json.bak
+++ /dev/null
@@ -1,10 +0,0 @@
-{
- "Logging": {
- "LogLevel": {
- "Default": "Information",
- "Microsoft": "Warning",
- "Microsoft.Hosting.Lifetime": "Information"
- }
- },
- "AllowedHosts": "*"
-}
diff --git a/MP.Stats/post-build.ps1 b/MP.Stats/post-build.ps1
index 625f16ba..dc0fc8e1 100644
--- a/MP.Stats/post-build.ps1
+++ b/MP.Stats/post-build.ps1
@@ -2,7 +2,7 @@
$MajMin="1.0."
$currentDate = get-date -format yyMM;
-$currentTime = get-date -format HHmm;
+$currentTime = get-date -format ddHH;
$find = "(.|\n)*?";
$replace = "" + $MajMin + $currentDate +"." + $currentTime + "";
$csproj = Get-Content $ProjectPath
diff --git a/README.md b/README.md
index 3b441b0c..56279eb3 100644
--- a/README.md
+++ b/README.md
@@ -1,3 +1,9 @@
# MAPO-CORE
-MAPO dotNet Core Web Project, repository progetti next gen su Blazor & co
\ No newline at end of file
+MAPO dotNet Core Web Project, repository progetti next gen su Blazor & co
+
+Applicazione multipiattaforma (gira su win, mac, linux), tramite IIS o altro.
+
+## Installazione
+
+Vedere pagina wiki x blazor: https://wiki.steamware.net/doku.php?id=blazor
\ No newline at end of file