简体   繁体   中英

“Access to the path 'a-guid.8Event' is denied.” at startup

I have a C# WinForms application I distribute for free. I set up a minimal crash server so I that when an instance crashes I receive the stack trace and a few hardware details. A few of my users experienced a crash I couldn't replicate, nor I could find a solution online (later on this).

Exception type is: System.UnauthorizedAccessException btw: my app doesn't require to be an administrator, is can be run by a normal user.

Exception message (in English, I also have in three other languages) is:

Access to the path '6cbb4993-b127-4668-937e-f64c83b6e6b30.8Event' is denied.

As you can see, the path doesn't look as a path at all, it's more like a guid. The guid doesn't change, it's the same for all the users. I suspect it is somehow bound to my application, but I couldn't locate such value nor in the file system nor in the registry.

stack trace is:

at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.Threading.EventWaitHandle..ctor(Boolean initialState, EventResetMode mode, String name, Boolean& createdNew, EventWaitHandleSecurity eventSecurity)
at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.Run(String[] commandLine)
at VisualSEO.WinFormGui.Program.Main(String[] args)

Some of the users who experienced the problem looks they managed to succesfully start the program afterward (they have been kind enought to contact me, but were not able to tell me how to reproduce the issue), others didn't (I do not have a direct contact with them, as I do not ask registration to use the program, so I can't ask them, but I know they didn't launch it again because I track update requests with an hardware identifier).

Of course I did my homework and searched all over the web. The only similar things I found are:

On expert exchange (I can't post the url) I guy had a problem with similar error message, and diffent guid. He was using Windows XP and wrote that "A restart fixed the problem". Some of my users - as I said - managed to relaunch successfully, but that's not "a solution". For the record, affected users so far have the following OS:

  • Win7 SP1
  • WinServer 2088 Std SP2
  • Win8

Here they had a similar error message
They are an open source project and I could also see the fix they did
Their fix is unfortunately just a badly implemented workaround: they assume language is always English (in my case I always set culture thread to English before logging the exception.Message, but it only works if the user installation also has the english dictionaries installed, and in many cases they are not) Also their diagnosis doesn't help my case: They assume the issue is caused by another instance of their client already running within another user account (might be correct in their case); I tested it and that's not my case.

I can't find the root cause. I'm running out of ideas. Has anyone solved a similar issue in the past?

Your question is tagged C#, but the exception appears to be VB. Is that correct?

I saw a similar exception (different guid) at program start-up, and I used Process Monitor to find the offender. In my case it involved CLR access to a registry key that was blocked by the end-user's anti-virus.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM