<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:copyright="http://blogs.law.harvard.edu/tech/rss" xmlns:image="http://purl.org/rss/1.0/modules/image/">
    <channel>
        <title>Enterprise Library</title>
        <link>http://geekswithblogs.net/akraus1/category/3991.aspx</link>
        <description>Enterprise Library</description>
        <language>en-US</language>
        <copyright>Alois Kraus</copyright>
        <managingEditor>akraus1@gmx.de</managingEditor>
        <generator>Subtext Version 0.0.0.0</generator>
        <item>
            <title>Enterprise Library News</title>
            <link>http://geekswithblogs.net/akraus1/archive/2006/07/03/83982.aspx</link>
            <description>&lt;!--StartFragment --&gt;&amp;nbsp;The world is turning and evolution of software is going on and on. It is time for another Enterprise Library Update. In the last few weeks an enormous amount of code has been produced by the&lt;A href="http://msdn.microsoft.com/practices/"&gt; Patterns &amp;amp; Practices Team&lt;/A&gt;. In case you did not download the Microsoft Enterprise Library for .NET 2.0 you should have a look into if you develop with ASP.NET serious web apps or &lt;BR&gt;Enterprise Grade applications&amp;nbsp;. &lt;BR&gt;Here are the most important links regarding the deliverables of the Patterns and Practices Team of Microsoft:&lt;BR&gt;&lt;BR&gt;
