473,569 Members | 2,648 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Security problem with Exception Management Block

When running my application on accounts that don't have admin privileges, I
recieve the following error (I am trying to write to the Application event
log):

System.Security .SecurityExcept ion: The event source
ExceptionManage rInternalExcept ion does not exist and cannot be created with
the current permissions. ---> System.Security .SecurityExcept ion: Requested
registry access is not allowed.
at Microsoft.Win32 .RegistryKey.Op enSubKey(String name, Boolean writable)
at System.Diagnost ics.EventLog.Cr eateEventSource (String source, String
logName, String machineName, Boolean useMutex)
at System.Diagnost ics.EventLog.Cr eateEventSource (String source, String
logName, String machineName)
at System.Diagnost ics.EventLog.Cr eateEventSource (String source, String
logName)
at
Microsoft.Appli cationBlocks.Ex ceptionManageme nt.DefaultPubli sher.VerifyVali dSource()
--- End of inner exception stack trace ---
at
Microsoft.Appli cationBlocks.Ex ceptionManageme nt.DefaultPubli sher.VerifyVali dSource()
at
Microsoft.Appli cationBlocks.Ex ceptionManageme nt.DefaultPubli sher.Publish(Ex ception
exception, NameValueCollec tion additionalInfo, NameValueCollec tion
configSettings)
at
Microsoft.Appli cationBlocks.Ex ceptionManageme nt.ExceptionMan ager.PublishInt ernalException( Exception exception, NameValueCollec tion additionalInfo)
at
Microsoft.Appli cationBlocks.Ex ceptionManageme nt.ExceptionMan ager.Publish(Ex ception exception, NameValueCollec tion additionalInfo)
at
Microsoft.Appli cationBlocks.Ex ceptionManageme nt.ExceptionMan ager.Publish(Ex ception exception)
at FERC.DAMS.Commo n.ExceptionHand ler.Publish(Exc eption ex)
at FERC.DAMS.UI.Wi ndows.Controls. Screen.DamScree nCtl.Finish()
at FERC.DAMS.UI.Wi ndows.Form.Form 1.mnuFinish_Cli ck(Object sender,
EventArgs e)
at System.Windows. Forms.MenuItem. OnClick(EventAr gs e)
at System.Windows. Forms.MenuItemD ata.Execute()
at System.Windows. Forms.Command.I nvoke()
at System.Windows. Forms.Control.W mCommand(Messag e& m)
at System.Windows. Forms.Control.W ndProc(Message& m)
at System.Windows. Forms.Scrollabl eControl.WndPro c(Message& m)
at System.Windows. Forms.Container Control.WndProc (Message& m)
at System.Windows. Forms.Form.WndP roc(Message& m)
at System.Windows. Forms.ControlNa tiveWindow.OnMe ssage(Message& m)
at System.Windows. Forms.ControlNa tiveWindow.WndP roc(Message& m)
at System.Windows. Forms.NativeWin dow.Callback(In tPtr hWnd, Int32 msg,
IntPtr wparam, IntPtr lparam)

What permissions do I need to give these accounts to make them work correctly?

Thanks,
Don Hurley
Jul 21 '05 #1
1 6580
Hi Don,

First of all, I would like to confirm my understanding of your issue. From
your description, I understand that when you're trying to run an
application without administrator's privileges, you got an exception when
writing to event log. If there is any misunderstandin g, please feel free to
let me know.

This exception is thrown because you don't have permission to write to or
create the certain registry keys. So please do the following for workaround.

To workaround this problem, you can grant permission to the user account
for full access to the following registry key.

HKLM\SYSTEM\Cur rentControlSet\ Services\Eventl og\<LogType>\<S ource>.

HTH.

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."

Jul 21 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
1842
by: Steve O'maley | last post by:
I currently have the Exception Management Application Block working in my base directory, but when I create pages in a subfolder the Exception Management Application Block is never executed. The error is just displayed back to me like it normaly would be w/out the Exception Management Application Block was never implemented Do I need to include...
1
1864
by: Andy | last post by:
Hi All, I'm basically just trying to get started with the Exception Management Application Block and am having some technical difficulties. All I want to do to begin with is create a simple Windows Application (which I have done and named "ExceptionManagementTester") and within it create and use a custom publisher. The Exception...
6
2116
by: Páll Ólafsson | last post by:
Hi I have a problem with the Microsoft.ApplicationBlocks.ExceptionManagement? I can't get it to work in RELEASE mode? If I run the project in debug mode the block works fine but when I run the exe file it doesn't catch any errors? Does anyone know what my problem might be? Regards
1
2642
by: Danko Greiner | last post by:
Thanx Willy, this was very helpful. But i also need (and want to know) how to do this from code. Can you plase give me right topic in MSDN? is there good example? Thanx p.s. this is copy/paste from previous thread, don't ask why... "Grei" <danko.greinerREMOVE@zg.htnet.hr> wrote in message news:d1vihg$m3b$1@ss405.t-com.hr...
1
1115
by: SamIAm | last post by:
Hi There I am busy evaluating using the Exception Management Block in my web app. I have divided my solution into 3 projects. 1) WebApp 2) Business Tier Library 3) Data Tier Library Where would I call ExceptionManager.Publish from? My WebApp only or all tiers?
1
1863
by: Ellis Yu | last post by:
Dear All, I used VB.Net to write an application which use the exception management in Application Block as error handling. When I deploy the application in the client machine, it's fine. However when I put the application to the network server. A just-in-time debugger alert that an unhandling error was raised by a function call...
1
344
by: Donald Hurley | last post by:
When running my application on accounts that don't have admin privileges, I recieve the following error (I am trying to write to the Application event log): System.Security.SecurityException: The event source ExceptionManagerInternalException does not exist and cannot be created with the current permissions. --->...
2
2235
by: KaNos | last post by:
Hello world, I've made a webservice (c# v2) to install in a server IIS 6 on a Windows 2000 last SP. We can use the webservice in local, throw the pages wich present the methods, with a windows mode connection (<authentication mode="Windows"/>) if impersonate is false (<identity impersonate="false"/>). Note that i use the administrator user to...
10
6621
by: David Thielen | last post by:
Hi; I am trying to write to the event log using: public const string EVENT_LOG_NAME = "Windward Portal"; if (!EventLog.SourceExists(EVENT_LOG_NAME)) EventLog.CreateEventSource(EVENT_LOG_NAME, "Application"); And I am getting the exception: System.ThrowHelper.ThrowSecurityException(ExceptionResource resource) +48
0
7924
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8130
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
0
7979
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6284
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
5219
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3653
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
1
2115
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1223
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
940
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.