none
Security Exception with MPI .NET RRS feed

  • Question

  • Hi Everybody,

    I’m preparing a short presentation for the Portuguese TechDays 2008. I wanted to quickly develop an application in MPI .NET and submit it as a job under HPC Server 2008 to show how easy it is.

    Everything is fine until the point of job submission. The application works good when I execute it with MPIEXEC, but when submitted as a job it is giving me the following exception:

    Unhandled Exception: System.Security.SecurityException: That assembly does not allow partially trusted callers.
    at System.Security.CodeAccessSecurityEngine.ThrowSecurityException(Assembly asm, PermissionSet granted, PermissionSet refused, RuntimeMethodHandle rmh, SecurityAction action, Object demand, IPermission permThatFailed)
    at MPINET.Program.Main(String[] args)
    The action that failed was:
    LinkDemand
    The assembly or AppDomain that failed was:
    MPINET, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
    The Zone of the assembly that failed was:
    Internet
    The Url of the assembly that failed was:
    file://WIN-2FIINLOSE3F/Users/Public/HelloWorld/mpinet.exe

    Can someone suggest a solution?


    Monday, March 10, 2008 5:28 PM

Answers

All replies

  • I'm guessing, but in the command-line you are specifying to launch your mpi.net app, are you using a network share?  if so, .NET may be trying to download any support code (.DLLs) from the network, which has different security restrictions than retrieving from local hard disk.

     

    I would suggest the following:

     

    1. if you are using a network share, deploy app locally to hard disk of each compute node (I typically use C:\Apps for all deployment) and try again.

     

    2. or, remote desktop into one of the compute nodes and type the command-line you are using when you submit the job.  Does it run?  Same error?

     

    3. post again with your command-line so we can see what you are trying to do.

     

    Good luck!

     

      - joe

    Wednesday, March 12, 2008 4:09 PM
  •  

     

    Hi,

     

    If this is for a demo and the environment is fully trusted, you can do this:

     

    C:\WINDOWS\Microsoft.NET\Framework64\v2.0.50727\caspol.exe  -q -m -ag 1.2 -url " file://WIN-2FIINLOSE3F/Users/Public/HelloWorld/*" FullTrust

     

     

    However, there are a number sublteties involved wrt security (inter vs intranet, 32 vs 64, etc) that for a real world environment, you should read the material listed below:

     

    http://blogs.msdn.com/shawnfa/archive/2004/12/30/344554.aspx

     

     

    http://msdn2.microsoft.com/en-us/library/cb6t8dtz(VS.80).aspx

     

     

    [extraced from Mark's reply]

     

     

    Monday, March 17, 2008 8:44 PM