简体   繁体   English

“在启动时访问路径'a-guid.8Event'被拒绝。”

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

I have a C# WinForms application I distribute for free. 我有一个免费分发的C#WinForms应用程序。 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. 异常类型是: System.UnauthorizedAccessException btw:我的应用程序不需要是管理员,可以由普通用户运行。

Exception message (in English, I also have in three other languages) is: 异常消息(英文,我还有其他三种语言)是:

Access to the path '6cbb4993-b127-4668-937e-f64c83b6e6b30.8Event' is denied. 访问路径'6cbb4993-b127-4668-937e-f64c83b6e6b30.8Event'被拒绝。

As you can see, the path doesn't look as a path at all, it's more like a guid. 正如您所看到的,路径看起来并不是一条路径,它更像是一个guid。 The guid doesn't change, it's the same for all the users. guid不会改变,对所有用户来说都是一样的。 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) 在System.IO .__ Error.WinIOError(Int32 errorCode,String maybeFullPath)
at System.Threading.EventWaitHandle..ctor(Boolean initialState, EventResetMode mode, String name, Boolean& createdNew, EventWaitHandleSecurity eventSecurity) 在System.Threading.EventWaitHandle..ctor(Boolean initialState,EventResetMode mode,String name,Boolean&createdNew,EventWaitHandleSecurity eventSecurity)
at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.Run(String[] commandLine) 在Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.Run(String [] commandLine)
at VisualSEO.WinFormGui.Program.Main(String[] args) 在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. 在专家交流(我不能发布网址)我的家伙有类似的错误消息的问题,并且不同的guid。 He was using Windows XP and wrote that "A restart fixed the problem". 他正在使用Windows XP并写道“A restart修复了问题”。 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 Win7 SP1
  • WinServer 2088 Std SP2 WinServer 2088 Std SP2
  • Win8 在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. 您的问题标记为C#,但异常似乎是VB。 Is that correct? 那是对的吗?

I saw a similar exception (different guid) at program start-up, and I used Process Monitor to find the offender. 我在程序启动时看到了类似的异常(不同的guid),我使用Process Monitor找到了罪犯。 In my case it involved CLR access to a registry key that was blocked by the end-user's anti-virus. 在我的情况下,它涉及CLR访问被最终用户的反病毒阻止的注册表项。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 对路径的访问被拒绝。 - Access to the path is denied. 拒绝访问“ somepath”路径。” - Access to the path “somepath” is denied." UWP FileStream 抛出“对路径的访问被拒绝”。 - UWP FileStream throws "Access to path is denied." 访问路径被拒绝。 在 c# - Access to the path is denied. in c# File.ReadAllText(): System.UnauthorizedAccessException: '访问路径被拒绝。' - File.ReadAllText(): System.UnauthorizedAccessException: 'Access to the path is denied.' 拒绝访问路径。 谷歌api本地iis发布 - Access to the path is denied. google api local iis publish C# 对路径的访问被拒绝...(System.UnauthorizedAccessException:对路径'C:\'的访问被拒绝。) - C# access to the path is denied…(System.UnauthorizedAccessException: Access to the path 'C:\' is denied.) “拒绝访问路径'Calculations.pdb'。”但是,对其他所有文件的访问都可以 - “Access to the path 'Calculations.pdb' is denied.” But access is fine for all the other files UNC路径中的C#ASP.NET File.OpenRead:“对路径的访问...被拒绝。” - C# ASP.NET File.OpenRead from UNC path: “Access to path…is denied.” 拒绝访问路径“ Global \\ {xxx} _YYY-YYY:13552”。 迟发型? - Access to the path 'Global\{xxx}_YYY-YYY:13552' is denied. Hangfire?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM