<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Lars Hildebrandt's Blog &#187; ASP.Net</title>
	<atom:link href="http://blog.larshildebrandt.de/category/programmieren/net/aspnet/feed" rel="self" type="application/rss+xml" />
	<link>http://blog.larshildebrandt.de</link>
	<description>übers Programmieren und mehr...</description>
	<lastBuildDate>Mon, 28 Nov 2011 21:11:36 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Elmah &#8211; Error Logging Modules and Handlers for ASP.NET</title>
		<link>http://blog.larshildebrandt.de/elmah-error-logging-modules-and-handlers-for-aspnet/131.html</link>
		<comments>http://blog.larshildebrandt.de/elmah-error-logging-modules-and-handlers-for-aspnet/131.html#comments</comments>
		<pubDate>Mon, 11 May 2009 21:23:22 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[.Net]]></category>
		<category><![CDATA[ASP.Net]]></category>
		<category><![CDATA[Programmieren]]></category>
		<category><![CDATA[Exception-Handling]]></category>
		<category><![CDATA[Framework]]></category>
		<category><![CDATA[Logging]]></category>

		<guid isPermaLink="false">http://blog.larshildebrandt.de/?p=131</guid>
		<description><![CDATA[Ich arbeite zur Zeit an einem kleinen ASP.net Projekt. Für das globale Exception-Logging bin ich dank meines Kollegen Tobi über Elmah gestolpert. Über Elmah besteht die Möglichkeit sämtliche unbehandelten Exceptions zu speichern. Unterstützt werden derzeit folgende Weg: - Microsoft SQL Server - Oracle - SQLite - Microsoft Access - VistaDB - XML-Dateien - im Speicher [...]]]></description>
			<content:encoded><![CDATA[<p>Ich arbeite zur Zeit an einem kleinen ASP.net Projekt. Für das globale Exception-Logging bin ich dank meines Kollegen Tobi über <a title="Elmah" href="http://code.google.com/p/elmah/" target="_blank">Elmah</a> gestolpert. Über Elmah besteht die Möglichkeit sämtliche unbehandelten Exceptions zu speichern. Unterstützt werden derzeit folgende Weg:</p>
<p>- Microsoft SQL Server<br />
- Oracle<br />
- SQLite<br />
- Microsoft Access<br />
- VistaDB<br />
- XML-Dateien<br />
- im Speicher</p>
<ul></ul>
<p>Weiterhin besteht die Möglichkeit sich Emails schicken zu lassen. Elmah bringt gleich eine webbasierte Übersicht mit, so dass man sich sehr einfach einen Überblick über aufgetretene Exceptions machen kann.</p>
<p>Um Elmah einem Projekt hinzuzufügen, muss kein Sourcecode neu kompliliert werden. Es müssen nur ein paar Anpassungen an der Webconfig vorgenommen werden.</p>
<p>Hier eine ganz einfach Webconfig ohne Mailversandt:</p>

<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;">&nbsp;
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;?xml</span> <span style="color: #000066;">version</span>=<span style="color: #ff0000;">&quot;1.0&quot;</span><span style="color: #000000; font-weight: bold;">?&gt;</span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;configuration<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;configSections<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;sectionGroup</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;elmah&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
      <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;section</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;security&quot;</span> <span style="color: #000066;">requirePermission</span>=<span style="color: #ff0000;">&quot;false&quot;</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;Elmah.SecuritySectionHandler, Elmah&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
      <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;section</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;errorLog&quot;</span> <span style="color: #000066;">requirePermission</span>=<span style="color: #ff0000;">&quot;false&quot;</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;Elmah.ErrorLogSectionHandler, Elmah&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/sectionGroup<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/configSections<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;elmah<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;errorLog</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;Elmah.SQLiteErrorLog, Elmah&quot;</span> <span style="color: #000066;">connectionStringName</span>=<span style="color: #ff0000;">&quot;ELMAH.SQLite&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/elmah<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;connectionStrings<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;add</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;ELMAH.SQLite&quot;</span> <span style="color: #000066;">connectionString</span>=<span style="color: #ff0000;">&quot;Data Source=|DataDirectory|errors.s3db&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/connectionStrings<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;system.web<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;compilation</span> <span style="color: #000066;">debug</span>=<span style="color: #ff0000;">&quot;true&quot;</span> <span style="color: #000066;">defaultLanguage</span>=<span style="color: #ff0000;">&quot;C#&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;httpModules<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
      <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;add</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;ErrorLog&quot;</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;Elmah.ErrorLogModule, Elmah&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
      <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;add</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;ErrorFilter&quot;</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;Elmah.ErrorFilterModule, Elmah&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/httpModules<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;httpHandlers<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
      <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;add</span> <span style="color: #000066;">verb</span>=<span style="color: #ff0000;">&quot;POST,GET,HEAD&quot;</span> <span style="color: #000066;">path</span>=<span style="color: #ff0000;">&quot;elmah.axd&quot;</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;Elmah.ErrorLogPageFactory, Elmah&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/httpHandlers<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;trace</span> <span style="color: #000066;">enabled</span>=<span style="color: #ff0000;">&quot;true&quot;</span> <span style="color: #000066;">requestLimit</span>=<span style="color: #ff0000;">&quot;10&quot;</span> <span style="color: #000066;">pageOutput</span>=<span style="color: #ff0000;">&quot;false&quot;</span> <span style="color: #000066;">traceMode</span>=<span style="color: #ff0000;">&quot;SortByTime&quot;</span> <span style="color: #000066;">localOnly</span>=<span style="color: #ff0000;">&quot;true&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;globalization</span> <span style="color: #000066;">requestEncoding</span>=<span style="color: #ff0000;">&quot;utf-8&quot;</span> <span style="color: #000066;">responseEncoding</span>=<span style="color: #ff0000;">&quot;utf-8&quot;</span> <span style="color: #000066;">culture</span>=<span style="color: #ff0000;">&quot;en-US&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;trust</span> <span style="color: #000066;">level</span>=<span style="color: #ff0000;">&quot;Full&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/system.web<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/configuration<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></div></div>

<p>Über den Aufruf von &#8220;elmah.axd&#8221; erhält man die Webseite mit allen gespeicherten Exceptions.</p>
<p>Wer also ein kleines, leichtes Framework fürs Exceptionhandling sucht, dem sei Elmah empfohlen.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.larshildebrandt.de/elmah-error-logging-modules-and-handlers-for-aspnet/131.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

