<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://forums.asp.net/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Microsoft Application Blocks</title><link>http://forums.asp.net/122.aspx</link><description>Discuss the various Patterns &amp; Practices Application Blocks for ASP.NET 1.x.</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP1 (Build: 20510.895)</generator><item><title>Re: Requested registry access is not allowed (Enterprise Library)</title><link>http://forums.asp.net/thread/1437611.aspx</link><pubDate>Mon, 23 Oct 2006 12:33:54 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:1437611</guid><dc:creator>Jacques Snyman</dc:creator><author>Jacques Snyman</author><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/1437611.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=122&amp;PostID=1437611</wfw:commentRss><description>&lt;p&gt;I looked at http://support.microsoft.com/default.aspx?scid=kb;en-us;329291 and then used regedit to change the permissions on the HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Eventlog key to allow the account that asp.net is running in (eg. ASP.NET or Network service) full access to the key.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Do this by running regedit and navigating to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Eventlog&lt;br /&gt;&lt;br /&gt;Right click on the Eventlog key and select Set permissions...&lt;/p&gt;&lt;p&gt;Add the account that asp.net is running in to the list. Select the account and make sure read and write is selected.&lt;/p&gt;&lt;p&gt;OK and exit regedit.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;This worked for me. Hope it &amp;#39;ll help someone somewhere.&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: Requested registry access is not allowed (Enterprise Library)</title><link>http://forums.asp.net/thread/1122775.aspx</link><pubDate>Thu, 24 Nov 2005 06:29:32 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:1122775</guid><dc:creator>Partyanimal</dc:creator><author>Partyanimal</author><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/1122775.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=122&amp;PostID=1122775</wfw:commentRss><description>&lt;P&gt;&lt;FONT face=Verdana size=2&gt;Howdeee Olly P&lt;BR&gt;&lt;BR&gt;R u using&amp;nbsp;the logging block for Asp.net application or for windows application.? cuz i face the same problem when i use this block in my distributed ASP.NET application a week ago and my resolutions were different from the recommended ways.&lt;BR&gt;&lt;BR&gt;My approach was in case of Web application&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;1. Just right click the virtual directory in InutPub&amp;nbsp;and go to security tab in its properties and add the ASp.NET user after selecting ur Pc/machine name in the locations tab with full rights ... thats it.....&lt;BR&gt;&lt;BR&gt;it works for meeee.... and i hope it works for u as well....&lt;BR&gt;&lt;BR&gt;but here is the recommended way for its resolution i hope it ends ur nightmare.....&lt;BR&gt;&lt;BR&gt;&lt;A href="http://support.microsoft.com/default.aspx?scid=kb;en-us;329291"&gt;http://support.microsoft.com/default.aspx?scid=kb;en-us;329291&lt;/A&gt;&amp;nbsp;&lt;BR&gt;&lt;BR&gt;enjoy...&amp;nbsp;&lt;BR&gt;&lt;BR&gt;&lt;/FONT&gt;&lt;/P&gt;</description></item><item><title>Requested registry access is not allowed (Enterprise Library)</title><link>http://forums.asp.net/thread/1090235.aspx</link><pubDate>Fri, 21 Oct 2005 18:37:05 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:1090235</guid><dc:creator>Olly P</dc:creator><author>Olly P</author><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/1090235.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=122&amp;PostID=1090235</wfw:commentRss><description>&lt;P&gt;&lt;FONT face=Arial size=2&gt;Dear all who might be able to help... &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Arial size=2&gt;I'm trying to use the Enterprise Library logging and instrumentation application block (amongst others).&amp;nbsp; In particular, I want to log events to a new event log.&amp;nbsp; I've added the necessary configuration to my project web.config file using the Enterprise Library Configuration GUI.&amp;nbsp; This&amp;nbsp;(I believe) simply requires adding a new Event Log Sink, setting the name of the log you want to create (I don't want to write to the default Application log, I want a new one) and the name for the source that will then write to that log.&lt;BR&gt;Then it just remains to add the new Event Log Sink as a destination for one of the categories.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Arial size=2&gt;Unfortunately, when I attempt to write to the log using my application using the following simple few&amp;nbsp;lines of&amp;nbsp;code (thanks to Enterprise Library):&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Arial size=2&gt;LogEntry log = new LogEntry();&lt;BR&gt;log.EventId = 100;&lt;BR&gt;log.Message = "Logging to a brand new event log";&lt;BR&gt;log.Category = "General"; //General is default so use this category for now&lt;BR&gt;log.Priority = 1;&lt;BR&gt;Logger.Write(log);&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Arial size=2&gt;I am getting the 'Requested registry access is not allowed' error.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Arial size=2&gt;Now for (way) too long, I've been trying to fix this and have tried every suggestion i can find out there - changing permissions for the event log registry settings, running InstallUtil.exe on the dlls (both in the bin of the app and in the installation folder for Enterprise Library) and I still can't fix it.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Arial size=2&gt;Anyway, to cut a long story short,&amp;nbsp;there's&amp;nbsp;one thing which is now&amp;nbsp;really bugging me:&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Arial size=2&gt;By using the LoggingQuickStart project which ships with Enterprise Library, and changing the app.config file of the application (again, using the Enterprise Manager Config GUI) such that a brand new log will be created, everything works fine&amp;nbsp;- new log in the event list, new source, everything's great.&amp;nbsp; This suggests to me that all permissions/installations etc must be fine but that there's something I'm not doing in the code which I should be ...&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Arial size=2&gt;Does anyone have any clue what that Quick Start application which comes with Enterprise Library is doing which is so special?!&lt;BR&gt;&lt;BR&gt;Olly P&lt;BR&gt;&lt;/FONT&gt;&lt;/P&gt;</description></item></channel></rss>