winforms - .NET application fails to run from Network Share and RDP Shell -


i'm trying run .net application, resides in network share our domain, using rdp client.

when starting "full" rdp session (that is, opening whole desktop) , running application .exe file, works fine.

but when set same .exe startup application path rdp client , following error:

(ps: clipped stack trace calls found myself more important)

system.typeinitializationexception: type initializer 'nhibernate.cfg.environment' threw exception. ---> system.argumentexception: incorrect parameter. (exception hresult: 0x80070057 (e_invalidarg))    @ system.security.policy.pefileevidencefactory.getlocationevidence(safepefilehandle pefile, securityzone& zone, stringhandleonstack returl)    (...)    @ system.appdomain.get_evidence()    (...)    @ system.configuration.configurationmanager.getsection(string sectionname)    @ nhibernate.cfg.environment.loadglobalpropertiesfromappconfig() in p:\nhibernate-core\src\nhibernate\cfg\environment.cs:line 212    @ nhibernate.cfg.environment..cctor() in p:\nhibernate-core\src\nhibernate\cfg\environment.cs:line 198 

as work shadow-copied files, set new appdomain when application has begun (the .exe entry point):

<stathread()> public sub main()     try         dim currentdirectory directoryinfo = new directoryinfo(directory.getcurrentdirectory)         dim runtimedirectory directoryinfo = new fileinfo(assembly.getexecutingassembly.location).directory          dim appdomainstartupsetup new appdomainsetup         appdomainstartupsetup.applicationbase = currentdirectory.fullname         appdomainstartupsetup.shadowcopyfiles = "true"          dim appdomainstartup appdomain = appdomain.createdomain("startupappdomain", nothing, appdomainstartupsetup)         dim entrypointloader loadbasefiles = appdomainstartup.createinstancefromandunwrap(assembly.getexecutingassembly.codebase, "myclass.loadbasefiles")         entrypointloader.runtimedir = runtimedirectory.fullname ' setup 'entry-point' object          entrypointloader.startupentrypoint() ' starts application      catch ex exception         ' error handling here     end try end sub  public class loadbasefiles     inherits marshalbyrefobject      ' startup stuff here...  end class 

more info

edit:

  • if copy assemblies local drive (c:) , run application there, work fine.

any advices?

it looks you're missing argument or pointing unavailable resource.

a) working directory set application?

b) working directory available user on login?


Comments

Popular posts from this blog

linux - xterm copying to CLIPBOARD using copy-selection causes automatic updating of CLIPBOARD upon mouse selection -

c++ - qgraphicsview horizontal scrolling always has a vertical delta -