Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / New Users / March 2006

Tip: Looking for answers? Try searching our database.

Problem when using Application Block

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
shahp@libgotravel.com - 26 Mar 2006 23:56 GMT
Hi,

This is my first time using these forums. So please excuse me if this post
in the wrong thread.

This is my problem. I am using Visual 2003, .Net framework 1.1 and the
latest Application Block (enterprise Library 2005)

I configured the DAAB using the Enterprise Library Configuration Screen and
my application is a very basic one - clicking on a button would fill the
DataGrid with records

I keep getting this securiy error. Below is the description

An unhandled exception of type 'System.Security.SecurityException' occurred
in mscorlib.dll
Additional information: Requested registry access is not allowed.

Below is the stack

Stack Trace:
[SecurityException: Requested registry access is not allowed.]
  Microsoft.Win32.RegistryKey.OpenSubKey(String name, Boolean writable) +473
  System.Diagnostics.EventLog.FindSourceRegistration(String source, String
machineName, Boolean readOnly)
  System.Diagnostics.EventLog.SourceExists(String source, String machineName)
  System.Diagnostics.EventLog.WriteEntry(String message, EventLogEntryType
type, Int32 eventID, Int16 category, Byte[] rawData)
  System.Diagnostics.EventLog.WriteEntry(String message, EventLogEntryType
type, Int32 eventID, Int16 category)
  System.Diagnostics.EventLog.WriteEntry(String message, EventLogEntryType
type, Int32 eventID)
  System.Diagnostics.EventLog.WriteEntry(String message, EventLogEntryType
type)
 
Microsoft.Practices.EnterpriseLibrary.Common.Instrumentation.PerformanceCounterInstances.ReportCounterFailure(String message)
 
Microsoft.Practices.EnterpriseLibrary.Common.Instrumentation.PerformanceCounterInstances..ctor(String
categoryName, String counterName, Boolean createNewInstance)
 
Microsoft.Practices.EnterpriseLibrary.Common.Instrumentation.InstrumentedEvent.AddPerformanceCounter(String
category, String[] counterNames, Boolean createNewInstance)
 
Microsoft.Practices.EnterpriseLibrary.Common.Instrumentation.InstrumentedEvent.Initialize(String
counterCategory, String[] counterNames, Boolean createNewInstance, String
eventLogSource, EventLogIdentifier[] eventIds)
 
Microsoft.Practices.EnterpriseLibrary.Common.Instrumentation.InstrumentedEvent..ctor(String
counterCategory, String[] counterNames, Boolean createNewInstance)
 
Microsoft.Practices.EnterpriseLibrary.Data.Instrumentation.DataServiceEvent..ctor(String[] counterNames)
 
Microsoft.Practices.EnterpriseLibrary.Data.Instrumentation.DataCommandFailedEvent..ctor(String[] counterNames)
 
Microsoft.Practices.EnterpriseLibrary.Data.Instrumentation.DataCommandFailedEvent..cctor()

Can someone please help (step by step) me exactly what sould I be doing to
get ahead of this error
vecozo@online.nospam - 31 Mar 2006 16:10 GMT
Hi,

The enterprise librabry is trying to write an event to the eventlog with a
source that does not exist. When it tries to create this source, it is denied
access and a security exception occures.

You can do one out of 2 things:

1) Disable logging to the eventlog (see help files logging application
block; i do not use it)
2) Log on as an administrator and run your application. It now has access to
the registry so the event source can be created. You can now swicth back to
your original accound and and your application should run.

Hope this helps,
Martijn Kaag
______________________________
www.VECOZO.nl

> Hi,
>
[quoted text clipped - 54 lines]
> Can someone please help (step by step) me exactly what sould I be doing to
> get ahead of this error

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.