From: <ang...@wo...> - 2006-08-28 23:08:07
|
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: nan...@li...=20 > [mailto:nan...@li...] On Behalf=20 > Of olivier.france > Sent: Monday, 28 August 2006 5:39 PM > To: nan...@li... > Subject: Re: [NAnt-users] Launching Nant From Local Network >=20 >=20 > Ok, >=20 > but still have troubles: >=20 > <configSections> > <section name=3D"nant" type=3D"NAnt.Core.ConfigurationSection, > NAnt.Core"=20 > requirePermission=3D"false"/> > <section name=3D"log4net" > type=3D"System.Configuration.IgnoreSectionHandler"=20 > requirePermission=3D"false"/> > </configSections> >=20 > I still have errors: >=20 > System.Security.SecurityException: Request failed. > at > System.Security.CodeAccessSecurityEngine.ThrowSecurityExceptio > n(Assembly a sm, PermissionSet granted, PermissionSet=20 > refused, RuntimeMethodHandle rmh, Secur ityAction action,=20 > Object demand, IPermission permThatFailed) > at=20 > System.Security.CodeAccessSecurityEngine.ThrowSecurityException(Object > ass > emblyOrString, PermissionSet granted, PermissionSet refused,=20 > RuntimeMethodHandle rmh, SecurityAction action, Object=20 > demand, IPermission permThatFailed) > at=20 > System.Security.CodeAccessSecurityEngine.CheckSetHelper(PermissionSet > gran > ts, PermissionSet refused, PermissionSet demands,=20 > RuntimeMethodHandle rmh, Objec t assemblyOrString,=20 > SecurityAction action, Boolean throwException) > at > System.Security.CodeAccessSecurityEngine.CheckSetHelper(Compre > ssedStack cs , PermissionSet grants, PermissionSet refused,=20 > PermissionSet demands, RuntimeMet hodHandle rmh, Assembly=20 > asm, SecurityAction action) > at > log4net.Config.XmlConfigurator.ConfigureAndWatchHandler..ctor( > ILoggerRepos > itory repository, FileInfo configFile) > at=20 > 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 >=20 > Unhandled Exception: System.Security.SecurityException:=20 > Request for the permissi on of type=20 > 'System.Security.Permissions.SecurityPermission, mscorlib, = Version=3D2. > 0.0.0, Culture=3Dneutral, PublicKeyToken=3Db77a5c561934e089' failed. > at > System.Security.CodeAccessSecurityEngine.ThrowSecurityExceptio > n(Assembly a sm, PermissionSet granted, PermissionSet=20 > refused, RuntimeMethodHandle rmh, Secur ityAction action,=20 > Object demand, IPermission permThatFailed) > at=20 > System.Security.CodeAccessSecurityEngine.ThrowSecurityException(Object > ass > emblyOrString, PermissionSet granted, PermissionSet refused,=20 > RuntimeMethodHandle rmh, SecurityAction action, Object=20 > demand, IPermission permThatFailed) > at=20 > System.Security.CodeAccessSecurityEngine.CheckSetHelper(PermissionSet > gran > ts, PermissionSet refused, PermissionSet demands,=20 > RuntimeMethodHandle rmh, Objec t assemblyOrString,=20 > SecurityAction action, Boolean throwException) > at > System.Security.CodeAccessSecurityEngine.CheckSetHelper(Compre > ssedStack cs , PermissionSet grants, PermissionSet refused,=20 > PermissionSet demands, RuntimeMet hodHandle rmh, Assembly=20 > asm, SecurityAction action) > at NAnt.Console.ConsoleStub.HelperArguments.CallConsoleRunner() > at System.AppDomain.DoCallBack(CrossAppDomainDelegate=20 > callBackDelegate) > at NAnt.Console.ConsoleStub.Main(String[] args) The action=20 > 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=3D"System.Security.Permissions.SecurityPermission, > mscorlib, Ve > rsion=3D2.0.0.0, Culture=3Dneutral, PublicKeyToken=3Db77a5c561934e089" > version=3D"1" > Flags=3D"ControlAppDomain"/> >=20 > The demand was for: > <PermissionSet class=3D"System.Security.PermissionSet" > version=3D"1"> > <IPermission class=3D"System.Security.Permissions.SecurityPermission, > mscorlib, Ve > rsion=3D2.0.0.0, Culture=3Dneutral, PublicKeyToken=3Db77a5c561934e089" > version=3D"1" > Flags=3D"ControlAppDomain"/> > </PermissionSet> >=20 > The granted set of the failing assembly was: > <PermissionSet class=3D"System.Security.PermissionSet" > version=3D"1"> > <IPermission = class=3D"System.Security.Permissions.EnvironmentPermission, > mscorlib, > Version=3D2.0.0.0, Culture=3Dneutral, = PublicKeyToken=3Db77a5c561934e089" > version=3D"1" > Read=3D"USERNAME"/> > <IPermission = class=3D"System.Security.Permissions.FileDialogPermission, > mscorlib, > Version=3D2.0.0.0, Culture=3Dneutral, = PublicKeyToken=3Db77a5c561934e089" > version=3D"1" > Unrestricted=3D"true"/> > <IPermission=20 > class=3D"System.Security.Permissions.FileIOPermission,=20 > mscorlib, Vers ion=3D2.0.0.0, Culture=3Dneutral,=20 > PublicKeyToken=3Db77a5c561934e089" > version=3D"1" > Read=3D"J:\Olivier\THIRDPARTY_REL-R2.2.0\THIRDPARTY_REL\bin\NAnt 0.85\bin\" > PathDiscovery=3D"J:\Olivier\THIRDPARTY_REL-R2.2.0\THIRDPARTY_REL > \bin\NAnt0.85\bin\ > "/> > <IPermission > class=3D"System.Security.Permissions.IsolatedStorageFilePermissi > on, m scorlib, Version=3D2.0.0.0, Culture=3Dneutral,=20 > PublicKeyToken=3Db77a5c561934e089" > version=3D"1" > Allowed=3D"AssemblyIsolationByUser" > UserQuota=3D"9223372036854775807" > Expiry=3D"9223372036854775807" > Permanent=3D"True"/> > <IPermission = class=3D"System.Security.Permissions.ReflectionPermission, > mscorlib, > Version=3D2.0.0.0, Culture=3Dneutral, = PublicKeyToken=3Db77a5c561934e089" > version=3D"1" > Flags=3D"ReflectionEmit"/> > <IPermission class=3D"System.Security.Permissions.SecurityPermission, > mscorlib, Ve > rsion=3D2.0.0.0, Culture=3Dneutral, PublicKeyToken=3Db77a5c561934e089" > version=3D"1" > Flags=3D"Assertion, Execution, BindingRedirects"/> <IPermission=20 > class=3D"System.Security.Permissions.UIPermission, mscorlib,=20 > Version=3D 2.0.0.0, Culture=3Dneutral, = PublicKeyToken=3Db77a5c561934e089" > version=3D"1" > Unrestricted=3D"true"/> > <IPermission = class=3D"System.Security.Permissions.UrlIdentityPermission, > mscorlib, > Version=3D2.0.0.0, Culture=3Dneutral, = PublicKeyToken=3Db77a5c561934e089" > version=3D"1" > Url=3D"file:///J:/Olivier/THIRDPARTY_REL-R2.2.0/THIRDPARTY_REL/b in/NAnt0.85/bin/NA > nt.exe"/> > <IPermission=20 > class=3D"System.Security.Permissions.ZoneIdentityPermission, > mscorlib > , Version=3D2.0.0.0, Culture=3Dneutral, = PublicKeyToken=3Db77a5c561934e089" > version=3D"1" > Zone=3D"Intranet"/> > <IPermission class=3D"System.Net.DnsPermission, System,=20 > Version=3D2.0.0.0, Culture=3Dn eutral, = PublicKeyToken=3Db77a5c561934e089" > version=3D"1" > Unrestricted=3D"true"/> > <IPermission class=3D"System.Drawing.Printing.PrintingPermission, > System.Drawing, > Version=3D2.0.0.0, Culture=3Dneutral, = PublicKeyToken=3Db03f5f7f11d50a3a" > version=3D"1" > Level=3D"DefaultPrinting"/> > </PermissionSet> >=20 > The assembly or AppDomain that failed was: > NAnt, Version=3D0.85.2344.0, Culture=3Dneutral,=20 > PublicKeyToken=3Dnull The Zone of the assembly that failed was: > Intranet > The Url of the assembly that failed was: > file:///J:/Olivier/THIRDPARTY_REL-R2.2.0/THIRDPARTY_REL/bin/NA nt0.85/bin/NAnt.ex > e >=20 > NANT compilation done. >=20 >=20 > Gary Feldman-5 wrote: > >=20 > > 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=20 > >> installation directory? > >> > >> =20 > > Ah, you must be relatively new to .Net programming. In=20 > .Net, programs=20 > > almost always have a configuration file associated with=20 > them, in the=20 > > same directory. In this case, you should look for a file named=20 > > NAnt.exe.config, in the same directory as NAnt.exe. Near=20 > the top of=20 > > this file you should see an entry that looks like > >=20 > > <section name=3D"nant" type=3D"..." /> > >=20 > > Add the following before the closing /> > >=20 > > requirePermission=3D"false" > >=20 > > so that it will look something like > >=20 > > <section name=3D"nant" type=3D"..." requirePermission=3D"false" = /> > >=20 > > You probably have to do the same thing for the log4net section=20 > > immediately thereafter. A quick web search for ".net configuration=20 > > file requirePermission" turned up quite a few hits with=20 > this problem=20 > > relating to log4net. > >=20 > > Gary > >=20 > >=20 > >=20 > >=20 > ---------------------------------------------------------------------- > > --- Using Tomcat but need to do more? Need to support web services,=20 > > security? > > Get stuff done quickly with pre-integrated technology to=20 > make your job=20 > > easier Download IBM WebSphere Application Server v.1.0.1 based on=20 > > Apache Geronimo > >=20 > = http://sel.as-us.falkag.net/sel?cmd=3Dlnk&kid=3D120709&bid=3D263057&dat=3D= 1216 > > 42 _______________________________________________ > > NAnt-users mailing list > > NAn...@li... > > https://lists.sourceforge.net/lists/listinfo/nant-users > >=20 > >=20 >=20 > -- > View this message in context:=20 > http://www.nabble.com/Launching-Nant-From-Local-Network-tf2164 789.html#a6015747 > Sent from the NAnt - Users forum at Nabble.com. >=20 >=20 > -------------------------------------------------------------- > ----------- > Using Tomcat but need to do more? Need to support web=20 > services, security? > Get stuff done quickly with pre-integrated technology to make=20 > your job easier > Download IBM WebSphere Application Server v.1.0.1 based on=20 > Apache Geronimo > http://sel.as-us.falkag.net/sel?cmd=3Dlnk&kid=3D120709&bid=3D263057& dat=3D121642 > _______________________________________________ > NAnt-users mailing list > NAn...@li... > https://lists.sourceforge.net/lists/listinfo/nant-users >=20 |