You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// GetOrCreateApplicationInfo is called from proxymodule when a request is received.
26
-
// Set this value to indicate that a request has been received so we can disable shutdown logic in OnGlobalApplicationStop
27
-
m_hasStarted = true;
28
26
27
+
PCWSTR pszVariableValue = nullptr;
28
+
DWORD cbLength = 0;
29
+
// Check for preload or warmup request, part of the application initialization process, see comments in ASPNET_CORE_GLOBAL_MODULE::OnGlobalApplicationStop for more info
30
+
if (FAILED(pHttpContext.GetServerVariable("PRELOAD_REQUEST", &pszVariableValue, &cbLength)) &&
// We prefer shutting down from OnGlobalStopListening as it is called right before the IIS request handler is disabled, which means it'll start queueing requests
39
+
// But if we stopped in OnGlobalApplicationStop then we can start shutting down while the request handler is still active resulting in us returning 503's since we're shutting down.
40
+
// We still need to shutdown in specific cases where OnGlobalStopListening isn't called, like IISExpress or if the app never receives a request (app preload).
0 commit comments