我在一个域上,阅读路径\\machinecap\platform\in
。FileSystemWatcher C#权限问题
该平台是一个共享,在本地导致E:\cappuccino\platform
。该应用程序是使用C#.NET 2.0制作的Windows服务,它使用FileSystemWatcher为创建和重命名的文件读取路径\\machinecap\platform\in
。
自从\\machinecap\platform
(包括所有子目录)以来,我拥有“完全控制”权限,但只有这样,才能访问服务器中其他任何文件夹(是Windows Server 2003)。
问题是当文件到达服务器时,服务崩溃,并且在事件查看器中没有记录(下降)消息。为了追踪问题,我在服务器中创建了一个逻辑对象,并试图手动执行应用程序所执行的所有步骤。我可以在“in”文件夹中创建文件,但是我无法删除这些文件...显示的错误消息:"E:\ is not accessible. Access is denied."
当然,我没有任何访问E:\根文件夹的权限,只有E:\cappuccino\platform
...这是问题吗?我是否真的必须读取E:\
才能阅读E:\cappuccino\platform
?
更多信息
异常消息:
Unhandled Exception: System.BadImageFormatException: Could not load file or assembly 'Oracle.DataAccess, Version=2.112.2.0, Culture=neutral, PublicKeyToken=89b483f429c47342' or one of its dependencies.
An attempt was made to load a program with an incorrect format.
File name: 'Oracle.DataAccess, Version=2.112.2.0, Culture=neutral, PublicKeyToken=89b483f429c47342'
at TestRiskStore.ArisReportReader.CreateOrRename(Object source, FileSystemEventArgs e)
at System.IO.FileSystemWatcher.CompletionStatusChanged(UInt32 errorCode, UInt32 numBytes, NativeOverlapped* overlappedPointer)
at System.Threading._IOCompletionCallback.PerformIOCompletionCallback(UInt32 errorCode, UInt32 numBytes, NativeOverlapped* pOVERLAP)
WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind failure logging.
To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].
请注意,我用Oracle.DataAccess组件。我认为这个问题是关系到这一点,不知道....任何想法如何解决这个问题?
还有一条评论...当我打开cmd并键入'E:[enter]'我得到了同样的错误信息:拒绝访问 – jyz
您发布的错误消息与“拒绝访问”无关。你发布了错误的例外吗? –
这只是我得到的错误信息。 “拒绝访问”是在服务器上进行了一些调查之后,我认为这个问题可能与程序集上的权限丢失有关。但是我已经检查过它具有适当的权限(我使用'cacls'进行了检查) – jyz