Skip to content

Commit 427cb26

Browse files
committed
progress
1 parent 9717ec3 commit 427cb26

File tree

6 files changed

+81
-21
lines changed

6 files changed

+81
-21
lines changed

src/Components/Web.JS/dist/Release/blazor.server.js

-19
This file was deleted.

src/Servers/IIS/AspNetCoreModuleV2/AspNetCore/applicationinfo.cpp

+26
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,33 @@ APPLICATION_INFO::TryCreateApplication(IHttpContext& pHttpContext, const ShimOpt
191191
{
192192
shadowCopyPath = std::filesystem::absolute(std::filesystem::path(physicalPath) / shadowCopyPath);
193193
}
194+
// Instead of copying to shadow copy directory, find all folders with versions, and grab highest one.
195+
auto directoryName = 0;
196+
std::string directoryNameStr = "0";
197+
for (auto& entry : std::filesystem::directory_iterator(shadowCopyPath))
198+
{
199+
if (entry.is_directory())
200+
{
201+
try
202+
{
203+
// TODO maybe able to read last directory in directory iteration?
204+
std::string::size_type sz;
205+
int i_dec = std::stoi(entry.path(), &sz);
206+
if (i_dec > directoryName)
207+
{
208+
directoryName = i_dec;
209+
directoryNameStr = std::string(entry.path().string());
210+
}
211+
}
212+
catch (const std::exception&)
213+
{
214+
// Ignore any folders that can't be converted to an int.
215+
}
216+
}
217+
}
194218

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

src/Servers/IIS/IIS/test/Common.FunctionalTests/ShadowCopyTests.cs

-1
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,6 @@ public async Task ShadowCopySingleFileChangedWorks()
144144
}
145145

