Re: [NAnt-users] Launching Nant From Local Network
I've tried but still failled. But you talk about .NET Wizzards 1.1, and I'm working on .NET 2.0. Are they compatible? Olivier. angus.grant wrote: I think this comes down to .NET Framework security permissions. By default, .NET refuses to run executables from network shares. One quick way I have found is to go to Administrative Tools, and select the Microsoft .NET Framework 1.1 Wizards. There is a choice there to Trust an assembly. You can then navigate to the network share that nAnt is located on. I am sure Googling for running .NET executables from a network share will result in a few results as well. Hope this starts you on the road to a solution! Angus. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of olivier.france Sent: Monday, 28 August 2006 5:39 PM To: nant-users@lists.sourceforge.net Subject: Re: [NAnt-users] Launching Nant From Local Network Ok, but still have troubles: configSections section name=nant type=NAnt.Core.ConfigurationSection, NAnt.Core requirePermission=false/ section name=log4net type=System.Configuration.IgnoreSectionHandler requirePermission=false/ /configSections I still have errors: System.Security.SecurityException: Request failed. at System.Security.CodeAccessSecurityEngine.ThrowSecurityExceptio n(Assembly a sm, PermissionSet granted, PermissionSet refused, RuntimeMethodHandle rmh, Secur ityAction action, Object demand, IPermission permThatFailed) at System.Security.CodeAccessSecurityEngine.ThrowSecurityException(Object ass emblyOrString, PermissionSet granted, PermissionSet refused, RuntimeMethodHandle rmh, SecurityAction action, Object demand, IPermission permThatFailed) at System.Security.CodeAccessSecurityEngine.CheckSetHelper(PermissionSet gran ts, PermissionSet refused, PermissionSet demands, RuntimeMethodHandle rmh, Objec t assemblyOrString, SecurityAction action, Boolean throwException) at System.Security.CodeAccessSecurityEngine.CheckSetHelper(Compre ssedStack cs , PermissionSet grants, PermissionSet refused, PermissionSet demands, RuntimeMet hodHandle rmh, Assembly asm, SecurityAction action) at log4net.Config.XmlConfigurator.ConfigureAndWatchHandler..ctor( ILoggerRepos itory repository, FileInfo configFile) at log4net.Config.XmlConfigurator.ConfigureAndWatch(ILoggerRepository reposit ory, FileInfo configFile) The action that failed was: LinkDemand The type of the first permission that failed was: System.Security.PermissionSet The Zone of the assembly that failed was: Intranet Unhandled Exception: System.Security.SecurityException: Request for the permissi on of type 'System.Security.Permissions.SecurityPermission, mscorlib, Version=2. 0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed. at System.Security.CodeAccessSecurityEngine.ThrowSecurityExceptio n(Assembly a sm, PermissionSet granted, PermissionSet refused, RuntimeMethodHandle rmh, Secur ityAction action, Object demand, IPermission permThatFailed) at System.Security.CodeAccessSecurityEngine.ThrowSecurityException(Object ass emblyOrString, PermissionSet granted, PermissionSet refused, RuntimeMethodHandle rmh, SecurityAction action, Object demand, IPermission permThatFailed) at System.Security.CodeAccessSecurityEngine.CheckSetHelper(PermissionSet gran ts, PermissionSet refused, PermissionSet demands, RuntimeMethodHandle rmh, Objec t assemblyOrString, SecurityAction action, Boolean throwException) at System.Security.CodeAccessSecurityEngine.CheckSetHelper(Compre ssedStack cs , PermissionSet grants, PermissionSet refused, PermissionSet demands, RuntimeMet hodHandle rmh, Assembly asm, SecurityAction action) at NAnt.Console.ConsoleStub.HelperArguments.CallConsoleRunner() at System.AppDomain.DoCallBack(CrossAppDomainDelegate callBackDelegate) at NAnt.Console.ConsoleStub.Main(String[] args) The action that failed was: LinkDemand 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, Ve rsion=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 version=1 Flags=ControlAppDomain/ The demand was for: PermissionSet class=System.Security.PermissionSet version=1 IPermission class=System.Security.Permissions.SecurityPermission, mscorlib, Ve rsion=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 version=1 Flags=ControlAppDomain/ /PermissionSet 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
Re: [NAnt-users] Launching Nant From Local Network
Hmm, missed the 2.0 Framework reference. The problem you are striking is to do with CAS (code access security), which should help with searching. OK, go to Administrative Tools, and select Microsoft .NET Framework 2.0 Configuration Then select Runtime Security Policy from the nav tree. My guess is the Increase assembly trust choice. However, this is not best practice. MS suggests string-naming assemblies and adding an entry to machines .NET configuration to trust any assemblies with that strong-named key. Link: http://blogs.msdn.com/shawnfa/archive/2003/06/20/57023.aspx which links to MS page: http://msdn.microsoft.com/msdnmag/issues/01/02/CAS/default.aspx This is a nicer solution as any executable or assembly you publish to network shares would then execute properly without any more config changes. But lot of work because you have to configure each machine to trust the strong name. You may be able to do this with global policies, but not sure. They also make mention of analysing your assembly and trying to limit operations that need permissions. Anyway, have a look at the links mentioned above. Thanks, Angus. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of olivier.france Sent: Tuesday, 5 September 2006 7:51 PM To: nant-users@lists.sourceforge.net Subject: Re: [NAnt-users] Launching Nant From Local Network I've tried but still failled. But you talk about .NET Wizzards 1.1, and I'm working on .NET 2.0. Are they compatible? Olivier. angus.grant wrote: I think this comes down to .NET Framework security permissions. By default, .NET refuses to run executables from network shares. One quick way I have found is to go to Administrative Tools, and select the Microsoft .NET Framework 1.1 Wizards. There is a choice there to Trust an assembly. You can then navigate to the network share that nAnt is located on. I am sure Googling for running .NET executables from a network share will result in a few results as well. Hope this starts you on the road to a solution! Angus. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of olivier.france Sent: Monday, 28 August 2006 5:39 PM To: nant-users@lists.sourceforge.net Subject: Re: [NAnt-users] Launching Nant From Local Network Ok, but still have troubles: configSections section name=nant type=NAnt.Core.ConfigurationSection, NAnt.Core requirePermission=false/ section name=log4net type=System.Configuration.IgnoreSectionHandler requirePermission=false/ /configSections I still have errors: System.Security.SecurityException: Request failed. at System.Security.CodeAccessSecurityEngine.ThrowSecurityExceptio n(Assembly a sm, PermissionSet granted, PermissionSet refused, RuntimeMethodHandle rmh, Secur ityAction action, Object demand, IPermission permThatFailed) at System.Security.CodeAccessSecurityEngine.ThrowSecurityException(Objec t ass emblyOrString, PermissionSet granted, PermissionSet refused, RuntimeMethodHandle rmh, SecurityAction action, Object demand, IPermission permThatFailed) at System.Security.CodeAccessSecurityEngine.CheckSetHelper(PermissionSet gran ts, PermissionSet refused, PermissionSet demands, RuntimeMethodHandle rmh, Objec t assemblyOrString, SecurityAction action, Boolean throwException) at System.Security.CodeAccessSecurityEngine.CheckSetHelper(Compre ssedStack cs , PermissionSet grants, PermissionSet refused, PermissionSet demands, RuntimeMet hodHandle rmh, Assembly asm, SecurityAction action) at log4net.Config.XmlConfigurator.ConfigureAndWatchHandler..ctor( ILoggerRepos itory repository, FileInfo configFile) at log4net.Config.XmlConfigurator.ConfigureAndWatch(ILoggerRepository reposit ory, FileInfo configFile) The action that failed was: LinkDemand The type of the first permission that failed was: System.Security.PermissionSet The Zone of the assembly that failed was: Intranet Unhandled Exception: System.Security.SecurityException: Request for the permissi on of type 'System.Security.Permissions.SecurityPermission, mscorlib, Version=2. 0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed. at System.Security.CodeAccessSecurityEngine.ThrowSecurityExceptio n(Assembly a sm, PermissionSet granted, PermissionSet refused, RuntimeMethodHandle rmh, Secur ityAction action, Object demand, IPermission permThatFailed) at System.Security.CodeAccessSecurityEngine.ThrowSecurityException(Objec t ass emblyOrString, PermissionSet granted, PermissionSet refused, RuntimeMethodHandle rmh, SecurityAction action, Object demand, IPermission permThatFailed) at System.Security.CodeAccessSecurityEngine.CheckSetHelper(PermissionSet gran ts, PermissionSet refused
Re: [NAnt-users] Launching Nant From Local Network
Ok, but still have troubles: configSections section name=nant type=NAnt.Core.ConfigurationSection, NAnt.Core requirePermission=false/ section name=log4net type=System.Configuration.IgnoreSectionHandler requirePermission=false/ /configSections I still have errors: System.Security.SecurityException: Request failed. at System.Security.CodeAccessSecurityEngine.ThrowSecurityException(Assembly a sm, PermissionSet granted, PermissionSet refused, RuntimeMethodHandle rmh, Secur ityAction action, Object demand, IPermission permThatFailed) at System.Security.CodeAccessSecurityEngine.ThrowSecurityException(Object ass emblyOrString, PermissionSet granted, PermissionSet refused, RuntimeMethodHandle rmh, SecurityAction action, Object demand, IPermission permThatFailed) at System.Security.CodeAccessSecurityEngine.CheckSetHelper(PermissionSet gran ts, PermissionSet refused, PermissionSet demands, RuntimeMethodHandle rmh, Objec t assemblyOrString, SecurityAction action, Boolean throwException) at System.Security.CodeAccessSecurityEngine.CheckSetHelper(CompressedStack cs , PermissionSet grants, PermissionSet refused, PermissionSet demands, RuntimeMet hodHandle rmh, Assembly asm, SecurityAction action) at log4net.Config.XmlConfigurator.ConfigureAndWatchHandler..ctor(ILoggerRepos itory repository, FileInfo configFile) at log4net.Config.XmlConfigurator.ConfigureAndWatch(ILoggerRepository reposit ory, FileInfo configFile) The action that failed was: LinkDemand The type of the first permission that failed was: System.Security.PermissionSet The Zone of the assembly that failed was: Intranet Unhandled Exception: System.Security.SecurityException: Request for the permissi on of type 'System.Security.Permissions.SecurityPermission, mscorlib, Version=2. 0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed. at System.Security.CodeAccessSecurityEngine.ThrowSecurityException(Assembly a sm, PermissionSet granted, PermissionSet refused, RuntimeMethodHandle rmh, Secur ityAction action, Object demand, IPermission permThatFailed) at System.Security.CodeAccessSecurityEngine.ThrowSecurityException(Object ass emblyOrString, PermissionSet granted, PermissionSet refused, RuntimeMethodHandle rmh, SecurityAction action, Object demand, IPermission permThatFailed) at System.Security.CodeAccessSecurityEngine.CheckSetHelper(PermissionSet gran ts, PermissionSet refused, PermissionSet demands, RuntimeMethodHandle rmh, Objec t assemblyOrString, SecurityAction action, Boolean throwException) at System.Security.CodeAccessSecurityEngine.CheckSetHelper(CompressedStack cs , PermissionSet grants, PermissionSet refused, PermissionSet demands, RuntimeMet hodHandle rmh, Assembly asm, SecurityAction action) at NAnt.Console.ConsoleStub.HelperArguments.CallConsoleRunner() at System.AppDomain.DoCallBack(CrossAppDomainDelegate callBackDelegate) at NAnt.Console.ConsoleStub.Main(String[] args) The action that failed was: LinkDemand 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, Ve rsion=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 version=1 Flags=ControlAppDomain/ The demand was for: PermissionSet class=System.Security.PermissionSet version=1 IPermission class=System.Security.Permissions.SecurityPermission, mscorlib, Ve rsion=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 version=1 Flags=ControlAppDomain/ /PermissionSet 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, Vers ion=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 version=1 Read=J:\Olivier\THIRDPARTY_REL-R2.2.0\THIRDPARTY_REL\bin\NAnt0.85\bin\ PathDiscovery=J:\Olivier\THIRDPARTY_REL-R2.2.0\THIRDPARTY_REL\bin\NAnt0.85\bin\ / IPermission class=System.Security.Permissions.IsolatedStorageFilePermission, m scorlib, 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, Ve rsion=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 version=1 Flags=Assertion, Execution, BindingRedirects/ IPermission
Re: [NAnt-users] Launching Nant From Local Network
I think this comes down to .NET Framework security permissions. By default, .NET refuses to run executables from network shares. One quick way I have found is to go to Administrative Tools, and select the Microsoft .NET Framework 1.1 Wizards. There is a choice there to Trust an assembly. You can then navigate to the network share that nAnt is located on. I am sure Googling for running .NET executables from a network share will result in a few results as well. Hope this starts you on the road to a solution! Angus. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of olivier.france Sent: Monday, 28 August 2006 5:39 PM To: nant-users@lists.sourceforge.net Subject: Re: [NAnt-users] Launching Nant From Local Network Ok, but still have troubles: configSections section name=nant type=NAnt.Core.ConfigurationSection, NAnt.Core requirePermission=false/ section name=log4net type=System.Configuration.IgnoreSectionHandler requirePermission=false/ /configSections I still have errors: System.Security.SecurityException: Request failed. at System.Security.CodeAccessSecurityEngine.ThrowSecurityExceptio n(Assembly a sm, PermissionSet granted, PermissionSet refused, RuntimeMethodHandle rmh, Secur ityAction action, Object demand, IPermission permThatFailed) at System.Security.CodeAccessSecurityEngine.ThrowSecurityException(Object ass emblyOrString, PermissionSet granted, PermissionSet refused, RuntimeMethodHandle rmh, SecurityAction action, Object demand, IPermission permThatFailed) at System.Security.CodeAccessSecurityEngine.CheckSetHelper(PermissionSet gran ts, PermissionSet refused, PermissionSet demands, RuntimeMethodHandle rmh, Objec t assemblyOrString, SecurityAction action, Boolean throwException) at System.Security.CodeAccessSecurityEngine.CheckSetHelper(Compre ssedStack cs , PermissionSet grants, PermissionSet refused, PermissionSet demands, RuntimeMet hodHandle rmh, Assembly asm, SecurityAction action) at log4net.Config.XmlConfigurator.ConfigureAndWatchHandler..ctor( ILoggerRepos itory repository, FileInfo configFile) at log4net.Config.XmlConfigurator.ConfigureAndWatch(ILoggerRepository reposit ory, FileInfo configFile) The action that failed was: LinkDemand The type of the first permission that failed was: System.Security.PermissionSet The Zone of the assembly that failed was: Intranet Unhandled Exception: System.Security.SecurityException: Request for the permissi on of type 'System.Security.Permissions.SecurityPermission, mscorlib, Version=2. 0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed. at System.Security.CodeAccessSecurityEngine.ThrowSecurityExceptio n(Assembly a sm, PermissionSet granted, PermissionSet refused, RuntimeMethodHandle rmh, Secur ityAction action, Object demand, IPermission permThatFailed) at System.Security.CodeAccessSecurityEngine.ThrowSecurityException(Object ass emblyOrString, PermissionSet granted, PermissionSet refused, RuntimeMethodHandle rmh, SecurityAction action, Object demand, IPermission permThatFailed) at System.Security.CodeAccessSecurityEngine.CheckSetHelper(PermissionSet gran ts, PermissionSet refused, PermissionSet demands, RuntimeMethodHandle rmh, Objec t assemblyOrString, SecurityAction action, Boolean throwException) at System.Security.CodeAccessSecurityEngine.CheckSetHelper(Compre ssedStack cs , PermissionSet grants, PermissionSet refused, PermissionSet demands, RuntimeMet hodHandle rmh, Assembly asm, SecurityAction action) at NAnt.Console.ConsoleStub.HelperArguments.CallConsoleRunner() at System.AppDomain.DoCallBack(CrossAppDomainDelegate callBackDelegate) at NAnt.Console.ConsoleStub.Main(String[] args) The action that failed was: LinkDemand 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, Ve rsion=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 version=1 Flags=ControlAppDomain/ The demand was for: PermissionSet class=System.Security.PermissionSet version=1 IPermission class=System.Security.Permissions.SecurityPermission, mscorlib, Ve rsion=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 version=1 Flags=ControlAppDomain/ /PermissionSet 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
Re: [NAnt-users] Launching Nant From Local Network
Camus, Olivier wrote: ... Now, I have to deploy it on Windows Local Network in order to make it usable by all teams members. When we reference Nant.exe from network, it failled (cf end of email): Either we cannot launch Nant from local network ? Nor I have to setup a configuration to allow Nant to be performed from local network? Notice that on local disk, it works fine: I'm far from a .Net security expert, but I know that tricky issues often crop up with remote execution. But in this case, it seems to me that: /.../ /Unhandled Exception: System.Security.SecurityException: Request for ConfigurationPermission failed while attempting to access configuration section 'nant'. To allow all callers to access the data for this section, set section attribute 'requirePermission' equal 'false' in the configuration file where this section is declared. ---/ is telling you exactly what to do. I don't know whether it would be safe for NAnt to ship with that set, but you shouldn't be bothered by having to change it yourself. Gary - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642 ___ NAnt-users mailing list NAnt-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nant-users
Re: [NAnt-users] Launching Nant From Local Network
Ok, but how to define this attribut in which section? Shall I do it in the .build file, or in a config file in ant installation directory? Thanks, Olivier. Gary Feldman-5 wrote: Camus, Olivier wrote: ... Now, I have to deploy it on Windows Local Network in order to make it usable by all teams members. When we reference Nant.exe from network, it failled (cf end of email): Either we cannot launch Nant from local network ? Nor I have to setup a configuration to allow Nant to be performed from local network? Notice that on local disk, it works fine: I'm far from a .Net security expert, but I know that tricky issues often crop up with remote execution. But in this case, it seems to me that: /.../ /Unhandled Exception: System.Security.SecurityException: Request for ConfigurationPermission failed while attempting to access configuration section 'nant'. To allow all callers to access the data for this section, set section attribute 'requirePermission' equal 'false' in the configuration file where this section is declared. ---/ is telling you exactly what to do. I don't know whether it would be safe for NAnt to ship with that set, but you shouldn't be bothered by having to change it yourself. Gary - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642 ___ NAnt-users mailing list NAnt-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nant-users -- View this message in context: http://www.nabble.com/Launching-Nant-From-Local-Network-tf2164789.html#a5986161 Sent from the NAnt - Users forum at Nabble.com. - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642 ___ NAnt-users mailing list NAnt-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nant-users
Re: [NAnt-users] Launching Nant From Local Network
olivier.france wrote: Ok, but how to define this attribut in which section? Shall I do it in the .build file, or in a config file in ant installation directory? Ah, you must be relatively new to .Net programming. In .Net, programs almost always have a configuration file associated with them, in the same directory. In this case, you should look for a file named NAnt.exe.config, in the same directory as NAnt.exe. Near the top of this file you should see an entry that looks like section name=nant type=... / Add the following before the closing / requirePermission=false so that it will look something like section name=nant type=... requirePermission=false / You probably have to do the same thing for the log4net section immediately thereafter. A quick web search for .net configuration file requirePermission turned up quite a few hits with this problem relating to log4net. Gary - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642 ___ NAnt-users mailing list NAnt-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nant-users