Note that there are some explanatory texts on larger screens.

plurals
  1. POEnterprise Library Logging not logging to Event Log from ASP.NET
    text
    copied!<p>I spent a day trying to make Ent Lib Logging work and log anything into database or event log. I have a web application and console application with the same Ent Lib config but only the console application is capable to log into the Event Log. I tried everything with permissions but I don't know what exactly I am doing &mdash; which services should have what. It does not work!</p> <p>I read articles like this <a href="http://imar.spaanjaars.com/275/logging-errors-to-the-event-log-in-aspnet-applications" rel="noreferrer">http://imar.spaanjaars.com/275/logging-errors-to-the-event-log-in-aspnet-applications</a> and I want to try to give the ASPNET account those permissions. I am using Windows 7 and I cannot find ASPNET user account. So where is it?</p> <p>This is the config file which is automatically generated from Ent Lib utility and it works only on App.config, not on web.config</p> <pre><code>&lt;loggingConfiguration name="Logging Application Block" tracingEnabled="true" defaultCategory="General" logWarningsWhenNoCategoriesMatch="true" revertImpersonation="false"&gt; &lt;listeners&gt; &lt;add source="Logger" formatter="Text Formatter" log="Application" machineName="" listenerDataType="Microsoft.Practices.EnterpriseLibrary.Logging.Configuration.FormattedEventLogTraceListenerData, Microsoft.Practices.EnterpriseLibrary.Logging, Version=4.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" traceOutputOptions="None" filter="All" type="Microsoft.Practices.EnterpriseLibrary.Logging.TraceListeners.FormattedEventLogTraceListener, Microsoft.Practices.EnterpriseLibrary.Logging, Version=4.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" name="Formatted EventLog TraceListener" /&gt; &lt;/listeners&gt; &lt;formatters&gt; &lt;add template="Timestamp: {timestamp}&amp;#xD;&amp;#xA;Message: {message}&amp;#xD;&amp;#xA;Category: {category}&amp;#xD;&amp;#xA;Priority: {priority}&amp;#xD;&amp;#xA;EventId: {eventid}&amp;#xD;&amp;#xA;Severity: {severity}&amp;#xD;&amp;#xA;Title:{title}&amp;#xD;&amp;#xA;Machine: {machine}&amp;#xD;&amp;#xA;Application Domain: {appDomain}&amp;#xD;&amp;#xA;Process Id: {processId}&amp;#xD;&amp;#xA;Process Name: {processName}&amp;#xD;&amp;#xA;Win32 Thread Id: {win32ThreadId}&amp;#xD;&amp;#xA;Thread Name: {threadName}&amp;#xD;&amp;#xA;Extended Properties: {dictionary({key} - {value}&amp;#xD;&amp;#xA;)}" type="Microsoft.Practices.EnterpriseLibrary.Logging.Formatters.TextFormatter, Microsoft.Practices.EnterpriseLibrary.Logging, Version=4.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" name="Text Formatter" /&gt; &lt;/formatters&gt; &lt;categorySources&gt; &lt;add switchValue="All" name="General"&gt; &lt;listeners&gt; &lt;add name="Formatted EventLog TraceListener" /&gt; &lt;/listeners&gt; &lt;/add&gt; &lt;/categorySources&gt; &lt;specialSources&gt; &lt;allEvents switchValue="All" name="All Events" /&gt; &lt;notProcessed switchValue="All" name="Unprocessed Category" /&gt; &lt;errors switchValue="All" name="Logging Errors &amp;amp; Warnings"&gt; &lt;listeners&gt; &lt;add name="Formatted EventLog TraceListener" /&gt; &lt;/listeners&gt; &lt;/errors&gt; &lt;/specialSources&gt; &lt;/loggingConfiguration&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