v1.2.11.2
This commit is contained in:
@@ -17,7 +17,16 @@ namespace Saxonite.Net.Core.Web.Online.App
|
||||
//-------------------------------------------------------------------
|
||||
public static void Main(string[] args)
|
||||
{
|
||||
CreateHostBuilder(args).Build().Run();
|
||||
try
|
||||
{
|
||||
CreateHostBuilder(args).Build().Run();
|
||||
}
|
||||
finally
|
||||
{
|
||||
// Cleanup - globals, async processes etc.
|
||||
if (SaxApplication_Online.AppInstance != null)
|
||||
SaxApplication_Online.AppInstance.Dispose();
|
||||
}
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
|
||||
@@ -44,29 +44,43 @@ namespace Saxonite.Net.Core.Web.Online.App
|
||||
try
|
||||
{
|
||||
AppInstance = this;
|
||||
SaxGlobals.App = this;
|
||||
SaxGlobals.System = (System_Web = new SaxSystem_Web());
|
||||
Configuration = configuration;
|
||||
ConsoleHelper_Web = new SaxConsoleHelper_WebOnline(this);
|
||||
ConsoleHelper_Online = new SaxConsoleHelper_Online(this);
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
SaLogger.Error(GetType().Name + ".CTR " + ExceptionUtil.GetErrorStateMessage(exc));
|
||||
throw exc;
|
||||
throw;
|
||||
}
|
||||
}
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing)
|
||||
{
|
||||
// Clear globals.
|
||||
AppInstance = null;
|
||||
// Console helper.
|
||||
if (ConsoleHelper_Online!= null)
|
||||
ConsoleHelper_Online.Dispose();
|
||||
ConsoleHelper_Online= null;
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// Properties.
|
||||
// Globals.
|
||||
public static SaxApplication_Online AppInstance { get; private set; }
|
||||
public override SaxConsoleHelper ConsoleHelper { get { return ConsoleHelper_Online; } }
|
||||
public SaxConsoleHelper_Online ConsoleHelper_Online { get; private set; }
|
||||
// Database.
|
||||
public override ISacsDatabase GetDatabase(SaxSessionContext sessionContext, Sax.Database databaseType)
|
||||
{
|
||||
return sessionContexts.GetValue(sessionContext.Index, null)?.Databases.GetValue(databaseType, null) ?? null;
|
||||
}
|
||||
public override String SessionCookieName { get { return Sax.Config.Online.Session.Cookie.Name; } }
|
||||
// Configuration.
|
||||
public override SaxAppConfig AppConfig { get { return appConfigs.Values.ToList().getConfigForApplication(); } }
|
||||
public override SaxEmailConfig EmailConfig { get { return emailConfigs.Values.ToList().getConfigForSession(AppConfig); } }
|
||||
public override String SessionCookieName { get { return Sax.Config.Online.Session.Cookie.Name; } }
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// Initialisation.
|
||||
|
||||
+17
-2
@@ -10,7 +10,7 @@ using System.Threading.Tasks;
|
||||
namespace Saxonite.Net.Core.Web.Online.Consoles
|
||||
{
|
||||
//=======================================================================
|
||||
public class SaxConsoleHelper_WebOnline : SaxConsoleHelper_Web
|
||||
public class SaxConsoleHelper_Online : SaxConsoleHelper_Web
|
||||
{
|
||||
//-------------------------------------------------------------------
|
||||
// Data members.
|
||||
@@ -18,10 +18,25 @@ namespace Saxonite.Net.Core.Web.Online.Consoles
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// construction.
|
||||
public SaxConsoleHelper_WebOnline(SaxApplication_Online app)
|
||||
public SaxConsoleHelper_Online(SaxApplication_Online app)
|
||||
{
|
||||
this.app = app;
|
||||
}
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing)
|
||||
{
|
||||
// Data cache consoles.
|
||||
foreach (SaxDataCacheConsole_Online dataCacheConsole in dataCacheConsoles.Values)
|
||||
dataCacheConsole.Dispose();
|
||||
dataCacheConsoles.Clear();
|
||||
// Session data consoles.
|
||||
foreach (SaxSessionDataConsole_Online sessionDataConsole in sessionDataConsoles.Values)
|
||||
sessionDataConsole.Dispose();
|
||||
sessionDataConsoles.Clear();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// Data cache console.
|
||||
@@ -1,4 +1,5 @@
|
||||
using Sarand.Net.Standard.Base.App;
|
||||
using Sacs.Web.Components;
|
||||
using Sarand.Net.Standard.Base.App;
|
||||
using Sarand.Net.Standard.Base.Bus;
|
||||
using Sarand.Net.Standard.Base.Helpers;
|
||||
using Sarand.Net.Standard.Base.Utils;
|
||||
@@ -172,7 +173,7 @@ namespace Saxonite.Net.Core.Web.Online.Models
|
||||
return new SysId();
|
||||
if (StringUtil.IsNumeric(encryptedId))
|
||||
return encryptedId.ToSysId();
|
||||
NameValueCollection idObfuscationParams = SaxController_Base.DecryptParameters(encryptedId, Base64IV_IdObfuscation, Base64Key_IdObfuscation);
|
||||
NameValueCollection idObfuscationParams = SaController.DecryptParameters(encryptedId, Base64IV_IdObfuscation, Base64Key_IdObfuscation);
|
||||
return idObfuscationParams.Get(ParamName_IdObfuscation_Id).ToSysId();
|
||||
}
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk.Web">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netcoreapp3.1</TargetFramework>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<CopyRefAssembliesToPublishDirectory>false</CopyRefAssembliesToPublishDirectory>
|
||||
<RootNamespace>Saxonite.Net.Core.Web</RootNamespace>
|
||||
<AssemblyName>Saxonite.Net.Core.Web</AssemblyName>
|
||||
@@ -9,7 +9,7 @@
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="jQuery.UI.Combined" Version="1.12.1" />
|
||||
<PackageReference Include="jQuery.UI.Combined" Version="1.13.2" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation" Version="3.1.16" />
|
||||
<PackageReference Include="System.Collections.Specialized" Version="4.3.0" />
|
||||
</ItemGroup>
|
||||
@@ -23,11 +23,6 @@
|
||||
<ProjectReference Include="..\SaxoniteStandardDbas\SaxoniteStandardDbas.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Folder Include="Online\Core\" />
|
||||
<Folder Include="Online\Data\" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Content Update="appsettings.Machine.Sarand602.json">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
|
||||
@@ -88,6 +88,7 @@
|
||||
sax.msg.mandatoryValue = '@Localiser.GetJavascriptText("msg.validation.mandatory.value")';
|
||||
sax.msg.invalidValue = '@Localiser.GetJavascriptText("msg.validation.invalid.value")';
|
||||
sax.maxProfileImageSize = 2 * 10 ** 6;
|
||||
sax.maxProfileDataFileSize = 2 * 10 ** 9;
|
||||
sax.session.cookieName = '@Model.SessionCookieName';
|
||||
sax.awaitingLogin = @awaitingLogin;
|
||||
sax.kli.active = @keepLoggedIn;
|
||||
|
||||
Reference in New Issue
Block a user