Ah the beauty of a big framework. 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. It’s easy to do this IF you know where to look:
// *** Optimize the script by removing comment lines and stripping spaces
Script = OptimizeScript(Script);
It took me a while to find this - I was expecting to find this on the HttpApplication object. Didn't have much luck with searching either when finally I stumbled onto it above on the Context object.
I'll be at DevIntersection in Vegas this fall giving sessions on ASP.NET Core with Angular and Localization. Thinking of coming? Use discount code STRAHL and save a few bucks. If you do be sure to stop by and say hello!
Other Posts you might also like