Skip to content

Commit

Permalink
progress
Browse files Browse the repository at this point in the history
  • Loading branch information
jkotalik committed Feb 1, 2021
1 parent 9717ec3 commit 427cb26
Show file tree
Hide file tree
Showing 6 changed files with 81 additions and 21 deletions.
19 changes: 0 additions & 19 deletions src/Components/Web.JS/dist/Release/blazor.server.js

This file was deleted.

26 changes: 26 additions & 0 deletions src/Servers/IIS/AspNetCoreModuleV2/AspNetCore/applicationinfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,33 @@ APPLICATION_INFO::TryCreateApplication(IHttpContext& pHttpContext, const ShimOpt
{
shadowCopyPath = std::filesystem::absolute(std::filesystem::path(physicalPath) / shadowCopyPath);
}
// Instead of copying to shadow copy directory, find all folders with versions, and grab highest one.
auto directoryName = 0;
std::string directoryNameStr = "0";
for (auto& entry : std::filesystem::directory_iterator(shadowCopyPath))
{
if (entry.is_directory())
{
try
{
// TODO maybe able to read last directory in directory iteration?
std::string::size_type sz;
int i_dec = std::stoi(entry.path(), &sz);
if (i_dec > directoryName)
{
directoryName = i_dec;
directoryNameStr = std::string(entry.path().string());
}
}
catch (const std::exception&)
{
// Ignore any folders that can't be converted to an int.
}
}
}

// TODO delete all other directories in this folder.
shadowCopyPath = shadowCopyPath / std::filesystem::path(directoryNameStr);
RETURN_IF_FAILED(Environment::CopyToDirectory(shadowCopyPath, physicalPath, options.QueryCleanShadowCopyDirectory()));
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,6 @@ public async Task ShadowCopySingleFileChangedWorks()
}

