integrato elmah x beccare eventuali errori non gestiti...

This commit is contained in:
Samuele Locatelli
2014-01-17 16:35:27 +01:00
parent 66814fc321
commit 6da9a0ce1e
16 changed files with 187 additions and 7 deletions
+15
View File
@@ -0,0 +1,15 @@
A new HTTP handler has been configured in your application for consulting the
error log and its feeds. It is reachable at elmah.axd under your application
root. If, for example, your application is deployed at http://www.example.com,
the URL for ELMAH would be http://www.example.com/elmah.axd. You can, of
course, change this path in your application's configuration file.
ELMAH is also set up to be secure such that it can only be accessed locally.
You can enable remote access but then it is paramount that you secure access
to authorized users or/and roles only. This can be done using standard
authorization rules and configuration already built into ASP.NET. For more
information, see http://code.google.com/p/elmah/wiki/SecuringErrorLogPages on
the project site.
Please review the commented out authorization section under
<location path="elmah.axd"> and make the appropriate changes.
+4
View File
@@ -132,6 +132,9 @@
<SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\AjaxControlToolkit.4.1.60623\lib\35\AjaxControlToolkit.dll</HintPath>
</Reference>
<Reference Include="Elmah">
<HintPath>..\packages\elmah.corelibrary.1.2.2\lib\Elmah.dll</HintPath>
</Reference>
<Reference Include="Microsoft.ReportViewer.WinForms, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\..\..\..\..\Windows\assembly\GAC_MSIL\Microsoft.ReportViewer.WinForms\9.0.0.0__b03f5f7f11d50a3a\Microsoft.ReportViewer.WinForms.dll</HintPath>
@@ -168,6 +171,7 @@
</Reference>
</ItemGroup>
<ItemGroup>
<Content Include="App_Readme\Elmah.txt" />
<Content Include="consumoAnime.aspx" />
<Content Include="consumoFusi.aspx" />
<Content Include="ExportExcel_SAO.aspx" />
+38 -7
View File
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<configSections>
<sectionGroup name="system.web.extensions" type="System.Web.Configuration.SystemWebExtensionsSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
@@ -12,7 +12,12 @@
</sectionGroup>
</sectionGroup>
</sectionGroup>
</configSections>
<sectionGroup name="elmah">
<section name="security" requirePermission="false" type="Elmah.SecuritySectionHandler, Elmah" />
<section name="errorLog" requirePermission="false" type="Elmah.ErrorLogSectionHandler, Elmah" />
<section name="errorMail" requirePermission="false" type="Elmah.ErrorMailSectionHandler, Elmah" />
<section name="errorFilter" requirePermission="false" type="Elmah.ErrorFilterSectionHandler, Elmah" />
</sectionGroup></configSections>
<system.web>
<identity />
<authentication mode="Windows" />
@@ -50,7 +55,7 @@
</httpHandlers>
<httpModules>
<add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
</httpModules>
<add name="ErrorLog" type="Elmah.ErrorLogModule, Elmah" /><add name="ErrorMail" type="Elmah.ErrorMailModule, Elmah" /><add name="ErrorFilter" type="Elmah.ErrorFilterModule, Elmah" /></httpModules>
</system.web>
<appSettings>
<!--Setup applicazione-->
@@ -80,7 +85,7 @@
<add key="urlWebServer" value="http://SRV-PRODTK01/GMW/" />
<add key="echoLemmi" value="false" />
<!--area temp-->
<add key="maxAgeTempAreaHours" value="24"/>
<add key="maxAgeTempAreaHours" value="24" />
<!--area logger-->
<add key="_logDir" value="~/logs/" />
<add key="doShrinkFolder" value="true" />
@@ -229,7 +234,7 @@
<add key="cmdFast" value="CMDFAST" />
<add key="cmdSelLine" value="CMDSL" />
<!-- setup odette -->
<add key="raggMagOdette" value="TK"/>
<add key="raggMagOdette" value="TK" />
<add key="qtaOdette" value="18" />
<add key="indStabFrom" value="Via Po,55 I-66020 San Giovanni Teatino CH" />
<!--setup gestione stampa postazione cartellini-->
@@ -258,7 +263,7 @@
<modules>
<remove name="ScriptModule" />
<add name="ScriptModule" preCondition="managedHandler" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
</modules>
<add name="ErrorLog" type="Elmah.ErrorLogModule, Elmah" preCondition="managedHandler" /><add name="ErrorMail" type="Elmah.ErrorMailModule, Elmah" preCondition="managedHandler" /><add name="ErrorFilter" type="Elmah.ErrorFilterModule, Elmah" preCondition="managedHandler" /></modules>
<handlers>
<remove name="ScriptHandlerFactory" />
<remove name="ScriptHandlerFactoryAppServices" />
@@ -314,4 +319,30 @@
</service>
</services>
</system.serviceModel>
</configuration>
<elmah>
<!--
See http://code.google.com/p/elmah/wiki/SecuringErrorLogPages for
more information on remote access and securing ELMAH.
-->
<security allowRemoteAccess="false" />
</elmah><location path="elmah.axd" inheritInChildApplications="false">
<system.web>
<httpHandlers>
<add verb="POST,GET,HEAD" path="elmah.axd" type="Elmah.ErrorLogPageFactory, Elmah" />
</httpHandlers>
<!--
See http://code.google.com/p/elmah/wiki/SecuringErrorLogPages for
more information on using ASP.NET authorization securing ELMAH.
<authorization>
<allow roles="admin" />
<deny users="*" />
</authorization>
-->
</system.web>
<system.webServer>
<handlers>
<add name="ELMAH" verb="POST,GET,HEAD" path="elmah.axd" type="Elmah.ErrorLogPageFactory, Elmah" preCondition="integratedMode" />
</handlers>
</system.webServer>
</location></configuration>
BIN
View File
Binary file not shown.
BIN
View File
Binary file not shown.
Binary file not shown.
Binary file not shown.
+2
View File
@@ -1,4 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="AjaxControlToolkit" version="4.1.60623" targetFramework="net35" />
<package id="elmah" version="1.2.2" targetFramework="net35" />
<package id="elmah.corelibrary" version="1.2.2" targetFramework="net35" />
</packages>
+15
View File
@@ -0,0 +1,15 @@
A new HTTP handler has been configured in your application for consulting the
error log and its feeds. It is reachable at elmah.axd under your application
root. If, for example, your application is deployed at http://www.example.com,
the URL for ELMAH would be http://www.example.com/elmah.axd. You can, of
course, change this path in your application's configuration file.
ELMAH is also set up to be secure such that it can only be accessed locally.
You can enable remote access but then it is paramount that you secure access
to authorized users or/and roles only. This can be done using standard
authorization rules and configuration already built into ASP.NET. For more
information, see http://code.google.com/p/elmah/wiki/SecuringErrorLogPages on
the project site.
Please review the commented out authorization section under
<location path="elmah.axd"> and make the appropriate changes.
+15
View File
@@ -0,0 +1,15 @@
A new HTTP handler has been configured in your application for consulting the
error log and its feeds. It is reachable at elmah.axd under your application
root. If, for example, your application is deployed at http://www.example.com,
the URL for ELMAH would be http://www.example.com/elmah.axd. You can, of
course, change this path in your application's configuration file.
ELMAH is also set up to be secure such that it can only be accessed locally.
You can enable remote access but then it is paramount that you secure access
to authorized users or/and roles only. This can be done using standard
authorization rules and configuration already built into ASP.NET. For more
information, see http://code.google.com/p/elmah/wiki/SecuringErrorLogPages on
the project site.
Please review the commented out authorization section under
<location path="elmah.axd"> and make the appropriate changes.
+59
View File
@@ -0,0 +1,59 @@
<configuration>
<configSections>
<sectionGroup name="elmah">
<section name="security" requirePermission="false" type="Elmah.SecuritySectionHandler, Elmah" />
<section name="errorLog" requirePermission="false" type="Elmah.ErrorLogSectionHandler, Elmah" />
<section name="errorMail" requirePermission="false" type="Elmah.ErrorMailSectionHandler, Elmah" />
<section name="errorFilter" requirePermission="false" type="Elmah.ErrorFilterSectionHandler, Elmah" />
</sectionGroup>
</configSections>
<system.web>
<httpModules>
<add name="ErrorLog" type="Elmah.ErrorLogModule, Elmah" />
<add name="ErrorMail" type="Elmah.ErrorMailModule, Elmah" />
<add name="ErrorFilter" type="Elmah.ErrorFilterModule, Elmah"/>
</httpModules>
</system.web>
<system.webServer>
<validation validateIntegratedModeConfiguration="false" />
<modules>
<add name="ErrorLog" type="Elmah.ErrorLogModule, Elmah" preCondition="managedHandler" />
<add name="ErrorMail" type="Elmah.ErrorMailModule, Elmah" preCondition="managedHandler" />
<add name="ErrorFilter" type="Elmah.ErrorFilterModule, Elmah" preCondition="managedHandler" />
</modules>
</system.webServer>
<elmah>
<!--
See http://code.google.com/p/elmah/wiki/SecuringErrorLogPages for
more information on remote access and securing ELMAH.
-->
<security allowRemoteAccess="false" />
</elmah>
<location path="elmah.axd" inheritInChildApplications="false">
<system.web>
<httpHandlers>
<add verb="POST,GET,HEAD"
path="elmah.axd"
type="Elmah.ErrorLogPageFactory, Elmah" />
</httpHandlers>
<!--
See http://code.google.com/p/elmah/wiki/SecuringErrorLogPages for
more information on using ASP.NET authorization securing ELMAH.
<authorization>
<allow roles="admin" />
<deny users="*" />
</authorization>
-->
</system.web>
<system.webServer>
<handlers>
<add name="ELMAH"
verb="POST,GET,HEAD"
path="elmah.axd"
type="Elmah.ErrorLogPageFactory, Elmah"
preCondition="integratedMode" />
</handlers>
</system.webServer>
</location>
</configuration>
Binary file not shown.
+22
View File
@@ -0,0 +1,22 @@
<?xml version="1.0"?>
<package xmlns="http://schemas.microsoft.com/packaging/2011/08/nuspec.xsd">
<metadata>
<id>elmah</id>
<version>1.2.2</version>
<title>ELMAH</title>
<authors>Atif Aziz</authors>
<owners>Atif Aziz</owners>
<licenseUrl>http://www.apache.org/licenses/LICENSE-2.0</licenseUrl>
<projectUrl>http://elmah.googlecode.com/</projectUrl>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<description>ELMAH with initial configuration for getting started quickly. ELMAH (Error Logging Modules and Handlers) is an application-wide error logging facility that is completely pluggable. It can be dynamically added to a running ASP.NET web application, or even all ASP.NET web applications on a machine, without any need for re-compilation or re-deployment.</description>
<summary>ELMAH with initial configuration for getting started quickly. ELMAH (Error Logging Modules and Handlers) is an application-wide error logging facility that is completely pluggable. It can be dynamically added to a running ASP.NET web application, or even all ASP.NET web applications on a machine, without any need for re-compilation or re-deployment.</summary>
<releaseNotes>This release updates the way the HTTP handler is registered in the web.config and is designed to work more strictly and securely when enabling remote access for authorized users. See http://code.google.com/p/elmah/wiki/SecuringErrorLogPages on the project site for more information.</releaseNotes>
<copyright />
<language />
<tags>elmah error logging unhandled exception</tags>
<dependencies>
<dependency id="elmah.corelibrary" version="1.2.2" />
</dependencies>
</metadata>
</package>
Binary file not shown.
@@ -0,0 +1,17 @@
<?xml version="1.0"?>
<package xmlns="http://schemas.microsoft.com/packaging/2011/08/nuspec.xsd">
<metadata>
<id>elmah.corelibrary</id>
<version>1.2.2</version>
<title>ELMAH Core Library (no config)</title>
<authors>Atif Aziz</authors>
<owners>Atif Aziz</owners>
<licenseUrl>http://www.apache.org/licenses/LICENSE-2.0</licenseUrl>
<projectUrl>http://elmah.googlecode.com/</projectUrl>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<description>Core library for ELMAH (Error Logging Modules and Handlers) without any configuration.</description>
<summary>Core library for ELMAH (Error Logging Modules and Handlers) without any configuration.</summary>
<releaseNotes>This release fixes the issues listed here: http://code.google.com/p/elmah/issues/list?q=label%3AMilestone-Release1.2SP2&amp;can=1</releaseNotes>
<tags>elmah error logging unhandled exception</tags>
</metadata>
</package>
Binary file not shown.