&lt;UL&gt;
&lt;LI&gt;Enterprise Library for .NET 2.0 &lt;A href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnpag2/html/entlib.asp"&gt;Download&lt;/A&gt; and &lt;A href="http://www.gotdotnet.com/codegallery/customization/uploadedhtmlpage.aspx?FileID=f744c82e-1c16-4ca3-9e70-bbedfecb4d36&amp;amp;id=295a464a-6072-4e25-94e2-91be63527327&amp;amp;flg=1"&gt;Patches (passport logon needed)&lt;/A&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;A href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnpag2/html/scsflp.asp"&gt;Smart Client Software Factory&lt;/A&gt; which uses&amp;nbsp;Entlib, CAB GAT and GAX (&lt;A href="http://www.microsoft.com/downloads/details.aspx?FamilyId=2B6A10F9-8410-4F13-AD53-05A202FBDB63&amp;amp;displaylang=en"&gt;Download&lt;/A&gt;).&lt;/LI&gt;
&lt;LI&gt;Visual Studio Extensions to insert code templates via GAT (Guidance Automation Toolkit) and GAX (&lt;A href="http://msdn.microsoft.com/vstudio/teamsystem/workshop/gat/"&gt;Download&lt;/A&gt;)&lt;/LI&gt;
&lt;LI&gt;In case you have &lt;A href="http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=502698&amp;amp;SiteID=1"&gt;uninstall&lt;/A&gt; problems with the GAT/GAX you should consider downloading the MSI Installer Cleanup Utility (&lt;A href="http://support.microsoft.com/default.aspx?scid=kb;en-us;290301"&gt;Download&lt;/A&gt;)&lt;/LI&gt;&lt;/UL&gt;The stuff contained in these packages is a fine piece of well tested application blocks that represent the best industry practices for building Enterprise Grade applications with .NET 2.0. &lt;BR&gt;Up to date information can be found at Tom Hollanders &lt;A href="http://blogs.msdn.com/tomholl/"&gt;blog&lt;/A&gt; who will be glad (tell him that ;-)) to answer your questions. The most interesting posts are&lt;BR&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;A href="http://blogs.msdn.com/tomholl/archive/2006/06/30/652955.aspx"&gt;Patch&lt;/A&gt; for Enterprise Library to work under partial trust (e.g. ASP.NET web apps will profit from this one).&lt;/LI&gt;
&lt;LI&gt;&lt;A href="http://blogs.msdn.com/tomholl/archive/2006/06/26/648014.aspx"&gt;July Community Drop of Web Service Software Factory&lt;/A&gt; where he does explain what this is all about.&lt;/LI&gt;
&lt;LI&gt;&lt;A href="http://blogs.msdn.com/tomholl/archive/2006/06/24/645882.aspx"&gt;What are GAT and GAX anyway?&lt;/A&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;A href="http://blogs.msdn.com/tomholl/archive/2006/06/21/641840.aspx"&gt;Enterprise Library for .NET Framework 3.0 - what would you like to see?&lt;/A&gt;&lt;/LI&gt;&lt;/UL&gt;Especially the last post of Tom has received a huge number of comments what we (the users of Entlib) would like to see in a future released targeting the .NET Framework 3.0. If you have ideas how you could improve the Enterprise Library or what additional application blocks you would like to see drop him a note. If you have problems installing GAT or GAX you should stop by at the &lt;A href="http://forums.microsoft.com/msdn/showforum.aspx?forumid=78&amp;amp;siteid=1"&gt;Visual Studio Automation Toolkit&lt;/A&gt; forum to get help. My personal install experience with GAT/GAX was &lt;A href="http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=525052&amp;amp;SiteID=1"&gt;not pleasant&lt;/A&gt; at my home PC so far. I hope that I can get around this error without reinstalling VS 2005.&lt;BR&gt;&lt;BR&gt;If you are a practicioning software architect you should definetely check out these new tools in your arsenal to create robust and extensible applications. The learning curve is high but we live in a complex world where many requirements want to be fullfilled. Java Script, AJAX and a SQL database is not the answer (at least in general) to all &lt;A href="http://blogs.msdn.com/dphill/archive/2006/04/10/572579.aspx"&gt;needs&lt;/A&gt; of Enterprise Grade software. &lt;p&gt;&lt;a href="http://www.pheedo.com/click.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=83982"&gt;&lt;img src="http://www.pheedo.com/img.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=83982" border="0"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;iframe src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;PageID=31016&amp;amp;SiteID=1" width=1 height=1 Marginwidth=0 Marginheight=0 Hspace=0 Vspace=0 Frameborder=0 Scrolling=No&gt;
&lt;script language='javascript1.1' src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Browser=NETSCAPE4&amp;amp;NoCache=True&amp;PageID=31016&amp;amp;SiteID=1"&gt;&lt;/script&gt;
&lt;noscript&gt;&lt;a href="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Click&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" target="_blank"&gt;
&lt;img src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" width="1" height="1" border="0"  alt=""&gt;&lt;/a&gt;
&lt;/noscript&gt;
&lt;/iframe&gt;
&lt;img src="http://geekswithblogs.net/akraus1/aggbug/83982.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Alois Kraus</dc:creator>
            <guid>http://geekswithblogs.net/akraus1/archive/2006/07/03/83982.aspx</guid>
            <pubDate>Tue, 04 Jul 2006 09:35:00 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/akraus1/comments/83982.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/akraus1/archive/2006/07/03/83982.aspx#feedback</comments>
            <slash:comments>7</slash:comments>
            <wfw:commentRss>http://geekswithblogs.net/akraus1/comments/commentRss/83982.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/akraus1/services/trackbacks/83982.aspx</trackback:ping>
        </item>
        <item>
            <title>Enterprise Library Hands On Labs available</title>
            <link>http://geekswithblogs.net/akraus1/archive/2006/05/07/77509.aspx</link>
            <description>&lt;!--StartFragment --&gt;If you are not sure if the Enterprise Library for .NET 2.0 is the right thing for your application you should check out the new &lt;A href="http://www.microsoft.com/downloads/details.aspx?FamilyId=C8CA14D0-05EA-4A44-AE78-F5E4DF6208AF&amp;amp;displaylang=en"&gt;Hands on Labs.&lt;/A&gt; All six Application Blocks (Caching, Security, Cryptography, Data Access, Logging and Exceptions Handling) are shown in action with a detailed step for step introduction to get started with each of them. Another source of&amp;nbsp; information mainly configuration of the Enterprise Library can be found in the articles of my blog. &lt;p&gt;&lt;a href="http://www.pheedo.com/click.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=77509"&gt;&lt;img src="http://www.pheedo.com/img.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=77509" border="0"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;iframe src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;PageID=31016&amp;amp;SiteID=1" width=1 height=1 Marginwidth=0 Marginheight=0 Hspace=0 Vspace=0 Frameborder=0 Scrolling=No&gt;