[ConditionalFact]
[MaximumOSVersion(OperatingSystems.Windows, WindowsVersions.Win10_20H1, SkipReason = "Shutdown hangs https://github.com/dotnet/aspnetcore/issues/25107")]
public async Task ShadowCopyE2EWorks()
{
var directory = CreateTempDirectory();
Expand Down
40 changes: 40 additions & 0 deletions src/Servers/IIS/IIS/test/IIS.Tests/Properties/launchSettings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
{
"iisSettings": {
"windowsAuthentication": true,
"anonymousAuthentication": true,
"iisExpress": {
"applicationUrl": "http://localhost:5762/",
"sslPort": 0
}
},
"profiles": {
"ANCM IIS Express": {
"commandName": "Executable",
"executablePath": "$(IISExpressPath)",
"commandLineArgs": "$(IISExpressArguments)",
"environmentVariables": {
"IIS_SITE_PATH": "$(MSBuildThisFileDirectory)",
"ANCMV2_PATH": "$(AspNetCoreModuleV2ShimDll)",
"ASPNETCORE_MODULE_OUTOFPROCESS_HANDLER": "$(AspNetCoreModuleV2OutOfProcessHandlerDll)",
"LAUNCHER_ARGS": "$(TargetPath)",
"ASPNETCORE_ENVIRONMENT": "Development",
"LAUNCHER_PATH": "$(DotNetPath)",
"ASPNETCORE_MODULE_DEBUG": "console"
}
},
"ANCM IIS": {
"commandName": "Executable",
"executablePath": "$(IISPath)",
"commandLineArgs": "$(IISArguments)",
"environmentVariables": {
"IIS_SITE_PATH": "$(MSBuildThisFileDirectory)",
"ANCMV2_PATH": "$(AspNetCoreModuleV2ShimDll)",
"ASPNETCORE_MODULE_OUTOFPROCESS_HANDLER": "$(AspNetCoreModuleV2OutOfProcessHandlerDll)",
"LAUNCHER_ARGS": "$(TargetPath)",
"ASPNETCORE_ENVIRONMENT": "Development",
"LAUNCHER_PATH": "$(DotNetPath)",
"ASPNETCORE_MODULE_DEBUG": "console"
}
}
}
}
12 changes: 11 additions & 1 deletion src/Servers/IIS/IISIntegration.slnf
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,28 @@
"solution": {
"path": "..\\..\\..\\AspNetCore.sln",
"projects": [
"src\\Servers\\IIS\\AspNetCoreModuleV2\\AspNetCore\\AspNetCore.vcxproj",
"src\\Servers\\IIS\\AspNetCoreModuleV2\\CommonLibTests\\CommonLibTests.vcxproj",
"src\\Servers\\IIS\\AspNetCoreModuleV2\\CommonLib\\CommonLib.vcxproj",
"src\\Servers\\IIS\\AspNetCoreModuleV2\\IISLib\\IISLib.vcxproj",
"src\\Servers\\IIS\\AspNetCoreModuleV2\\InProcessRequestHandler\\InProcessRequestHandler.vcxproj",
"src\\Servers\\IIS\\AspNetCoreModuleV2\\OutOfProcessRequestHandler\\OutOfProcessRequestHandler.vcxproj",
"src\\Servers\\IIS\\AspNetCoreModuleV2\\RequestHandlerLib\\RequestHandlerLib.vcxproj",
"src\\Servers\\IIS\\AspNetCoreModuleV2\\Symbols\\Microsoft.AspNetCore.ANCMSymbols.csproj",
"src\\Servers\\IIS\\AspNetCoreModuleV2\\gtest\\gtest.vcxproj",
"src\\Servers\\IIS\\IISIntegration\\samples\\IISSample\\IISSample.csproj",
"src\\Servers\\IIS\\IISIntegration\\src\\Microsoft.AspNetCore.Server.IISIntegration.csproj",
"src\\Servers\\IIS\\IISIntegration\\test\\Tests\\Microsoft.AspNetCore.Server.IISIntegration.Tests.csproj",
"src\\Servers\\IIS\\IIS\\benchmarks\\IIS.Performance\\IIS.Performance.csproj",
"src\\Servers\\IIS\\IIS\\src\\Microsoft.AspNetCore.Server.IIS.csproj",
"src\\Servers\\IIS\\IIS\\samples\\NativeIISSample\\NativeIISSample.csproj",
"src\\Servers\\IIS\\IIS\\test\\IIS.FunctionalTests\\IIS.FunctionalTests.csproj",
"src\\Servers\\IIS\\IIS\\test\\IIS.NewHandler.FunctionalTests\\IIS.NewHandler.FunctionalTests.csproj",
"src\\Servers\\IIS\\IIS\\test\\IIS.NewShim.FunctionalTests\\IIS.NewShim.FunctionalTests.csproj",
"src\\Servers\\IIS\\IIS\\test\\IIS.Tests\\IIS.Tests.csproj",
"src\\Servers\\IIS\\IIS\\test\\IISExpress.FunctionalTests\\IISExpress.FunctionalTests.csproj",
"src\\Servers\\IIS\\IIS\\test\\testassets\\InProcessWebSite\\InProcessWebSite.csproj"
"src\\Servers\\IIS\\IIS\\test\\testassets\\InProcessWebSite\\InProcessWebSite.csproj",
"src\\Servers\\IIS\\IntegrationTesting.IIS\\src\\Microsoft.AspNetCore.Server.IntegrationTesting.IIS.csproj"
]
}
}
4 changes: 4 additions & 0 deletions src/Servers/IIS/copyToIIS.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
net stop was /Y
.\build.cmd
cp "C:\Users\jukotali\code\aspnetcore\artifacts\bin\AspNetCoreModuleShim\x64\Debug\*" "C:\Program Files\IIS\Asp.Net Core Module\V2\" -Force
net start w3svc /Y

0 comments on commit 427cb26

Please sign in to comment.