Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- WebConfigurationManager.GetSection("compilation")// Name of the tag in the file
- WebConfigurationManager.GetSection("CompilationSection") // Name of the class that I'd expect would be returned by this method
- WebConfigurationManager.GetSection("system.web") // Parent tag of the 'compilation' tag
- using System.Configuration;
- using System.Web.Configuration;
- CompilationSection configSection =
- (CompilationSection) ConfigurationManager.GetSection( "system.web/compilation" );
- XmlDocument doc = new XmlDocument();
- doc.Load(Server.MapPath("~/Web.config"));
- doc.SelectSingleNode("/configuration/system.web/compilation/@debug");
- CompilationSection section =
- Configuration.GetSection("system.web/compilation") as CompilationSection;
- bool debug = section != null && section.Debug;
- #if (DEBUG)
- #endif
Add Comment
Please, Sign In to add comment