&lt;script language='javascript1.1' src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Browser=NETSCAPE4&amp;amp;NoCache=True&amp;PageID=31016&amp;amp;SiteID=1"&gt;&lt;/script&gt;
&lt;noscript&gt;&lt;a href="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Click&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" target="_blank"&gt;
&lt;img src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" width="1" height="1" border="0"  alt=""&gt;&lt;/a&gt;
&lt;/noscript&gt;
&lt;/iframe&gt;
&lt;img src="http://geekswithblogs.net/akraus1/aggbug/77509.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Alois Kraus</dc:creator>
            <guid>http://geekswithblogs.net/akraus1/archive/2006/05/07/77509.aspx</guid>
            <pubDate>Mon, 08 May 2006 08:38:00 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/akraus1/comments/77509.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/akraus1/archive/2006/05/07/77509.aspx#feedback</comments>
            <slash:comments>1</slash:comments>
            <wfw:commentRss>http://geekswithblogs.net/akraus1/comments/commentRss/77509.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/akraus1/services/trackbacks/77509.aspx</trackback:ping>
        </item>
        <item>
            <title>Store your App.Config inside SQL Server</title>
            <link>http://geekswithblogs.net/akraus1/archive/2006/04/17/75393.aspx</link>
            <description>&lt;!--StartFragment --&gt;&amp;nbsp;I did submit&amp;nbsp;some time ago a little&amp;nbsp;fix for the Enterprise Library &lt;A href="http://www.gotdotnet.com/Community/UserSamples/Details.aspx?SampleGuid=054E5E59-9D4E-4C83-AB5E-3B6AD9A6F4B6"&gt;SqlConfigurationSource&lt;/A&gt; &amp;nbsp;but I did not yet have time to blog about it. Better late than never I want to shed some light (again) on configuration. To get your application settings from your local disk you can use the .NET &lt;A href="http://msdn2.microsoft.com/en-US/library/system.configuration.configurationmanager%28VS.80%29.aspx"&gt;ConfigurationManager&lt;/A&gt; class or the (Entlib) FileConfigurationSource to fetch the settings from another file than your App.Config file.&amp;nbsp;&lt;BR&gt;The Enterprise Library &lt;SPAN style="FONT-STYLE: italic"&gt;SqlConfigurationManager&lt;/SPAN&gt; is the counterpart to the .NET &lt;SPAN style="FONT-STYLE: italic"&gt;ConfigurationManager&lt;/SPAN&gt; class and can be&amp;nbsp;directly used from any application that cares about central configuration. To use it you&amp;nbsp;need a running&amp;nbsp;SQL Server 2005 (Express) server and a database which contains some stored procedures which are responsible for reading and writing ConfigurationSections. The following code sample shows you how to get your settings with only a few lines of code from SQL server.&lt;BR&gt;&lt;BR&gt;&lt;A href="http://geekswithblogs.net/akraus1/articles/75391.aspx"&gt;&lt;BIG&gt;&lt;SPAN style="FONT-WEIGHT: bold"&gt;Show More ...&lt;/SPAN&gt;&lt;/BIG&gt;&lt;/A&gt; &lt;p&gt;&lt;a href="http://www.pheedo.com/click.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=75393"&gt;&lt;img src="http://www.pheedo.com/img.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=75393" border="0"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;iframe src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;PageID=31016&amp;amp;SiteID=1" width=1 height=1 Marginwidth=0 Marginheight=0 Hspace=0 Vspace=0 Frameborder=0 Scrolling=No&gt;
&lt;script language='javascript1.1' src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Browser=NETSCAPE4&amp;amp;NoCache=True&amp;PageID=31016&amp;amp;SiteID=1"&gt;&lt;/script&gt;
&lt;noscript&gt;&lt;a href="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Click&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" target="_blank"&gt;
&lt;img src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" width="1" height="1" border="0"  alt=""&gt;&lt;/a&gt;
&lt;/noscript&gt;
&lt;/iframe&gt;
&lt;img src="http://geekswithblogs.net/akraus1/aggbug/75393.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Alois Kraus</dc:creator>
            <guid>http://geekswithblogs.net/akraus1/archive/2006/04/17/75393.aspx</guid>
            <pubDate>Tue, 18 Apr 2006 07:26:00 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/akraus1/comments/75393.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/akraus1/archive/2006/04/17/75393.aspx#feedback</comments>
            <slash:comments>1</slash:comments>
            <wfw:commentRss>http://geekswithblogs.net/akraus1/comments/commentRss/75393.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/akraus1/services/trackbacks/75393.aspx</trackback:ping>
        </item>
        <item>
            <title>Extend the Enterprise Library Config Tool - A Configurable Assembly Loader</title>
            <link>http://geekswithblogs.net/akraus1/archive/2006/03/05/71481.aspx</link>
            <description>&lt;P&gt;&lt;!--StartFragment --&gt; It has been some time since my last post. But I have an excuse: I did work on an improved version of the graphical EntlibConfig tool. The code can&lt;BR&gt;be downloaded from the Sample Section of &lt;A href="http://www.gotdotnet.com/Community/UserSamples/Details.aspx?SampleGuid=08031e06-ca0d-466f-9f69-9af218efd2d7"&gt;Gotdotnet&lt;/A&gt;. When you install the Jan 2006 of EntLib all works fine as long as EntLib is the only project in your bin folder. But for real Enterprise scenarios this is not true. The bin folder of your&amp;nbsp;project is&amp;nbsp;crowded soon with all sorts of other dlls and executables. Some might be managed some not, others&amp;nbsp;might even require special permissions (Interop.WindowsInstaller.dll which will throw during assembly load an SecurityException). These problems can cause a significant startup delay or break the tool completely. The config&amp;nbsp;tool itself is decoupled all application blocks and loads them via the &lt;A href="http://www.martinfowler.com/articles/injection.html"&gt;Dependency Injection Pattern&lt;/A&gt; another good source of information about this pattern can be found at the web site of the &lt;A href="http://www.springframework.net/examples.html"&gt;Spring.NET framework&lt;/A&gt;. This loose coupling is nice from the architectural point of view but can get in your way when you want to start the tool. Since there are no references to other projects tool does load the rest of the GUI via the following mechanism:&lt;BR&gt;&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Load all assemblies in deployment directory of EntlibConfig.exe.&lt;/LI&gt;
&lt;LI&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Check each assembly for the ConfigurationDesignManagerAttribute and plug it into the UI hierarchy.&lt;/LI&gt;&lt;/OL&gt;
&lt;P&gt;This approach does introduce some problems:&lt;BR&gt;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Increased startup time.&lt;/LI&gt;
&lt;LI&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;Loading unmanaged Dlls or some Interop assemblies which break the tool completely.&lt;/LI&gt;
&lt;LI&gt;&amp;nbsp; &amp;nbsp; Unable to load App.config which references other EntLib extensions which are not located in the folder where the tool resides.&lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;I have tried to circumvent these issues by making it configurable what (Design) assemblies are loaded at startup and where to look for missing references. If you load e.g. the Logging QuickStart sample App.config into the tool it will show you the following error:&lt;BR&gt;&lt;BR&gt;&lt;/P&gt;
&lt;DIV style="TEXT-ALIGN: center"&gt;&lt;IMG title="Assembly Resolve Error" style="WIDTH: 768px; HEIGHT: 126px" alt="" src="/images/geekswithblogs_net/akraus1/3532/o_OriginalResolveError.JPG"&gt;&lt;BR&gt;&lt;/DIV&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR&gt;With my extension you will see instead the Assembly Loader configuration dialog which does let you add the missing dependency at run time without the need to restart the tool.&lt;BR&gt;&lt;BR&gt;&lt;/P&gt;
&lt;DIV style="TEXT-ALIGN: center"&gt;&lt;IMG title="Configurable Assembly Loader" style="WIDTH: 708px; HEIGHT: 549px" alt="" src="/images/geekswithblogs_net/akraus1/3532/o_ResolveError.JPG"&gt;&lt;BR&gt;&lt;/DIV&gt;
&lt;P&gt;&lt;BR&gt;To add the missing dependency you have two options: &lt;BR&gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; a) Add the assembly in question to the ones which are loaded during startup.&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; b) Add an assembly resolve folder where to look also when resolving missing dependencies.&lt;BR&gt;&lt;BR&gt;&lt;/P&gt;
&lt;DIV style="TEXT-ALIGN: center"&gt;&lt;IMG title="When loading an App.config  unresolved assembly bindings can happen." style="WIDTH: 708px; HEIGHT: 549px" alt="" src="/images/geekswithblogs_net/akraus1/3532/o_ResolveConfiguration.JPG"&gt;&lt;BR&gt;&lt;/DIV&gt;
&lt;P&gt;&lt;BR&gt;I would recommend to use option b) for assemblies which do not contain any design time (*.Design.dll) parts for the UI itself. This way you can load all UI extenstion at startup from any folder you would want. To enable XCopy deployment I made all selected paths/files relative to the Appdomain directory of the EntLib tool. After clicking OK the new settings are saved in your User profile (NOT&amp;nbsp;&lt;SPAN lang=EN-GB style="FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman'"&gt;EntlibConfig.exe&lt;/SPAN&gt;.config) and the assembly bind is tried again. You should now see the UI without any further investigation what dependency might be missing. To make things complete you can fire up this dialog via the File Menu of the EntlibConfig tool&lt;BR&gt;&lt;BR&gt;&lt;/P&gt;
&lt;DIV style="TEXT-ALIGN: center"&gt;&lt;IMG title="File Menu" style="WIDTH: 229px; HEIGHT: 165px" alt="" src="/images/geekswithblogs_net/akraus1/3532/o_FileOpenMenu.JPG"&gt;&lt;BR&gt;
&lt;DIV style="TEXT-ALIGN: left"&gt;The integration of the Enterprise Library and its config tool into a real Source Control System (no not Visual Source Safe) is&amp;nbsp;much easier now. I have delivered a default configuration in the Enterprise Library App.Config file which explains the blue items in the dialogs. You can still change the assembly resolve directories and loaded assemblies at startup since the configuration is stored in the current users profile. With this twofold approach you can deliver presets which cannot be changed and give at the same time the user (developer) the freedom to add the needed dependencies on the fly without the need to check out the&amp;nbsp;&lt;SPAN lang=EN-GB style="FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman'"&gt;EntlibConfig.exe&lt;/SPAN&gt;.config file from the source control system.&lt;BR&gt;
&lt;HR style="WIDTH: 100%; HEIGHT: 2px"&gt;
&lt;BIG&gt;&lt;BIG style="FONT-WEIGHT: bold"&gt;Lessons learned&lt;BR&gt;&lt;BR&gt;&lt;/BIG&gt;&lt;/BIG&gt;During the development of this Addon I have found that it makes perfect sense to use Visual Source Safe on a Single User Machine. I had to review my changes compared to the "official" Enterprise Library which is with a Source Control system much easier. As always during development&amp;nbsp;unexpected things happen which make you wonder why your application behaves so strange. &lt;BR&gt;&lt;BR&gt;Problems/Bugs found:&lt;BR&gt;
&lt;UL&gt;
&lt;LI&gt;When you add a settings collection with an auto generated settings class I receive in the Appdomain.CurrentDomain.AssemblyResolve event handler the request for a not existing "System.XmlSerializers" assembly. This might have sth. to do with the on the fly generated assemblies by XmlSerializer but I do not understand why I should know about this. In the handler I&amp;nbsp; had to alter my application logic to skip this not existing assembly. If you consider this a bug you can vote &lt;A href="http://lab.msdn.microsoft.com/ProductFeedback/viewfeedback.aspx?feedbackid=1f0f3b32-09ec-47e2-90a5-fe9c1cda637c"&gt;here&lt;/A&gt;.&lt;/LI&gt;
&lt;LI&gt;After showing the Open File Dialog the current working directory is changed which did cause my relative path expansion algorithm blow up. There is a settings OpenFileDialog.RestoreDirectory which you can set to true to get the desired behavior. I found it out &lt;SPAN style="FONT-WEIGHT: bold"&gt;after&lt;/SPAN&gt; filing a request at the Product Feedback Center. It would be nice to document this in the Path.GetFullPath function documentation. It is not easy to understand why&amp;nbsp;the application behaves differently after the File Open Dialog.&lt;/LI&gt;&lt;/UL&gt;I hope this gives you better understanding what&amp;nbsp;problems you are faced with&amp;nbsp;when you deploy a software package which contains third party software or what constraints you have when you want to enable&amp;nbsp;software to run as checked in version in a source control system.&lt;/DIV&gt;&lt;/DIV&gt;&lt;p&gt;&lt;a href="http://www.pheedo.com/click.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=71481"&gt;&lt;img src="http://www.pheedo.com/img.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=71481" border="0"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;iframe src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;PageID=31016&amp;amp;SiteID=1" width=1 height=1 Marginwidth=0 Marginheight=0 Hspace=0 Vspace=0 Frameborder=0 Scrolling=No&gt;
&lt;script language='javascript1.1' src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Browser=NETSCAPE4&amp;amp;NoCache=True&amp;PageID=31016&amp;amp;SiteID=1"&gt;&lt;/script&gt;
&lt;noscript&gt;&lt;a href="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Click&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" target="_blank"&gt;
&lt;img src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" width="1" height="1" border="0"  alt=""&gt;&lt;/a&gt;
&lt;/noscript&gt;
&lt;/iframe&gt;
&lt;img src="http://geekswithblogs.net/akraus1/aggbug/71481.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Alois Kraus</dc:creator>
            <guid>http://geekswithblogs.net/akraus1/archive/2006/03/05/71481.aspx</guid>
            <pubDate>Mon, 06 Mar 2006 10:45:00 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/akraus1/comments/71481.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/akraus1/archive/2006/03/05/71481.aspx#feedback</comments>
            <slash:comments>3</slash:comments>
            <wfw:commentRss>http://geekswithblogs.net/akraus1/comments/commentRss/71481.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/akraus1/services/trackbacks/71481.aspx</trackback:ping>
        </item>
        <item>
            <title>Programatic Configuraton - Enterprise Library (v2.0) Logging Block </title>
            <link>http://geekswithblogs.net/akraus1/archive/2006/02/16/69784.aspx</link>
            <description>&lt;P&gt;&lt;!--StartFragment --&gt; &lt;/P&gt;
&lt;DIV style="FONT-SIZE: 10pt; BACKGROUND: white 0% 50%; COLOR: black; FONT-FAMILY: Courier New; moz-background-clip: initial; moz-background-origin: initial; moz-background-inline-policy: initial"&gt;The following code sample shows how to configure the Enterprise Library Logging Block programatically without the help of ObjectBuilder. To create a working LogWriter instance with your own settings you need to create the following objects:&lt;BR&gt;
&lt;UL&gt;
&lt;LI&gt;A Formatter which contains a valid message template&lt;/LI&gt;
&lt;LI&gt;A LogSource which has a name (Category) contains a colleciton of Listeners (Sinks) along with the Formatter.&lt;/LI&gt;
&lt;LI&gt;A collection LogSources with the category as key and the LogSource object as value&lt;/LI&gt;&lt;/UL&gt;To use this logger you can call&lt;BR&gt;&lt;BR&gt;&amp;nbsp; &lt;SPAN style="COLOR: teal"&gt;ConfigLessLogger&lt;/SPAN&gt;.Error(&lt;SPAN style="COLOR: maroon"&gt;"Hello world of config by code."&lt;/SPAN&gt;); 
&lt;DIV style="FONT-SIZE: 10pt; BACKGROUND: white 0% 50%; COLOR: black; FONT-FAMILY: Courier New; moz-background-clip: initial; moz-background-origin: initial; moz-background-inline-policy: initial"&gt;&lt;/DIV&gt;The error is written to the Windows Event Application Event Log:&lt;BR&gt;&lt;BR&gt;Timestamp: 16.02.2006 23:33:41&lt;BR&gt;Message: Hello World of dynamic object creation&lt;BR&gt;Category: Errors&lt;BR&gt;&lt;BR&gt;I have improved my original ConfigLessLogger sample with the very helpful comments from &lt;A href="http://davidhayden.com/blog/dave/"&gt;David Hayden&lt;/A&gt; who blogs&amp;nbsp;about the Enterprise Library (mainly IConfigurationSource and Logging Block).&lt;BR&gt;
&lt;HR style="WIDTH: 100%; HEIGHT: 2px"&gt;
&lt;BIG style="FONT-WEIGHT: bold"&gt;ConfigLessLoger.cs&lt;/BIG&gt;&lt;SPAN style="COLOR: green"&gt;&lt;BR&gt;&lt;BR&gt;&lt;/SPAN&gt;
&lt;DIV style="FONT-SIZE: 10pt; BACKGROUND: white 0% 50%; COLOR: black; FONT-FAMILY: Courier New; moz-background-clip: initial; moz-background-origin: initial; moz-background-inline-policy: initial"&gt;
&lt;DIV style="FONT-SIZE: 10pt; BACKGROUND: white 0% 50%; COLOR: black; FONT-FAMILY: Courier New; moz-background-clip: initial; moz-background-origin: initial; moz-background-inline-policy: initial"&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: blue"&gt;using&lt;/SPAN&gt; System;&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: blue"&gt;using&lt;/SPAN&gt; System.Collections.Generic;&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: blue"&gt;using&lt;/SPAN&gt; Microsoft.Practices.EnterpriseLibrary.Logging;&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: blue"&gt;using&lt;/SPAN&gt; Microsoft.Practices.EnterpriseLibrary.Common.Configuration;&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: blue"&gt;using&lt;/SPAN&gt; Microsoft.Practices.EnterpriseLibrary.Logging.Filters;&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: blue"&gt;using&lt;/SPAN&gt; Microsoft.Practices.EnterpriseLibrary.Logging.Formatters;&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: blue"&gt;using&lt;/SPAN&gt; Microsoft.Practices.EnterpriseLibrary.Logging.TraceListeners;&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: blue"&gt;namespace&lt;/SPAN&gt; MyApp.Logging&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;{&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: blue"&gt;public&lt;/SPAN&gt; &lt;SPAN style="COLOR: blue"&gt;class&lt;/SPAN&gt; &lt;SPAN style="COLOR: teal"&gt;ConfigLessLogger&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: blue"&gt;private&lt;/SPAN&gt; &lt;SPAN style="COLOR: blue"&gt;static&lt;/SPAN&gt; &lt;SPAN style="COLOR: teal"&gt;LogWriter&lt;/SPAN&gt; writer;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; &lt;SPAN style="COLOR: green"&gt;// Instance is created in static ctor which is thread safe&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: blue"&gt;const&lt;/SPAN&gt; &lt;SPAN style="COLOR: blue"&gt;string&lt;/SPAN&gt; EventLogSource = &lt;SPAN style="COLOR: maroon"&gt;"Code Source"&lt;/SPAN&gt;;&amp;nbsp; &lt;SPAN style="COLOR: green"&gt;// Event Log Source name&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: blue"&gt;const&lt;/SPAN&gt; &lt;SPAN style="COLOR: blue"&gt;string&lt;/SPAN&gt; ErrorCategory = &lt;SPAN style="COLOR: maroon"&gt;"Errors"&lt;/SPAN&gt;;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: green"&gt;// We have only one message category: Errors &lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: blue"&gt;static&lt;/SPAN&gt; ConfigLessLogger()&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; writer = CreateLogWriterFromCode();&amp;nbsp; &lt;SPAN style="COLOR: green"&gt;// static ctor is thread safe according to ECMA standard section 9.5.3 &lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: blue"&gt;static&lt;/SPAN&gt; &lt;SPAN style="COLOR: blue"&gt;private&lt;/SPAN&gt; &lt;SPAN style="COLOR: teal"&gt;LogWriter&lt;/SPAN&gt; CreateLogWriterFromCode()&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: green"&gt;// This is our message template for any Sink you add below in our case the Windows Event Log&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: teal"&gt;TextFormatter&lt;/SPAN&gt; formatter = &lt;SPAN style="COLOR: blue"&gt;new&lt;/SPAN&gt; &lt;SPAN style="COLOR: teal"&gt;TextFormatter&lt;/SPAN&gt;(&lt;SPAN style="COLOR: maroon"&gt;"Timestamp: {timestamp}{newline}"&lt;/SPAN&gt; +&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: maroon"&gt;"Message: {message}{newline}"&lt;/SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; +&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: maroon"&gt;"Category: {category}{newline}"&lt;/SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; );&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: teal"&gt;LogSource&lt;/SPAN&gt; emptyTraceSource = &lt;SPAN style="COLOR: blue"&gt;new&lt;/SPAN&gt; &lt;SPAN style="COLOR: teal"&gt;LogSource&lt;/SPAN&gt;(&lt;SPAN style="COLOR: maroon"&gt;"none"&lt;/SPAN&gt;);&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: teal"&gt;LogSource&lt;/SPAN&gt; errorsTraceSource = &lt;SPAN style="COLOR: blue"&gt;new&lt;/SPAN&gt; &lt;SPAN style="COLOR: teal"&gt;LogSource&lt;/SPAN&gt;(ErrorCategory, System.Diagnostics.&lt;SPAN style="COLOR: teal"&gt;SourceLevels&lt;/SPAN&gt;.All);&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: green"&gt;// Create for all Errors a Listener which writes the messages to the Windows Event Log&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: green"&gt;// with the Event Log Source Property "Code Source". The message format is specified by&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: green"&gt;// the TextFormatter which is in our case the template above.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; errorsTraceSource.Listeners.Add(&lt;SPAN style="COLOR: blue"&gt;new&lt;/SPAN&gt; &lt;SPAN style="COLOR: teal"&gt;FormattedEventLogTraceListener&lt;/SPAN&gt;(EventLogSource, formatter));&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: teal"&gt;IDictionary&lt;/SPAN&gt;&amp;lt;&lt;SPAN style="COLOR: blue"&gt;string&lt;/SPAN&gt;, &lt;SPAN style="COLOR: teal"&gt;LogSource&lt;/SPAN&gt;&amp;gt; traceSources = &lt;SPAN style="COLOR: blue"&gt;new&lt;/SPAN&gt; &lt;SPAN style="COLOR: teal"&gt;Dictionary&lt;/SPAN&gt;&amp;lt;&lt;SPAN style="COLOR: blue"&gt;string&lt;/SPAN&gt;, &lt;SPAN style="COLOR: teal"&gt;LogSource&lt;/SPAN&gt;&amp;gt;();&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: green"&gt;// Add to Category "Error" our EventLog Listener with the corresponding category in it.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; traceSources.Add(errorsTraceSource.Name, errorsTraceSource);&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: blue"&gt;return&lt;/SPAN&gt; &lt;SPAN style="COLOR: blue"&gt;new&lt;/SPAN&gt; &lt;SPAN style="COLOR: teal"&gt;LogWriter&lt;/SPAN&gt;(&lt;SPAN style="COLOR: blue"&gt;new&lt;/SPAN&gt; &lt;SPAN style="COLOR: teal"&gt;ILogFilter&lt;/SPAN&gt;[0], &lt;SPAN style="COLOR: green"&gt;// ICollection&amp;lt;ILogFilter&amp;gt; filters&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; traceSources,&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: green"&gt;// IDictionary&amp;lt;string, LogSource&amp;gt; traceSources&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; emptyTraceSource,&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: green"&gt;// LogSource allEventsTraceSource&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; emptyTraceSource,&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: green"&gt;// LogSource notProcessedTraceSource&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; errorsTraceSource,&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: green"&gt;// LogSource errorsTraceSource&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; ErrorCategory,&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: green"&gt;// string defaultCategory&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; &lt;SPAN style="COLOR: blue"&gt;false&lt;/SPAN&gt;,&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: green"&gt;// bool tracingEnabled&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; &lt;SPAN style="COLOR: blue"&gt;true&lt;/SPAN&gt;);&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: green"&gt;// bool logWarningsWhenNoCategoriesMatch&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: gray"&gt;///&lt;/SPAN&gt;&lt;SPAN style="COLOR: green"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR: gray"&gt;&amp;lt;summary&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: gray"&gt;///&lt;/SPAN&gt;&lt;SPAN style="COLOR: green"&gt; Write an Error message to the Windows Event Log with an message template specifed in code&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: gray"&gt;///&lt;/SPAN&gt;&lt;SPAN style="COLOR: green"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR: gray"&gt;&amp;lt;/summary&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: gray"&gt;///&lt;/SPAN&gt;&lt;SPAN style="COLOR: green"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR: gray"&gt;&amp;lt;param name="message"&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: green"&gt;Error message to log&lt;/SPAN&gt;&lt;SPAN style="COLOR: gray"&gt;&amp;lt;/param&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: blue"&gt;public&lt;/SPAN&gt; &lt;SPAN style="COLOR: blue"&gt;static&lt;/SPAN&gt; &lt;SPAN style="COLOR: blue"&gt;void&lt;/SPAN&gt; Error(&lt;SPAN style="COLOR: blue"&gt;string&lt;/SPAN&gt; message)&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: teal"&gt;LogEntry&lt;/SPAN&gt; ent = &lt;SPAN style="COLOR: blue"&gt;new&lt;/SPAN&gt; &lt;SPAN style="COLOR: teal"&gt;LogEntry&lt;/SPAN&gt;();&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; ent.Categories.Add(ErrorCategory);&amp;nbsp; &lt;SPAN style="COLOR: green"&gt;// To use another category use traceSources.Add("OtherCat", Listener);&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; ent.Message = message;&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; ent.Severity = System.Diagnostics.&lt;SPAN style="COLOR: teal"&gt;TraceEventType&lt;/SPAN&gt;.Error;&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; writer.Write(ent);&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;}&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;BR&gt;&lt;/DIV&gt;&lt;p&gt;&lt;a href="http://www.pheedo.com/click.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=69784"&gt;&lt;img src="http://www.pheedo.com/img.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=69784" border="0"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;iframe src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;PageID=31016&amp;amp;SiteID=1" width=1 height=1 Marginwidth=0 Marginheight=0 Hspace=0 Vspace=0 Frameborder=0 Scrolling=No&gt;
&lt;script language='javascript1.1' src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Browser=NETSCAPE4&amp;amp;NoCache=True&amp;PageID=31016&amp;amp;SiteID=1"&gt;&lt;/script&gt;
&lt;noscript&gt;&lt;a href="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Click&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" target="_blank"&gt;
&lt;img src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" width="1" height="1" border="0"  alt=""&gt;&lt;/a&gt;
&lt;/noscript&gt;
&lt;/iframe&gt;
&lt;img src="http://geekswithblogs.net/akraus1/aggbug/69784.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Alois Kraus</dc:creator>
            <guid>http://geekswithblogs.net/akraus1/archive/2006/02/16/69784.aspx</guid>
            <pubDate>Fri, 17 Feb 2006 09:39:00 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/akraus1/comments/69784.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/akraus1/archive/2006/02/16/69784.aspx#feedback</comments>
            <slash:comments>40</slash:comments>
            <wfw:commentRss>http://geekswithblogs.net/akraus1/comments/commentRss/69784.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/akraus1/services/trackbacks/69784.aspx</trackback:ping>
        </item>
    </channel>
</rss>