aggiunto logging x errori...

This commit is contained in:
Samuele E. Locatelli
2017-07-13 09:55:59 +02:00
parent 9df271910a
commit c4a1dbb4b7
3 changed files with 8 additions and 14 deletions
+3 -2
View File
@@ -12,8 +12,9 @@ namespace GMW
{
protected void Page_Load(object sender, EventArgs e)
{
memLayer.ML.setSessionVal("nextPage", user_std.pagCorrente);
Response.Redirect("./login.aspx");
logger.lg.scriviLog(string.Format("Errore rilevato: pagCorrente {0} | pagPrecedente {1}", user_std.pagCorrente, user_std.pagPrecedente), tipoLog.INFO);
memLayer.ML.setSessionVal("nextPage", user_std.pagPrecedente);
Response.Redirect("./login");
}
}
}
-11
View File
@@ -33,16 +33,5 @@
</connectionStrings>
<system.web>
<compilation xdt:Transform="RemoveAttributes(debug)" />
<!--
In the example below, the "Replace" transform will replace the entire
<customErrors> section of your web.config file.
Note that because there is only one customErrors section under the
<system.web> node, there is no need to use the "xdt:Locator" attribute.
-->
<customErrors defaultRedirect="ErrorPage" mode="RemoteOnly" xdt:Transform="Replace">
<!--<error statusCode="404" redirect="400.aspx"/>
<error statusCode="500" redirect="500.aspx"/>
<error statusCode="504" redirect="504.aspx"/>-->
</customErrors>
</system.web>
</configuration>
+5 -1
View File
@@ -34,12 +34,16 @@
<add name="ErrorMail" type="Elmah.ErrorMailModule, Elmah" />
<add name="ErrorFilter" type="Elmah.ErrorFilterModule, Elmah" />
</httpModules>
<customErrors mode="RemoteOnly" defaultRedirect="~/ErrorPage" />
<sessionState mode="Custom" customProvider="MySessionStateStore">
<providers>
<add name="MySessionStateStore" type="Microsoft.Web.Redis.RedisSessionStateProvider" host="localhost" accessKey="localhost" ssl="false" applicationName="GMW" />
</providers>
</sessionState>
<customErrors mode="RemoteOnly" defaultRedirect="~/ErrorPage">
<!--<error statusCode="404" redirect="ErrorPage"/>
<error statusCode="500" redirect="ErrorPage"/>
<error statusCode="504" redirect="ErrorPage"/>-->
</customErrors>
</system.web>
<appSettings>
<!--Impostazione gestione serializzazione variabili in sessione (es per Redis)-->