I have an application that's ready to be deployed. Its been tested and works perfectly with the .dll and .dlx files on the tester's local machine, but for production we'd like for users to be able to select the files from a shared network drive and run it that way. With the file on the network drive, pressing ctrl+u and selecting the .dll immediately yields this error:
Error in external library, see system log for details.
Function name: ufusr
Any ideas on where I should start looking for the bug or what could be causing the issues?
Solved! Go to Solution.
In general, the first place to look is the NX syslog (Help, Log File) for errors that you did not trap in your application.
See this recent discussion topic for information on running .NET dll's from network locations.
From the log file: (just a snippet, I can post the entire error log if necessary, but I don't want to spam that much text if I don't have to)
It looks like it's either an issues with the entry/exit point of the application, or there's a security issue not allowing the process to read the .dlx file, but I'm not sure. Does anyone know if NX runs applications using the local user's credentials, or under its own? The folder where they want to store the application is only accessible to specific user list.
EDIT: looking at the last reply, I think network permissions are the issue.
>>>> Error code 3600041 caught in file "O:\ugnx755\ip4\src\syss\shar\ind\sys.c" at line number 1308
>>>> Error code 3600041 caught in file "O:\ugnx755\ip4\src\partmodl\no\ind\ufexit_ruf.c" at line number 609
>>>> Error code 3600041 successfully handled and acknowledged
&MACRO MESSAGE_BOX -2 Error in external library. See system log for details
&MACRO MESSAGE_TEXT File name: L:\[redacated]\TubeDrawing.dll
&MACRO MESSAGE_TEXT Function name: ufusr
Caught exception while running: GetUnloadOption
System.TypeInitializationException: The type initializer for 'TubeDrawing.TubeDrawing' threw an exception. ---> System.IO.FileLoadException: Could not load file or assembly 'NXOpen, Version=126.96.36.199, Culture=neutral, PublicKeyToken=null' or one of its depen
dencies. An error relating to security occurred. (Exception from HRESULT: 0x8013150A)
File name: 'NXOpen, Version=188.8.131.52, Culture=neutral, PublicKeyToken=null' ---> System.Security.SecurityException: Request for the permission of type 'System.Security.Permissions.SecurityPermission, mscorlib, Version=184.108.40.206, Culture=neutral, PublicKeyToke
at ManagedLoader.JAM_lprintf(String s)
at System.Diagnostics.TraceInternal.WriteLine(String message)
at ManagedLoader.AssemblyResolveHandler(Object sender, ResolveEventArgs args)
at System.AppDomain.OnAssemblyResolveEvent(String assemblyFullName)
The action that failed was:
The type of the first permission that failed was:
The first permission that failed was:
The demand was for:
The granted set of the failing assembly was:
Read="L:\Engrg\Ops\25 I&C Common-Export Controlled\Functional Teams\DEF-MOL(Westerkamm)\Design\Tools\"
PathDiscovery="L:\Engrg\Ops\25 I&C Common-Export Controlled\Functional Teams\DEF-MOL(Westerkamm)\Design\Tools\"/>
Flags="Assertion, Execution, BindingRedirects"/>
<IPermission class="System.Security.Permissions.UIPermission, mscorlib, Version=220.127.116.11, Culture=neutral, PublicKeyToken=b77a5c561934e089"
Url="file:///L:/Engrg/Ops/25 I&C Common-Export Controlled/Functional Teams/DEF-MOL(Westerkamm)/Design/Tools/TubeDrawing
<IPermission class="System.Net.DnsPermission, System, Version=18.104.22.168, Culture=neutral, PublicKeyToken=b77a5c561934e089"
<IPermission class="System.Drawing.Printing.PrintingPermission, System.Drawing, Version=22.214.171.124, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
The assembly or AppDomain that failed was:
TubeDrawing, Version=1.0.5388.21575, Culture=neutral, PublicKeyToken=null
The Zone of the assembly that failed was:
The Url of the assembly that failed was:
JimB - Thanks for response. From looking at my error log and the discussion you linked me, it seems like the only option is to distribute the .dll to the users and have them run it locally until we upgrade to NX9. Does my thinking seem correct?
If you do not want to set the local intranet security permissions as described by Steve Labout in the second post of the thread I referenced, then yes, copying the .dll local to the machine is the only option.
Setting the security permissions is not an option - we can't get admin access to our local machines, and I'm pretty sure that even if we could, the change would violate the company's security policy. Local files it is.
Thanks for your help.