146146
[ConditionalFact]
147-
[MaximumOSVersion(OperatingSystems.Windows, WindowsVersions.Win10_20H1, SkipReason = "Shutdown hangs https://github.com/dotnet/aspnetcore/issues/25107")]
148147
public async Task ShadowCopyE2EWorks()
149148
{
150149
var directory = CreateTempDirectory();
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
{
2+
"iisSettings": {
3+
"windowsAuthentication": true,
4+
"anonymousAuthentication": true,
5+
"iisExpress": {
6+
"applicationUrl": "http://localhost:5762/",
7+
"sslPort": 0
8+
}
9+
},
10+
"profiles": {
11+
"ANCM IIS Express": {
12+
"commandName": "Executable",
13+
"executablePath": "$(IISExpressPath)",
14+
"commandLineArgs": "$(IISExpressArguments)",
15+
"environmentVariables": {
16+
"IIS_SITE_PATH": "$(MSBuildThisFileDirectory)",
17+
"ANCMV2_PATH": "$(AspNetCoreModuleV2ShimDll)",
18+
"ASPNETCORE_MODULE_OUTOFPROCESS_HANDLER": "$(AspNetCoreModuleV2OutOfProcessHandlerDll)",
19+
"LAUNCHER_ARGS": "$(TargetPath)",
20+
"ASPNETCORE_ENVIRONMENT": "Development",
21+
"LAUNCHER_PATH": "$(DotNetPath)",
22+
"ASPNETCORE_MODULE_DEBUG": "console"
23+
}
24+
},
25+
"ANCM IIS": {
26+
"commandName": "Executable",
27+
"executablePath": "$(IISPath)",
28+
"commandLineArgs": "$(IISArguments)",
29+
"environmentVariables": {
30+
"IIS_SITE_PATH": "$(MSBuildThisFileDirectory)",
31+
"ANCMV2_PATH": "$(AspNetCoreModuleV2ShimDll)",
32+
"ASPNETCORE_MODULE_OUTOFPROCESS_HANDLER": "$(AspNetCoreModuleV2OutOfProcessHandlerDll)",
33+
"LAUNCHER_ARGS": "$(TargetPath)",
34+
"ASPNETCORE_ENVIRONMENT": "Development",
35+
"LAUNCHER_PATH": "$(DotNetPath)",
36+
"ASPNETCORE_MODULE_DEBUG": "console"
37+
}
38+
}
39+
}
40+
}

src/Servers/IIS/IISIntegration.slnf

+11-1
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,28 @@
22
"solution": {
33
"path": "..\\..\\..\\AspNetCore.sln",
44
"projects": [
5+
"src\\Servers\\IIS\\AspNetCoreModuleV2\\AspNetCore\\AspNetCore.vcxproj",
6+
"src\\Servers\\IIS\\AspNetCoreModuleV2\\CommonLibTests\\CommonLibTests.vcxproj",
7+
"src\\Servers\\IIS\\AspNetCoreModuleV2\\CommonLib\\CommonLib.vcxproj",
8+
"src\\Servers\\IIS\\AspNetCoreModuleV2\\IISLib\\IISLib.vcxproj",
9+
"src\\Servers\\IIS\\AspNetCoreModuleV2\\InProcessRequestHandler\\InProcessRequestHandler.vcxproj",
10+
"src\\Servers\\IIS\\AspNetCoreModuleV2\\OutOfProcessRequestHandler\\OutOfProcessRequestHandler.vcxproj",
11+
"src\\Servers\\IIS\\AspNetCoreModuleV2\\RequestHandlerLib\\RequestHandlerLib.vcxproj",
512
"src\\Servers\\IIS\\AspNetCoreModuleV2\\Symbols\\Microsoft.AspNetCore.ANCMSymbols.csproj",
13+
"src\\Servers\\IIS\\AspNetCoreModuleV2\\gtest\\gtest.vcxproj",
614
"src\\Servers\\IIS\\IISIntegration\\samples\\IISSample\\IISSample.csproj",
715
"src\\Servers\\IIS\\IISIntegration\\src\\Microsoft.AspNetCore.Server.IISIntegration.csproj",
816
"src\\Servers\\IIS\\IISIntegration\\test\\Tests\\Microsoft.AspNetCore.Server.IISIntegration.Tests.csproj",
917
"src\\Servers\\IIS\\IIS\\benchmarks\\IIS.Performance\\IIS.Performance.csproj",
1018
"src\\Servers\\IIS\\IIS\\src\\Microsoft.AspNetCore.Server.IIS.csproj",
19+
"src\\Servers\\IIS\\IIS\\samples\\NativeIISSample\\NativeIISSample.csproj",
1120
"src\\Servers\\IIS\\IIS\\test\\IIS.FunctionalTests\\IIS.FunctionalTests.csproj",
1221
"src\\Servers\\IIS\\IIS\\test\\IIS.NewHandler.FunctionalTests\\IIS.NewHandler.FunctionalTests.csproj",
1322
"src\\Servers\\IIS\\IIS\\test\\IIS.NewShim.FunctionalTests\\IIS.NewShim.FunctionalTests.csproj",
1423
"src\\Servers\\IIS\\IIS\\test\\IIS.Tests\\IIS.Tests.csproj",
1524
"src\\Servers\\IIS\\IIS\\test\\IISExpress.FunctionalTests\\IISExpress.FunctionalTests.csproj",
16-
"src\\Servers\\IIS\\IIS\\test\\testassets\\InProcessWebSite\\InProcessWebSite.csproj"
25+
"src\\Servers\\IIS\\IIS\\test\\testassets\\InProcessWebSite\\InProcessWebSite.csproj",
26+
"src\\Servers\\IIS\\IntegrationTesting.IIS\\src\\Microsoft.AspNetCore.Server.IntegrationTesting.IIS.csproj"
1727
]
1828
}
1929
}

src/Servers/IIS/copyToIIS.ps1

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
net stop was /Y
2+
.\build.cmd
3+
cp "C:\Users\jukotali\code\aspnetcore\artifacts\bin\AspNetCoreModuleShim\x64\Debug\*" "C:\Program Files\IIS\Asp.Net Core Module\V2\" -Force
4+
net start w3svc /Y

0 commit comments

Comments
 (0)