internal static IHttpHandler GetApplicationInstance(HttpContext context) { if (_customApplication != null) { return(_customApplication); } // Check to see if it's a debug auto-attach request if (context.Request.IsDebuggingRequest) { return(new HttpDebugHandler()); } _theApplicationFactory.EnsureInited(); _theApplicationFactory.EnsureAppStartCalled(context); return(_theApplicationFactory.GetNormalApplicationInstance(context)); }