Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>Try this:</p> <pre><code>&lt;?xml version="1.0"?&gt; &lt;configuration&gt; &lt;configSections&gt; &lt;!--ELMAH--&gt; &lt;sectionGroup name="elmah"&gt; &lt;section name="security" requirePermission="false" type="Elmah.SecuritySectionHandler, Elmah"/&gt; &lt;section name="errorLog" requirePermission="false" type="Elmah.ErrorLogSectionHandler, Elmah"/&gt; &lt;section name="errorMail" requirePermission="false" type="Elmah.ErrorMailSectionHandler, Elmah"/&gt; &lt;section name="errorFilter" requirePermission="false" type="Elmah.ErrorFilterSectionHandler, Elmah"/&gt; &lt;/sectionGroup&gt; &lt;/configSections&gt; &lt;elmah&gt; &lt;security allowRemoteAccess="1"/&gt; &lt;!-- set the smtpPort attribute to "0". Doing so will cause ELMAH to use the port defined per the &lt;system.net&gt; settings --&gt; &lt;errorMail from="example1@gmail.com" to="example2@gmail.com" subject="ERROR(test):" async="false" smtpPort="0" useSsl="true" /&gt; &lt;/elmah&gt; &lt;!--System.net Mail setup--&gt; &lt;system.net&gt; &lt;mailSettings&gt; &lt;smtp deliveryMethod="network"&gt; &lt;network host="smtp.gmail.com" port="587" userName="example1@gmail.com" password="..." /&gt; &lt;/smtp&gt; &lt;/mailSettings&gt; &lt;/system.net&gt; &lt;appSettings&gt; ... &lt;/appSettings&gt; &lt;connectionStrings&gt; ... &lt;/connectionStrings&gt; &lt;system.web&gt; &lt;compilation debug="true"&gt; &lt;assemblies&gt; ... &lt;/compilation&gt; &lt;customErrors mode="Off"/&gt; ... &lt;httpHandlers&gt; ... &lt;!--ELMAH--&gt; &lt;add verb="POST,GET,HEAD" path="MyErrorPage/elmah.axd" type="Elmah.ErrorLogPageFactory, Elmah"/&gt; &lt;/httpHandlers&gt; &lt;httpModules&gt; ... &lt;!-- ELMAH: Logging module --&gt; &lt;add name="ErrorMail" type="Elmah.ErrorMailModule, Elmah"/&gt; &lt;!-- &lt;add name="ErrorLog" type="Elmah.ErrorLogModule, Elmah"/&gt; --&gt; &lt;!--&lt;add name="ErrorFilter" type="Elmah.ErrorFilterModule, Elmah"/&gt;--&gt; &lt;/httpModules&gt; &lt;httpRuntime maxRequestLength="458292"/&gt; &lt;authentication mode="Forms"&gt; ... &lt;/authentication&gt; ... &lt;/system.web&gt; &lt;location path="MyErrorPage.aspx"&gt; &lt;system.web&gt; &lt;authorization&gt; &lt;allow users="?"/&gt; &lt;/authorization&gt; &lt;/system.web&gt; &lt;/location&gt; &lt;!-- The system.webServer section is required for running ASP.NET AJAX under Internet Information Services 7.0. It is not necessary for previous version of IIS. --&gt; &lt;system.webServer&gt; &lt;validation validateIntegratedModeConfiguration="false"/&gt; &lt;modules runAllManagedModulesForAllRequests="true"&gt; ... &lt;!-- ELMAH--&gt; &lt;add name="ErrorLog" type="Elmah.ErrorLogModule, Elmah"/&gt; &lt;add name="ErrorMail" type="Elmah.ErrorMailModule, Elmah"/&gt; &lt;add name="ErrorFilter" type="Elmah.ErrorFilterModule, Elmah"/&gt; &lt;/modules&gt; &lt;handlers&gt; ... &lt;!--ELMAH--&gt; &lt;add name="Elmah" verb="POST,GET,HEAD" path="MyErrorPage/elmah.axd" type="Elmah.ErrorLogPageFactory, Elmah"/&gt; &lt;/handlers&gt; &lt;/system.webServer&gt; &lt;runtime&gt; &lt;assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"&gt; ... &lt;/assemblyBinding&gt; &lt;/runtime&gt; &lt;location path="MyErrorPage/elmah.axd"&gt; &lt;system.web&gt; &lt;authorization&gt; &lt;deny users="?"/&gt; &lt;allow users="?"/&gt; &lt;/authorization&gt; &lt;/system.web&gt; &lt;/location&gt; &lt;/configuration&gt; </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload