cancel
Showing results for 
Search instead for 
Did you mean: 

Error executing NXOpen application from network drive

Creator
Creator

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.

 

(filepath)/TubeDrawing.dll

 

Function name: ufusr

 

Any ideas on where I should start looking for the bug or what could be causing the issues?

 

 

5 REPLIES

Re: Error executing NXOpen application from network drive

Siemens Phenom Siemens Phenom
Siemens Phenom

Andrew,

 

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.

 

Regards,

Jim

 

Re: Error executing NXOpen application from network drive

Creator
Creator

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 
&MACRO MESSAGE_TEXT  File name: L:\[redacated]\TubeDrawing.dll
&MACRO MESSAGE_TEXT 
&MACRO MESSAGE_TEXT  Function name: ufusr
&MACRO MESSAGE_TEXT 
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=7.5.5.4, Culture=neutral, PublicKeyToken=null' or one of its depen
dencies. An error relating to security occurred. (Exception from HRESULT: 0x8013150A)
File name: 'NXOpen, Version=7.5.5.4, Culture=neutral, PublicKeyToken=null' ---> System.Security.SecurityException: Request for the permission of type 'System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToke
n=b77a5c561934e089' failed.
   at System.StubHelpers.StubHelpers.BeginStandalone(IntPtr pFrame, IntPtr pNMD, Int32 dwStubFlags)
   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:
Demand
The type of the first permission that failed was:
System.Security.Permissions.SecurityPermission
The first permission that failed was:
<IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
version="1"
Flags="UnmanagedCode"/>

The demand was for:
<IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
version="1"
Flags="UnmanagedCode"/>

The granted set of the failing assembly was:
<PermissionSet class="System.Security.PermissionSet"
version="1">
<IPermission class="System.Security.Permissions.EnvironmentPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
version="1"
Read="USERNAME"/>
<IPermission class="System.Security.Permissions.FileDialogPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
version="1"
Unrestricted="true"/>
<IPermission class="System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
version="1"
Read="L:\Engrg\Ops\25 I&amp;C Common-Export Controlled\Functional Teams\DEF-MOL(Westerkamm)\Design\Tools\"
PathDiscovery="L:\Engrg\Ops\25 I&amp;C Common-Export Controlled\Functional Teams\DEF-MOL(Westerkamm)\Design\Tools\"/>
<IPermission class="System.Security.Permissions.IsolatedStorageFilePermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
version="1"
Allowed="AssemblyIsolationByUser"
UserQuota="9223372036854775807"
Expiry="9223372036854775807"
Permanent="True"/>
<IPermission class="System.Security.Permissions.ReflectionPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
version="1"
Flags="ReflectionEmit"/>
<IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
version="1"
Flags="Assertion, Execution, BindingRedirects"/>
<IPermission class="System.Security.Permissions.UIPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
version="1"
Unrestricted="true"/>
<IPermission class="System.Security.Permissions.UrlIdentityPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
version="1"
Url="file:///L:/Engrg/Ops/25 I&C Common-Export Controlled/Functional Teams/DEF-MOL(Westerkamm)/Design/Tools/TubeDrawing.DLL"/>
<IPermission class="System.Security.Permissions.ZoneIdentityPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
version="1"
Zone="Intranet"/>
<IPermission class="System.Net.DnsPermission, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
version="1"
Unrestricted="true"/>
<IPermission class="System.Drawing.Printing.PrintingPermission, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
version="1"
Level="DefaultPrinting"/>
</PermissionSet>

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:
Intranet
The Url of the assembly that failed was:
file:///L:/[redacted]TubeDrawing.DLL
   at TubeDrawing.TubeDrawing..cctor()

 

 

Re: Error executing NXOpen application from network drive

Creator
Creator

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?

Re: Error executing NXOpen application from network drive

Siemens Phenom Siemens Phenom
Siemens Phenom

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.

 

Regards,

Jim

Re: Error executing NXOpen application from network drive

Creator
Creator

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.