#768 Cannot run 0.91 Beta 1

0.91-beta1
closed
Core (183)
5
2014-09-25
2011-09-29
rstackhouse
No

When I try to run NAnt 0.91 Beta 1, I get an error that looks similar to the one at https://sourceforge.net/tracker/index.php?func=detail&aid=3383872&group_id=31650&atid=402868

C:\>nant
log4net:ERROR XmlConfiguratorAttribute: Exception getting ConfigurationFileLocat
ion. Must be able to resolve ConfigurationFileLocation when ConfigFile and Confi
gFileExtension properties are not set.
System.Security.SecurityException: Request for the permission of type 'System.Se
curity.Permissions.FileIOPermission, mscorlib, Version=4.0.0.0, Culture=neutral,
PublicKeyToken=b77a5c561934e089' failed.
at System.Security.CodeAccessSecurityEngine.Check(Object demand, StackCrawlMa
rk& stackMark, Boolean isPermSet)
at System.Security.CodeAccessSecurityEngine.Check(CodeAccessPermission cap, S
tackCrawlMark& stackMark)
at System.Security.CodeAccessPermission.Demand()
at System.AppDomainSetup.VerifyDir(String dir, Boolean normalize)
at log4net.Util.SystemInfo.get_ConfigurationFileLocation()
at log4net.Config.XmlConfiguratorAttribute.ConfigureFromFile(Assembly sourceA
ssembly, ILoggerRepository targetRepository)
The action that failed was:
Demand
The type of the first permission that failed was:
System.Security.Permissions.FileIOPermission
The Zone of the assembly that failed was:
Internet

Unhandled Exception: System.Security.SecurityException: Request for Configuratio
nPermission failed while attempting to access configuration section 'nant'. To a
llow all callers to access the data for this section, set section attribute 'req
uirePermission' equal 'false' in the configuration file where this section is de
clared. ---> System.Security.SecurityException: Request for the permission of ty
pe 'System.Configuration.ConfigurationPermission, System.Configuration, Version=
4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' failed.
at System.Security.CodeAccessSecurityEngine.Check(Object demand, StackCrawlMa
rk& stackMark, Boolean isPermSet)
at System.Security.CodeAccessSecurityEngine.Check(CodeAccessPermission cap, S
tackCrawlMark& stackMark)
at System.Security.CodeAccessPermission.Demand()
at System.Configuration.BaseConfigurationRecord.CheckPermissionAllowed(String
configKey, Boolean requirePermission, Boolean isTrustedWithoutAptca)
--- End of inner exception stack trace ---
at System.Configuration.BaseConfigurationRecord.CheckPermissionAllowed(String
configKey, Boolean requirePermission, Boolean isTrustedWithoutAptca)
at System.Configuration.BaseConfigurationRecord.GetSectionRecursive(String co
nfigKey, Boolean getLkg, Boolean checkPermission, Boolean getRuntimeObject, Bool
ean requestIsHere, Object& result, Object& resultRuntimeObject)
at System.Configuration.BaseConfigurationRecord.GetSection(String configKey)
at System.Configuration.ClientConfigurationSystem.System.Configuration.Intern
al.IInternalConfigSystem.GetSection(String sectionName)
at System.Configuration.ConfigurationManager.GetSection(String sectionName)
at NAnt.Console.ConsoleStub.Framework.GetRuntimeFramework()
at NAnt.Console.ConsoleStub.Main(String[] args)

Discussion

  • Ryan Boggs

    Ryan Boggs - 2011-09-29

    Thanks for providing this level of detail. I will look into this shortly.

     
  • Ryan Boggs

    Ryan Boggs - 2011-09-29
    • labels: --> Core
    • assigned_to: nobody --> rmboggs
     
  • rstackhouse

    rstackhouse - 2011-09-29

    I forgot to mention I'm running 64 bit Windows 7. Don't know if that makes a difference or not.

     
  • Ryan Boggs

    Ryan Boggs - 2011-09-29

    If you can please do me a favor, in the NAnt.exe.config file in the configSections, add 'requirePermissions="False" to both the nant and log4net sections and see if that works.

    Posted on Pastebin for better visual:
    http://pastebin.com/wbmtBS8p

     
  • Stefan Bodewig

    Stefan Bodewig - 2011-09-30

    If you have downloaded the ZIP distribution, make sure you have unblocked the ZIP before extracting it (it's a button on the first tab of the property sheet for the ZIP). If you don't do that the DLLs will get blocked by the system as well.

     
  • rstackhouse

    rstackhouse - 2011-09-30

    Pushing the "Unblock" button got rid of the security error (nice catch BTW), but now it seems like it can't find mscorlib.dll in .NET 4.

     
  • rstackhouse

    rstackhouse - 2011-10-03

    The last error I got was due to a missing using statement. http://support.microsoft.com/kb/304656. One more lesson in "Select isn't broken."

     
  • Ryan Boggs

    Ryan Boggs - 2011-10-14
    • milestone: 1110230 --> 0.91-beta1
    • status: open --> closed
     
  • Ryan Boggs

    Ryan Boggs - 2011-10-14

    Closed since it looks like unblocking the zip file fixed the issue.

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks