Open Security NET Framework to run application from Network

Posted by Cereal Friday, November 30, 2007 6:00:00 AM Categories: _Tous les articles _Tous les articles Windows 2003 Windows XP
Rate this Content 0 Votes

References
http://msdn2.microsoft.com/en-us/library/aa302354.aspx

Error returned by application that are run from network


 

You receive a System.Security.SecurityException error message when you run application .NET from a UNC or a mapped share folder.

Consultez la fin de ce message pour plus de détails sur l'appel du débogage

juste-à-temps (JIT) à la place de cette boîte de dialogue.

 ************** Texte de l'exception **************

System.Security.SecurityException: Échec de la demande.

   à System.Security.CodeAccessSecurityEngine.ThrowSecurityException(Assembly asm, PermissionSet granted, PermissionSet refused, RuntimeMethodHandle rmh, SecurityAction action, Object demand, IPermission permThatFailed)

   à System.Security.CodeAccessSecurityEngine.ThrowSecurityException(Object assemblyOrString, PermissionSet granted, PermissionSet refused, RuntimeMethodHandle rmh, SecurityAction action, Object demand, IPermission permThatFailed)

   à System.Security.CodeAccessSecurityEngine.CheckSetHelper(PermissionSet grants, PermissionSet refused, PermissionSet demands, RuntimeMethodHandle rmh, Object assemblyOrString, SecurityAction action, Boolean throwException)

   à System.Security.CodeAccessSecurityEngine.CheckSetHelper(CompressedStack cs, PermissionSet grants, PermissionSet refused, PermissionSet demands, RuntimeMethodHandle rmh, Assembly asm, SecurityAction action)

   à RunInNewThread.fMain.fMain_Load(Object sender, EventArgs e)

   à System.EventHandler.Invoke(Object sender, EventArgs e)

   à System.Windows.Forms.Form.OnLoad(EventArgs e)

   à System.Windows.Forms.Form.OnCreateControl()

   à System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)

   à System.Windows.Forms.Control.CreateControl()

   à System.Windows.Forms.Control.WmShowWindow(Message& m)

   à System.Windows.Forms.Control.WndProc(Message& m)

   à System.Windows.Forms.ScrollableControl.WndProc(Message& m)

   à System.Windows.Forms.ContainerControl.WndProc(Message& m)

   à System.Windows.Forms.Form.WmShowWindow(Message& m)

   à System.Windows.Forms.Form.WndProc(Message& m)

   à System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)

   à System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)

   à System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

L'action qui a échoué était :

LinkDemand

Le type de la première autorisation qui a échoué était :

System.Security.PermissionSet

La zone de l'assembly qui a échoué était :

Intranet


How open the .NET Framework to run a application from Network

  1. Open the “Microsoft .NET Framework 2.0 Configuration” tool.
  2. In the Microsoft .NET Framework Configuration tool, open the Runtime Security Policy node.
  3. Open the Enterprise policy node.
  4. Open the Code Groups folder.
  5. Right-click the All_Code code group and select properties option.
  6. On the General tab, select Policy levels below this level will not be evaluated to make this code group a LevelFinal code group, preventing evaluation of the machine and user policy if this code group applies.

 How create a .security deployment package

  1. Right-click the Runtime Security Policy node.
  2. Select the Create Deployment Package wizard, and use it to create a deployment package of the Enterprise policy level.
  3. Deploy the .msi file using either Group Policy or your network deployment tool

Run MSI from command line
msiexec /package EnterpriseNetFrameworkPolicy.msi /quiet

 

Simple-Tech.info
Comments are closed on this post.
Site Map | Printable View | © 2008 - 2012 Simple-Tech.info | Powered by mojoPortal | HTML 5 | CSS | Design by mitchinson