Skip to content

Commit 53b6420

Browse files
authored
Make the sample work (dotnet#28556)
- Fix debug assert
1 parent 2ceca7f commit 53b6420

File tree

4 files changed

+4
-3
lines changed

4 files changed

+4
-3
lines changed

src/Servers/HttpSys/HttpSysServer.slnf

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
"src\\Http\\Http\\src\\Microsoft.AspNetCore.Http.csproj",
1616
"src\\Http\\Metadata\\src\\Microsoft.AspNetCore.Metadata.csproj",
1717
"src\\Http\\WebUtilities\\src\\Microsoft.AspNetCore.WebUtilities.csproj",
18+
"src\\Middleware\\HostFiltering\\src\\Microsoft.AspNetCore.HostFiltering.csproj",
1819
"src\\Servers\\Connections.Abstractions\\src\\Microsoft.AspNetCore.Connections.Abstractions.csproj",
1920
"src\\Servers\\HttpSys\\samples\\HotAddSample\\HotAddSample.csproj",
2021
"src\\Servers\\HttpSys\\samples\\QueueSharing\\QueueSharing.csproj",
@@ -24,6 +25,7 @@
2425
"src\\Servers\\HttpSys\\test\\FunctionalTests\\Microsoft.AspNetCore.Server.HttpSys.FunctionalTests.csproj",
2526
"src\\Servers\\HttpSys\\test\\Tests\\Microsoft.AspNetCore.Server.HttpSys.Tests.csproj",
2627
"src\\Servers\\Kestrel\\Transport.Sockets\\src\\Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.csproj",
28+
"src\\Servers\\IIS\\IIS\\src\\Microsoft.AspNetCore.Server.IIS.csproj",
2729
"src\\Testing\\src\\Microsoft.AspNetCore.Testing.csproj"
2830
]
2931
}

src/Servers/HttpSys/samples/SelfHostServer/Program.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ public static void Main(string[] args)
1616

1717
public static IHostBuilder CreateHostBuilder(string[] args) =>
1818
Host.CreateDefaultBuilder(args)
19-
.ConfigureWebHostDefaults(webBuilder =>
19+
.ConfigureWebHost(webBuilder =>
2020
{
2121
webBuilder.UseStartup<Startup>()
2222
.UseHttpSys(options =>

src/Servers/HttpSys/samples/SelfHostServer/SelfHostServer.csproj

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
</PropertyGroup>
1313

1414
<ItemGroup>
15-
<Reference Include="Microsoft.AspNetCore" />
1615
<Reference Include="Microsoft.AspNetCore.Server.HttpSys" />
1716
<Reference Include="Microsoft.Extensions.Hosting" />
1817
<Reference Include="Microsoft.Extensions.Logging.Console" />

src/Servers/HttpSys/src/MessagePump.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ public Task StartAsync<TContext>(IHttpApplication<TContext> application, Cancell
119119
// else // Attaching to an existing queue, don't add a default.
120120

121121
// Can't start twice
122-
Debug.Assert(RequestContextFactory != null);
122+
Debug.Assert(RequestContextFactory == null, "Start called twice!");
123123

124124
Debug.Assert(application != null);
125125

0 commit comments

Comments
 (0)