Compare commits

...

1 Commits

Author SHA1 Message Date
Samuele Locatelli a9529a8427 Fix gestione cookie expyre in frazioni di giorno 2021-09-10 15:04:39 +02:00
4 changed files with 30 additions and 26 deletions
+1 -1
View File
@@ -30,7 +30,7 @@
<add tagPrefix="ajaxToolkit" assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" /> <add tagPrefix="ajaxToolkit" assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" />
</controls> </controls>
</pages> </pages>
<sessionState mode="Custom" customProvider="MySessionStateStore"> <sessionState mode="Custom" customProvider="MySessionStateStore" timeout="1">
<providers> <providers>
<!-- For more details check https://github.com/Azure/aspnet-redis-providers/wiki --> <!-- For more details check https://github.com/Azure/aspnet-redis-providers/wiki -->
<add name="MySessionStateStore" type="Microsoft.Web.Redis.RedisSessionStateProvider" host="127.0.0.1" accessKey="" ssl="false" applicationName="MP_TAB" databaseId="1" /> <add name="MySessionStateStore" type="Microsoft.Web.Redis.RedisSessionStateProvider" host="127.0.0.1" accessKey="" ssl="false" applicationName="MP_TAB" databaseId="1" />
+1 -1
View File
@@ -75,7 +75,7 @@
</SelectParameters> </SelectParameters>
</asp:ObjectDataSource> </asp:ObjectDataSource>
</div> </div>
<!-- timer refresh dei blocchi in mappa stato: 2 sec, 2'000 ms --> <!-- timer refresh dei blocchi in mappa stato: 5 sec, 5'000 ms -->
<asp:Timer ID="Timer1" runat="server" Interval="5000" OnTick="Timer1_Tick"> <asp:Timer ID="Timer1" runat="server" Interval="5000" OnTick="Timer1_Tick">
</asp:Timer> </asp:Timer>
</ContentTemplate> </ContentTemplate>
+19 -18
View File
@@ -1,51 +1,52 @@
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
// <generato automaticamente> // <auto-generated>
// Codice generato da uno strumento. // This code was generated by a tool.
// //
// Le modifiche a questo file possono causare un comportamento non corretto e verranno perse se // Changes to this file may cause incorrect behavior and will be lost if
// il codice viene rigenerato. // the code is regenerated.
// </generato automaticamente> // </auto-generated>
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
namespace MoonProTablet.WebUserControls namespace MoonProTablet.WebUserControls
{ {
public partial class mod_mappaStato { public partial class mod_mappaStato
{
/// <summary> /// <summary>
/// Controllo UpdatePanel1. /// UpdatePanel1 control.
/// </summary> /// </summary>
/// <remarks> /// <remarks>
/// Campo generato automaticamente. /// Auto-generated field.
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. /// To modify move field declaration from designer file to code-behind file.
/// </remarks> /// </remarks>
protected global::System.Web.UI.UpdatePanel UpdatePanel1; protected global::System.Web.UI.UpdatePanel UpdatePanel1;
/// <summary> /// <summary>
/// Controllo repLI. /// repLI control.
/// </summary> /// </summary>
/// <remarks> /// <remarks>
/// Campo generato automaticamente. /// Auto-generated field.
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. /// To modify move field declaration from designer file to code-behind file.
/// </remarks> /// </remarks>
protected global::System.Web.UI.WebControls.Repeater repLI; protected global::System.Web.UI.WebControls.Repeater repLI;
/// <summary> /// <summary>
/// Controllo ods. /// ods control.
/// </summary> /// </summary>
/// <remarks> /// <remarks>
/// Campo generato automaticamente. /// Auto-generated field.
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. /// To modify move field declaration from designer file to code-behind file.
/// </remarks> /// </remarks>
protected global::System.Web.UI.WebControls.ObjectDataSource ods; protected global::System.Web.UI.WebControls.ObjectDataSource ods;
/// <summary> /// <summary>
/// Controllo Timer1. /// Timer1 control.
/// </summary> /// </summary>
/// <remarks> /// <remarks>
/// Campo generato automaticamente. /// Auto-generated field.
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. /// To modify move field declaration from designer file to code-behind file.
/// </remarks> /// </remarks>
protected global::System.Web.UI.Timer Timer1; protected global::System.Web.UI.Timer Timer1;
} }
+5 -2
View File
@@ -1672,9 +1672,12 @@ namespace MapoDb
} }
string cookieName = memLayer.ML.CRS("cookieName"); string cookieName = memLayer.ML.CRS("cookieName");
//DateTime expDate = DateTime.Now.AddDays(memLayer.ML.CRI("cookieDayExpire")); //DateTime expDate = DateTime.Now.AddDays(memLayer.ML.CRI("cookieDayExpire"));
string cookieDayExpire = memLayer.ML.CRS("cookieDayExpire");
string cookieDayExpire = memLayer.ML.CRS("cookieDayExpire").Replace(".", ",");
double dayExp = 1; double dayExp = 1;
double.TryParse(cookieDayExpire, out dayExp); NumberStyles style = NumberStyles.AllowDecimalPoint | NumberStyles.AllowThousands;
CultureInfo culture = CultureInfo.CreateSpecificCulture("it-IT");
double.TryParse(cookieDayExpire, style, culture, out dayExp);
DateTime expDate = DateTime.Now.AddDays(dayExp); DateTime expDate = DateTime.Now.AddDays(dayExp);
string Secret = authProxy.getSecret(Dominio, UsrName, matricola, DeviceName, adesso); string Secret = authProxy.getSecret(Dominio, UsrName, matricola, DeviceName, adesso);
string devSecret = SteamCrypto.EncryptString(Secret, cookieName); string devSecret = SteamCrypto.EncryptString(Secret, cookieName);