99extern DWORD g_dwIISServerVersion;
1010
1111static std::wstring GetIISVersion () {
12- auto major = (int )(g_dwIISServerVersion >> 16 );
13- auto minor = (int )(g_dwIISServerVersion & 0xffff );
12+ int major = (int )(g_dwIISServerVersion >> 16 );
13+ int minor = (int )(g_dwIISServerVersion & 0xffff );
1414
1515 std::wstringstream version;
1616 version << major << " ." << minor;
@@ -19,8 +19,9 @@ static std::wstring GetIISVersion() {
1919}
2020
2121static std::wstring ToVirtualPath (const std::wstring& configurationPath) {
22- auto segments = 0 ;
23- auto position = configurationPath.find (' /' );
22+ int segments = 0 ;
23+ size_t position = configurationPath.find (' /' );
24+
2425 // Skip first 4 segments of config path
2526 while (segments != 3 && position != std::wstring::npos)
2627 {
@@ -46,11 +47,11 @@ void SetApplicationEnvironmentVariables(_In_ IHttpServer &server, _In_ IHttpCont
4647 SetEnvironmentVariable (L" ASPNETCORE_IIS_APP_POOL_CONFIG_FILE" , server2->GetAppPoolConfigFile ());
4748 }
4849
49- auto site = pHttpContext.GetSite ();
50+ IHttpSite* site = pHttpContext.GetSite ();
5051 SetEnvironmentVariable (L" ASPNETCORE_IIS_SITE_NAME" , site->GetSiteName ());
5152 SetEnvironmentVariable (L" ASPNETCORE_IIS_SITE_ID" , std::to_wstring (site->GetSiteId ()).c_str ());
5253
53- auto app = pHttpContext.GetApplication ();
54+ IHttpApplication* app = pHttpContext.GetApplication ();
5455 SetEnvironmentVariable (L" ASPNETCORE_IIS_APP_CONFIG_PATH" , app->GetAppConfigPath ());
5556 SetEnvironmentVariable (L" ASPNETCORE_IIS_APPLICATION_ID" , app->GetApplicationId ());
5657 SetEnvironmentVariable (L" ASPNETCORE_IIS_APPLICATION_VIRTUAL_PATH" , ToVirtualPath (app->GetAppConfigPath ()).c_str ());
0 commit comments