Click here to Skip to main content
15,917,731 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
When Deploye web application using NAnt getting following error on Command Prompt
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)
Posted
Comments
Richard MacCutchan 9-Nov-11 8:59am    
I know nothing about Nant, but the message at the beginning seems fairly clear.

1 solution

The problem is during the unzipping in Windows 7 64 bit.

While unzipping,

1.Go to your nant-** zip file-->right click-->In the dialog click "unblock button"

2.Copy the nant-*** folder to c:\Program Files

3.Create a nant bat file and copy to C:\Windows

That`s it!!!!!
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900