VBNet Console App:Install EXE/DLL on Remote Server with No Admin Rights

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • nikib
    New Member
    • Jul 2008
    • 1

    VBNet Console App:Install EXE/DLL on Remote Server with No Admin Rights

    Hi,

    I am new in the forum and new in .Net. I've tried to search for answers on web to no avail.

    Can anybody help me with this problem?

    Is it possible to install a console app, that also has a reference to a class library, to a remote server where I don't have admin rights to? This is basically what I did.

    1. Run sn.exe and add strong names each for both console app and class library projects

    2. Build both console app (output: dummyapp.exe) and class library (output: dummylib.dll) with configuration set to "Active (Release)"

    3. Run .NET Framework Configuration to set Full Trust to both exe and dll.
    3.a) .NET Framework 2.0 Configuration --> My Computer --> Runtime Security Policy --> Machine --> Code Groups --> All_Code :
    3.b) Right Click and New "DummyApp_Zone" , Condition Type "Strong Name", Import "dummyapp.e xe", use permission set "FullTrust" . Do the same thing with "dummylib.d ll".

    4. Copy "dummyapp.e xe" and "dummylib.d ll" to the shared server (mapped drive) where I have read/write access to the directory.

    5. I was able to execute "dummyapp.e xe" in command prompt as expected.

    6. Another user who has same read/write access to the directory execute the "dummyapp.e xe" and had this error:

    Unhandled Exception: System.Security .SecurityExcept ion: That assembly does not a
    llow partially trusted callers.
    at System.Security .CodeAccessSecu rityEngine.Thro wSecurityExcept ion(Assembly a
    sm, PermissionSet granted, PermissionSet refused, RuntimeMethodHa ndle rmh, Secur
    ityAction action, Object demand, IPermission permThatFailed)
    at DummyApp.modDum myApp.Main()
    The action that failed was:
    LinkDemand
    The assembly or AppDomain that failed was:
    DummyApp, Version=1.0.0.0 , Culture=neutral , PublicKeyToken= e0672eda862ffc3 7
    The Zone of the assembly that failed was:
    Intranet
    The Url of the assembly that failed was:
    file:///J:/Bin/DummyApp.exe


    This application and the shared application server will be used within the company (no one can go in who is not employee) so I there is no need for limited security access.

    Is it possible to give full access to these objects so anybody can run them without getting the Security Exception error?

    Thanks in advance.

    Regards,
    Niki
Working...