diff --git a/src/IISIntegration/src/AspNetCoreModuleV2/AspNetCore/applicationinfo.cpp b/src/IISIntegration/src/AspNetCoreModuleV2/AspNetCore/applicationinfo.cpp index 36b0c2d902a5..4ce20f893dcb 100644 --- a/src/IISIntegration/src/AspNetCoreModuleV2/AspNetCore/applicationinfo.cpp +++ b/src/IISIntegration/src/AspNetCoreModuleV2/AspNetCore/applicationinfo.cpp @@ -106,7 +106,7 @@ APPLICATION_INFO::CreateApplication(IHttpContext& pHttpContext) } return S_OK; } - catch (ConfigurationLoadException &ex) + catch (const ConfigurationLoadException &ex) { EventLog::Error( ASPNETCORE_CONFIGURATION_LOAD_ERROR, diff --git a/src/IISIntegration/src/AspNetCoreModuleV2/CommonLib/BaseOutputManager.h b/src/IISIntegration/src/AspNetCoreModuleV2/CommonLib/BaseOutputManager.h index 32706b0192ef..7e0834584bb1 100644 --- a/src/IISIntegration/src/AspNetCoreModuleV2/CommonLib/BaseOutputManager.h +++ b/src/IISIntegration/src/AspNetCoreModuleV2/CommonLib/BaseOutputManager.h @@ -55,7 +55,7 @@ class BaseOutputManager : { func(); } - catch (std::runtime_error& exception) + catch (const std::runtime_error& exception) { EventLog::Warn(ASPNETCORE_EVENT_GENERAL_WARNING, exceptionMessage.c_str(), GetModuleName().c_str(), to_wide_string(exception.what(), GetConsoleOutputCP()).c_str()); }