Vero fix errore redirect + thread abort
This commit is contained in:
@@ -1346,7 +1346,7 @@
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="logs\PlaceHolder.file">
|
||||
<Content Include="logs\.placeHolder.file">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</Content>
|
||||
</ItemGroup>
|
||||
|
||||
+49
-10
@@ -6,29 +6,68 @@
|
||||
throwExceptions="false"
|
||||
internalLogLevel="Off" internalLogFile="c:\temp\nlog-internal.log">
|
||||
|
||||
<!-- optional, add some variables
|
||||
<!-- optional, add some variables
|
||||
https://github.com/nlog/NLog/wiki/Configuration-file#variables
|
||||
-->
|
||||
<variable name="myvar" value="myvalue"/>
|
||||
<variable name="myvar" value="myvalue" />
|
||||
|
||||
<!--
|
||||
<!--
|
||||
See https://github.com/nlog/nlog/wiki/Configuration-file
|
||||
for information on customizing logging rules and outputs.
|
||||
-->
|
||||
<targets>
|
||||
<targets>
|
||||
|
||||
<!--
|
||||
<!--
|
||||
add your targets here
|
||||
See https://github.com/nlog/NLog/wiki/Targets for possible targets.
|
||||
See https://github.com/nlog/NLog/wiki/Layout-Renderers for the possible layout renderers.
|
||||
-->
|
||||
|
||||
<!-- Write events to a file with the date in the filename. -->
|
||||
<!--
|
||||
Write events to a file with the date in the filename.
|
||||
<target xsi:type="File" name="f" fileName="${basedir}/logs/${shortdate}.log"
|
||||
layout="${longdate} ${uppercase:${level}} ${message}" />
|
||||
</targets>
|
||||
-->
|
||||
<target xsi:type="File"
|
||||
name="fileTarget"
|
||||
fileName="${basedir}/logs/${shortdate}.log"
|
||||
layout="${longdate} | ${uppercase:${level}} | ${logger:shortName=false} | ${message}"
|
||||
archiveFileName="${basedir}/logs/${shortdate}.{###}.zip"
|
||||
archiveNumbering="Sequence"
|
||||
archiveAboveSize="1024000"
|
||||
maxArchiveFiles="90"
|
||||
enableArchiveFileCompression="true"
|
||||
keepFileOpen="false"
|
||||
/>
|
||||
<!--<target xsi:type="File"
|
||||
name="fileDebug"
|
||||
fileName="${basedir}/logs/${shortdate}_info.log"
|
||||
layout="${longdate} | ${uppercase:${level}} | ${logger:shortName=false} | ${message}"
|
||||
archiveFileName="${basedir}/logs/${shortdate}.{###}.zip"
|
||||
archiveNumbering="Sequence"
|
||||
archiveAboveSize="1024000"
|
||||
maxArchiveFiles="90"
|
||||
enableArchiveFileCompression="true"
|
||||
keepFileOpen="false"
|
||||
/>-->
|
||||
<target xsi:type="ColoredConsole"
|
||||
name="consoleTarget"
|
||||
layout="${longdate} | ${uppercase:${level}} | ${logger:shortName=true}| ${message}" />
|
||||
</targets>
|
||||
|
||||
<rules>
|
||||
<rules>
|
||||
<!-- add your logging rules here -->
|
||||
|
||||
<!--
|
||||
Write all events with minimal level of Debug (So Debug, Info, Warn, Error and Fatal, but not Trace) to "f"
|
||||
<logger name="*" minlevel="Debug" writeTo="f" />
|
||||
</rules>
|
||||
</nlog>
|
||||
-->
|
||||
<!--<logger name="Microsoft.*" maxlevel="Info" final="true" />-->
|
||||
<!--<logger name="*" minlevel="Trace" writeTo="consoleTarget" />-->
|
||||
<!--<logger name="*" minlevel="Info" writeTo="fileTarget" />
|
||||
|
||||
|
||||
<logger name="*" minlevel="Debug" maxlevel="Info" writeTo="fileDebug" />-->
|
||||
<logger name="*" minlevel="Debug" writeTo="fileTarget" />
|
||||
</rules>
|
||||
</nlog>
|
||||
@@ -1,5 +1,7 @@
|
||||
using SteamWare;
|
||||
using System;
|
||||
using System.Web;
|
||||
using System.Web.UI;
|
||||
|
||||
namespace MoonProTablet.WebUserControls
|
||||
{
|
||||
@@ -51,6 +53,7 @@ namespace MoonProTablet.WebUserControls
|
||||
/// <param name="e"></param>
|
||||
protected void btnConferma_Click(object sender, EventArgs e)
|
||||
{
|
||||
Page page = this.Page;
|
||||
bool fatto = false;
|
||||
// controllo se ho i dati...
|
||||
string plainUserAuthKey = txtUserAuthKey.Text.Trim();
|
||||
@@ -113,6 +116,8 @@ namespace MoonProTablet.WebUserControls
|
||||
catch
|
||||
{ }
|
||||
Response.Redirect(memLayer.ML.CRS("mainPage"), true);
|
||||
HttpContext.Current.ApplicationInstance.CompleteRequest();
|
||||
page.Visible = false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -103,6 +103,7 @@ namespace MoonProTablet.WebUserControls
|
||||
/// </summary>
|
||||
private void checkAuthCookieMoonProTablet()
|
||||
{
|
||||
Page page = this.Page;
|
||||
Uri MyUrl = Request.Url;
|
||||
string delimStr = "/";
|
||||
char[] delimiter = delimStr.ToCharArray();
|
||||
@@ -120,7 +121,9 @@ namespace MoonProTablet.WebUserControls
|
||||
// solo se NON sono alla pagina di registrazione o altre SAFE pages......
|
||||
if (memLayer.ML.CRS("safePages").ToLower().IndexOf(_paginaCorrente.ToLower()) < 0)
|
||||
{
|
||||
Response.Redirect("~/regNewDevice");
|
||||
Response.Redirect("~/regNewDevice", false);
|
||||
HttpContext.Current.ApplicationInstance.CompleteRequest();
|
||||
page.Visible = false;
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -164,7 +167,9 @@ namespace MoonProTablet.WebUserControls
|
||||
memLayer.ML.emptyCookieVal(memLayer.ML.CRS("cookieName"));
|
||||
// rimando pagina x registrazione devices
|
||||
logger.lg.scriviLog($"Dominio / UsrName non validi / non trovati:{Environment.NewLine}devSec:{devSecret}{Environment.NewLine}UsrName{UsrName}{Environment.NewLine}Dominio{Dominio}", tipoLog.STARTUP);
|
||||
Response.Redirect("~/regNewDevice.aspx");
|
||||
Response.Redirect("~/regNewDevice.aspx", false);
|
||||
HttpContext.Current.ApplicationInstance.CompleteRequest();
|
||||
page.Visible = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
|
||||
Reference in New Issue
Block a user