07-09-2009 06:45 AM
Hi,
I have a Problem using Nidaq-DLLs within my application
on a network drive.
Calling my application on a local directory, everything works fine,
but from a network drive I get the following error:
************** Exception Text **************
System.IO.FileLoadException:
Could not load file or assembly 'NationalInstruments.DAQmx,
Version=8.7.20.11, Culture=neutral, PublicKeyToken=4544464cdeaab541' or
one of its dependencies. Failed to grant minimum permission requests.
(Exception from HRESULT: 0x80131417)
File name:
'NationalInstruments.DAQmx, Version=8.7.20.11, Culture=neutral,
PublicKeyToken=4544464cdeaab541' --->
System.Security.Policy.PolicyException: Required permissions cannot be
acquired.
at
System.Security.SecurityManager.ResolvePolicy(Evidence evidence,
PermissionSet reqdPset, PermissionSet optPset, PermissionSet denyPset,
PermissionSet& denied, Boolean checkExecutionPermission)
at
System.Security.SecurityManager.ResolvePolicy(Evidence evidence,
PermissionSet reqdPset, PermissionSet optPset, PermissionSet denyPset,
PermissionSet& denied, Int32& securitySpecialFlags, Boolean
checkExecutionPermission)
at VML_Zielanzeige.VML_Zielanzeige.WriteDigitalLine(Int32 iLine, Int32 iData)
at VML_Zielanzeige.VML_Zielanzeige.OnTimerVerriegeln(Object sender, EventArgs e)
at System.Windows.Forms.Timer.OnTick(EventArgs e)
at System.Windows.Forms.Timer.TimerNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
It seems that I don´t have the permisson to call a Function from the DLL.
What can I do?
Thanks, Juergen
07-13-2009 09:36 AM
Hi Jürgen,
I have not been able to reproduce the issue with a standard DAQmx Application here. Where exactly are the various assemblies located when you run the program? What permissions do you have to run programs from those folders?
I did some research regarding the error and found that hresult 0x80131417 refers to zone permissions, as stated on this MSDN page. You can try and adjust the settings mentioned there.
Hope this helps.
Regards