diff --git a/src/AspNetCoreModuleV2/InProcessRequestHandler/inprocessapplication.cpp b/src/AspNetCoreModuleV2/InProcessRequestHandler/inprocessapplication.cpp index 43a4071cf5..56eb63577c 100644 --- a/src/AspNetCoreModuleV2/InProcessRequestHandler/inprocessapplication.cpp +++ b/src/AspNetCoreModuleV2/InProcessRequestHandler/inprocessapplication.cpp @@ -44,7 +44,6 @@ IN_PROCESS_APPLICATION::IN_PROCESS_APPLICATION( IN_PROCESS_APPLICATION::~IN_PROCESS_APPLICATION() { - m_hThread = NULL; s_Application = NULL; } @@ -190,8 +189,6 @@ IN_PROCESS_APPLICATION::ShutDownInternal() } } - CloseHandle(m_hThread); - m_hThread = NULL; s_Application = NULL; } diff --git a/src/AspNetCoreModuleV2/InProcessRequestHandler/inprocessapplication.h b/src/AspNetCoreModuleV2/InProcessRequestHandler/inprocessapplication.h index 10149cf3f3..1d5cfec4c9 100644 --- a/src/AspNetCoreModuleV2/InProcessRequestHandler/inprocessapplication.h +++ b/src/AspNetCoreModuleV2/InProcessRequestHandler/inprocessapplication.h @@ -121,7 +121,7 @@ private: }; // Thread executing the .NET Core process - HANDLE m_hThread; + HandleWrapper m_hThread; // The request handler callback from managed code PFN_REQUEST_HANDLER m_RequestHandler; @@ -134,7 +134,7 @@ private: PFN_ASYNC_COMPLETION_HANDLER m_AsyncCompletionHandler; // The event that gets triggered when managed initialization is complete - HANDLE m_pInitalizeEvent; + HandleWrapper m_pInitalizeEvent; STRU m_struExeLocation; diff --git a/test/IIS.FunctionalTests/Inprocess/StdOutRedirectionTests.cs b/test/IIS.FunctionalTests/Inprocess/StdOutRedirectionTests.cs index e0cb1cef5d..b97aaf46f5 100644 --- a/test/IIS.FunctionalTests/Inprocess/StdOutRedirectionTests.cs +++ b/test/IIS.FunctionalTests/Inprocess/StdOutRedirectionTests.cs @@ -81,6 +81,7 @@ namespace IIS.FunctionalTests.Inprocess } [ConditionalFact] + [RequiresIIS(IISCapability.PoolEnvironmentVariables)] [SkipIfDebug] public async Task EnableCoreHostTraceLogging_TwoLogFilesCreated() { @@ -108,6 +109,7 @@ namespace IIS.FunctionalTests.Inprocess } [ConditionalTheory] + [RequiresIIS(IISCapability.PoolEnvironmentVariables)] [SkipIfDebug] [InlineData("CheckLargeStdErrWrites")] [InlineData("CheckLargeStdOutWrites")] @@ -131,6 +133,7 @@ namespace IIS.FunctionalTests.Inprocess } [ConditionalTheory] + [RequiresIIS(IISCapability.PoolEnvironmentVariables)] [SkipIfDebug] [InlineData("CheckLargeStdErrWrites")] [InlineData("CheckLargeStdOutWrites")]