Detecting ASP.NET Debug mode

Posted by: Rick Strahls WebLog, on 20 Jan 2007 | View original

Ah the beauty of a big framework <s>. I was doing some work on an internal GZip compression handler and one thing I needed to know is whether the application is running in Debug mode. Its easy to do this IF you know where to look:   // *** Optimize the script by removing comment lines and stripping spaces if (!HttpContext.Current.IsDebuggingEnabled)                Script = OptimizeScript(Script);      It...

Advertisement
The leading UI suite for ASP.NET - Telerik radControls
Outstanding performance. Full ASP.NET AJAX support. Nearly codeless development.

Similar Posts

  • Tip/Trick: Show Detailed ASP.NET Error Messages to Developers (and only to Developers) more
  • August 9th ASP.NET Link-Listing more
  • How To Make Domain Model Presentable more
  • Recipe: Enabling Windows Authentication within an Intranet ASP.NET Web application more
  • Vote for my Birds of a Feather session at TechEd Boston more
  • Meet ActiveNick at TechEd in Boston Next Week! more
  • Frames, ASPX Pages and Rejected Cookies more
  • Attach to Visual Studio's Development Web Server easily using a macro more
  • SDC Sessions - THE CODE more
  • Tech Ed 2006 Summary more

News Categories

.NET | ADO.NET | Agile | Ajax | Architecture | ASP.NET | BizTalk | C# | Certification | Community Server | dasBlog | DataGrid | DataSet | Debugger | DotNetNuke | Events | GridView | IIS | Indigo | JavaScript | Mobile | Mono | Patterns and Practices | Performance | Podcast | Refactor | Regex | Security | Sharepoint | Silverlight | Smart Client Applications | Software | SQL | VB.NET | Visual Studio | W3 | WCF | WinFx | WPF | WSE | XAML | XLinq | XML | XSD