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" />
</controls>
</pages>
<sessionState mode="Custom" customProvider="MySessionStateStore">
<sessionState mode="Custom" customProvider="MySessionStateStore" timeout="1">
<providers>
<!-- 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" />
+1 -1
View File
@@ -75,7 +75,7 @@
</SelectParameters>
</asp:ObjectDataSource>
</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>
</ContentTemplate>
+23 -22
View File
@@ -1,51 +1,52 @@
//------------------------------------------------------------------------------
// <generato automaticamente>
// Codice generato da uno strumento.
// <auto-generated>
// This code was generated by a tool.
//
// Le modifiche a questo file possono causare un comportamento non corretto e verranno perse se
// il codice viene rigenerato.
// </generato automaticamente>
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace MoonProTablet.WebUserControls
{
public partial class mod_mappaStato {
public partial class mod_mappaStato
{
/// <summary>
/// Controllo UpdatePanel1.
/// UpdatePanel1 control.
/// </summary>
/// <remarks>
/// Campo generato automaticamente.
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.UpdatePanel UpdatePanel1;
/// <summary>
/// Controllo repLI.
/// repLI control.
/// </summary>
/// <remarks>
/// Campo generato automaticamente.
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Repeater repLI;
/// <summary>
/// Controllo ods.
/// ods control.
/// </summary>
/// <remarks>
/// Campo generato automaticamente.
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.ObjectDataSource ods;
/// <summary>
/// Controllo Timer1.
/// Timer1 control.
/// </summary>
/// <remarks>
/// Campo generato automaticamente.
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.Timer Timer1;
}
+5 -2
View File
@@ -1672,9 +1672,12 @@ namespace MapoDb
}
string cookieName = memLayer.ML.CRS("cookieName");
//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.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);
string Secret = authProxy.getSecret(Dominio, UsrName, matricola, DeviceName, adesso);
string devSecret = SteamCrypto.EncryptString(Secret, cookieName);