diff --git a/Directory.Build.props b/Directory.Build.props
index 8b3adc348b..b3dc903387 100644
--- a/Directory.Build.props
+++ b/Directory.Build.props
@@ -46,8 +46,6 @@
nugetaspnet@microsoft.com
- packageIcon.png
- $(MSBuildThisFileDirectory)packageIcon.png
https://asp.net
$(MSBuildProjectDirectory)
@@ -56,10 +54,6 @@
netcoreapp5.0
-
-
-
-
true
diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml
index d08ca7ebf2..ee6fad4426 100644
--- a/eng/Version.Details.xml
+++ b/eng/Version.Details.xml
@@ -412,17 +412,17 @@
https://github.com/aspnet/Extensions
f15f3278c73c72a6546d7cb2c1bd54a541ffc83e
-
+
https://github.com/dotnet/arcade
- f70d1fca3d5d4045be75694006f1bee0e0aec572
+ a42a124635ce1a218309ecb31ec59d559cacb886
-
+
https://github.com/dotnet/arcade
- f70d1fca3d5d4045be75694006f1bee0e0aec572
+ a42a124635ce1a218309ecb31ec59d559cacb886
-
+
https://github.com/dotnet/arcade
- f70d1fca3d5d4045be75694006f1bee0e0aec572
+ a42a124635ce1a218309ecb31ec59d559cacb886
https://github.com/aspnet/Extensions
diff --git a/eng/Versions.props b/eng/Versions.props
index 5ae95d3858..c1fb9915db 100644
--- a/eng/Versions.props
+++ b/eng/Versions.props
@@ -62,7 +62,7 @@
-->
- 1.0.0-beta.19510.3
+ 1.0.0-beta.19517.3
3.4.0-beta1-19456-03
diff --git a/eng/common/post-build/setup-maestro-vars.ps1 b/eng/common/post-build/setup-maestro-vars.ps1
index d7f64dc63c..5668ef091a 100644
--- a/eng/common/post-build/setup-maestro-vars.ps1
+++ b/eng/common/post-build/setup-maestro-vars.ps1
@@ -6,12 +6,12 @@ param(
try {
$Content = Get-Content $ReleaseConfigsPath
-
+
$BarId = $Content | Select -Index 0
-
+
$Channels = ""
$Content | Select -Index 1 | ForEach-Object { $Channels += "$_ ," }
-
+
$IsStableBuild = $Content | Select -Index 2
Write-PipelineSetVariable -Name 'BARBuildId' -Value $BarId
@@ -23,4 +23,4 @@ catch {
Write-Host $_.Exception
Write-Host $_.ScriptStackTrace
ExitWithExitCode 1
-}
+}
\ No newline at end of file
diff --git a/global.json b/global.json
index 272ae374e2..121fc68a28 100644
--- a/global.json
+++ b/global.json
@@ -25,7 +25,7 @@
},
"msbuild-sdks": {
"Yarn.MSBuild": "1.15.2",
- "Microsoft.DotNet.Arcade.Sdk": "1.0.0-beta.19510.3",
- "Microsoft.DotNet.Helix.Sdk": "2.0.0-beta.19510.3"
+ "Microsoft.DotNet.Arcade.Sdk": "1.0.0-beta.19517.3",
+ "Microsoft.DotNet.Helix.Sdk": "2.0.0-beta.19517.3"
}
}
diff --git a/packageIcon.png b/packageIcon.png
deleted file mode 100644
index a0f1fdbf4d..0000000000
Binary files a/packageIcon.png and /dev/null differ
diff --git a/src/Analyzers/Analyzers/src/Microsoft.AspNetCore.Analyzers.csproj b/src/Analyzers/Analyzers/src/Microsoft.AspNetCore.Analyzers.csproj
index cc4201ca79..feec3324be 100644
--- a/src/Analyzers/Analyzers/src/Microsoft.AspNetCore.Analyzers.csproj
+++ b/src/Analyzers/Analyzers/src/Microsoft.AspNetCore.Analyzers.csproj
@@ -25,7 +25,6 @@
-
diff --git a/src/Analyzers/Analyzers/src/Microsoft.AspNetCore.Analyzers.nuspec b/src/Analyzers/Analyzers/src/Microsoft.AspNetCore.Analyzers.nuspec
index 106615a7da..2cba2a2f13 100644
--- a/src/Analyzers/Analyzers/src/Microsoft.AspNetCore.Analyzers.nuspec
+++ b/src/Analyzers/Analyzers/src/Microsoft.AspNetCore.Analyzers.nuspec
@@ -2,12 +2,11 @@
$CommonMetadataElements$
- packageIcon.png
+ $CommonFileElements$
-
diff --git a/src/Components/Blazor/Build/src/Microsoft.AspNetCore.Blazor.Build.csproj b/src/Components/Blazor/Build/src/Microsoft.AspNetCore.Blazor.Build.csproj
index 82968f4999..35853a4b9e 100644
--- a/src/Components/Blazor/Build/src/Microsoft.AspNetCore.Blazor.Build.csproj
+++ b/src/Components/Blazor/Build/src/Microsoft.AspNetCore.Blazor.Build.csproj
@@ -23,7 +23,6 @@
-
diff --git a/src/Components/Blazor/Build/src/Microsoft.AspNetCore.Blazor.Build.nuspec b/src/Components/Blazor/Build/src/Microsoft.AspNetCore.Blazor.Build.nuspec
index feffe95c50..26ca818d7f 100644
--- a/src/Components/Blazor/Build/src/Microsoft.AspNetCore.Blazor.Build.nuspec
+++ b/src/Components/Blazor/Build/src/Microsoft.AspNetCore.Blazor.Build.nuspec
@@ -5,14 +5,13 @@
- packageIcon.png
+ $CommonFileElements$
-
diff --git a/src/Components/Blazor/DevServer/src/Microsoft.AspNetCore.Blazor.DevServer.csproj b/src/Components/Blazor/DevServer/src/Microsoft.AspNetCore.Blazor.DevServer.csproj
index eada2c3e82..d18ab7c9e4 100644
--- a/src/Components/Blazor/DevServer/src/Microsoft.AspNetCore.Blazor.DevServer.csproj
+++ b/src/Components/Blazor/DevServer/src/Microsoft.AspNetCore.Blazor.DevServer.csproj
@@ -33,7 +33,6 @@
-
diff --git a/src/Components/Blazor/DevServer/src/Microsoft.AspNetCore.Blazor.DevServer.nuspec b/src/Components/Blazor/DevServer/src/Microsoft.AspNetCore.Blazor.DevServer.nuspec
index b59725fc14..2f0f6b8479 100644
--- a/src/Components/Blazor/DevServer/src/Microsoft.AspNetCore.Blazor.DevServer.nuspec
+++ b/src/Components/Blazor/DevServer/src/Microsoft.AspNetCore.Blazor.DevServer.nuspec
@@ -2,12 +2,11 @@
$CommonMetadataElements$
- packageIcon.png
+ $CommonFileElements$
-
diff --git a/src/Components/Blazor/Templates/src/Microsoft.AspNetCore.Blazor.Templates.csproj b/src/Components/Blazor/Templates/src/Microsoft.AspNetCore.Blazor.Templates.csproj
index 640d8f21d0..c91a32128d 100644
--- a/src/Components/Blazor/Templates/src/Microsoft.AspNetCore.Blazor.Templates.csproj
+++ b/src/Components/Blazor/Templates/src/Microsoft.AspNetCore.Blazor.Templates.csproj
@@ -15,10 +15,6 @@
false
-
-
-
-
diff --git a/src/Components/Blazor/Templates/src/Microsoft.AspNetCore.Blazor.Templates.nuspec b/src/Components/Blazor/Templates/src/Microsoft.AspNetCore.Blazor.Templates.nuspec
index cde7bc4c1f..fd19750231 100644
--- a/src/Components/Blazor/Templates/src/Microsoft.AspNetCore.Blazor.Templates.nuspec
+++ b/src/Components/Blazor/Templates/src/Microsoft.AspNetCore.Blazor.Templates.nuspec
@@ -5,13 +5,12 @@
- packageIcon.png
+ $CommonFileElements$
-
diff --git a/src/Components/Components/src/Microsoft.AspNetCore.Components.csproj b/src/Components/Components/src/Microsoft.AspNetCore.Components.csproj
index 5fe8fe7f36..4c0a31a3f6 100644
--- a/src/Components/Components/src/Microsoft.AspNetCore.Components.csproj
+++ b/src/Components/Components/src/Microsoft.AspNetCore.Components.csproj
@@ -55,7 +55,6 @@
-
diff --git a/src/Components/Components/src/Microsoft.AspNetCore.Components.multitarget.nuspec b/src/Components/Components/src/Microsoft.AspNetCore.Components.multitarget.nuspec
index cef54a29ba..7017ce828e 100644
--- a/src/Components/Components/src/Microsoft.AspNetCore.Components.multitarget.nuspec
+++ b/src/Components/Components/src/Microsoft.AspNetCore.Components.multitarget.nuspec
@@ -15,13 +15,12 @@
- packageIcon.png
+ $CommonFileElements$
-
diff --git a/src/Components/Components/src/Microsoft.AspNetCore.Components.netcoreapp.nuspec b/src/Components/Components/src/Microsoft.AspNetCore.Components.netcoreapp.nuspec
index ff59dd52cb..9ea33e53dc 100644
--- a/src/Components/Components/src/Microsoft.AspNetCore.Components.netcoreapp.nuspec
+++ b/src/Components/Components/src/Microsoft.AspNetCore.Components.netcoreapp.nuspec
@@ -9,13 +9,12 @@
- packageIcon.png
+ $CommonFileElements$
-
diff --git a/src/Components/Ignitor/src/BlazorClient.cs b/src/Components/Ignitor/src/BlazorClient.cs
index cddc48e094..46637eb3bb 100644
--- a/src/Components/Ignitor/src/BlazorClient.cs
+++ b/src/Components/Ignitor/src/BlazorClient.cs
@@ -348,7 +348,6 @@ namespace Ignitor
});
_hubConnection = builder.Build();
- await HubConnection.StartAsync(CancellationToken);
HubConnection.On("JS.AttachComponent", OnAttachComponent);
HubConnection.On("JS.BeginInvokeJS", OnBeginInvokeJS);
@@ -357,6 +356,8 @@ namespace Ignitor
HubConnection.On("JS.Error", OnError);
HubConnection.Closed += OnClosedAsync;
+ await HubConnection.StartAsync(CancellationToken);
+
if (!connectAutomatically)
{
return true;
diff --git a/src/Components/Web/src/Routing/NavLink.cs b/src/Components/Web/src/Routing/NavLink.cs
index 799405f602..5dda2fe014 100644
--- a/src/Components/Web/src/Routing/NavLink.cs
+++ b/src/Components/Web/src/Routing/NavLink.cs
@@ -130,7 +130,7 @@ namespace Microsoft.AspNetCore.Components.Routing
private bool EqualsHrefExactlyOrIfTrailingSlashAdded(string currentUriAbsolute)
{
- if (string.Equals(currentUriAbsolute, _hrefAbsolute, StringComparison.Ordinal))
+ if (string.Equals(currentUriAbsolute, _hrefAbsolute, StringComparison.OrdinalIgnoreCase))
{
return true;
}
@@ -146,7 +146,7 @@ namespace Microsoft.AspNetCore.Components.Routing
// for http://host/vdir as they do for host://host/vdir/ as it's no
// good to display a blank page in that case.
if (_hrefAbsolute[_hrefAbsolute.Length - 1] == '/'
- && _hrefAbsolute.StartsWith(currentUriAbsolute, StringComparison.Ordinal))
+ && _hrefAbsolute.StartsWith(currentUriAbsolute, StringComparison.OrdinalIgnoreCase))
{
return true;
}
diff --git a/src/Components/test/E2ETest/Microsoft.AspNetCore.Components.E2ETests.csproj b/src/Components/test/E2ETest/Microsoft.AspNetCore.Components.E2ETests.csproj
index 5ddf7c9790..78fc48dc82 100644
--- a/src/Components/test/E2ETest/Microsoft.AspNetCore.Components.E2ETests.csproj
+++ b/src/Components/test/E2ETest/Microsoft.AspNetCore.Components.E2ETests.csproj
@@ -57,4 +57,10 @@
+
+
+ PreserveNewest
+
+
+
diff --git a/src/Components/test/E2ETest/ServerExecutionTests/ComponentHubReliabilityTest.cs b/src/Components/test/E2ETest/ServerExecutionTests/ComponentHubReliabilityTest.cs
index 707aad52b9..52546042fb 100644
--- a/src/Components/test/E2ETest/ServerExecutionTests/ComponentHubReliabilityTest.cs
+++ b/src/Components/test/E2ETest/ServerExecutionTests/ComponentHubReliabilityTest.cs
@@ -11,6 +11,7 @@ using Microsoft.AspNetCore.Components.E2ETest.Infrastructure.ServerFixtures;
using Microsoft.AspNetCore.Components.RenderTree;
using Microsoft.AspNetCore.Components.Web;
using Microsoft.AspNetCore.SignalR.Client;
+using Microsoft.AspNetCore.Testing;
using Microsoft.Extensions.Logging;
using TestServer;
using Xunit;
diff --git a/src/Components/test/E2ETest/ServerExecutionTests/IgnitorTest.cs b/src/Components/test/E2ETest/ServerExecutionTests/IgnitorTest.cs
index 60ec73621a..c72eac1ff6 100644
--- a/src/Components/test/E2ETest/ServerExecutionTests/IgnitorTest.cs
+++ b/src/Components/test/E2ETest/ServerExecutionTests/IgnitorTest.cs
@@ -83,14 +83,14 @@ namespace Microsoft.AspNetCore.Components
return Task.CompletedTask;
}
- protected virtual Task DisposeAsync()
+ protected async virtual Task DisposeAsync()
{
if (TestSink != null)
{
TestSink.MessageLogged -= TestSink_MessageLogged;
}
- return Task.CompletedTask;
+ await Client.DisposeAsync();
}
private void TestSink_MessageLogged(WriteContext context)
diff --git a/src/Components/test/E2ETest/xunit.runner.json b/src/Components/test/E2ETest/xunit.runner.json
new file mode 100644
index 0000000000..baa05fb93d
--- /dev/null
+++ b/src/Components/test/E2ETest/xunit.runner.json
@@ -0,0 +1,7 @@
+{
+ // This is set to -1 to allow the usage of an
+ // unlimited ammount of threads.
+ "maxParallelThreads": -1,
+ "diagnosticMessages": true,
+ "longRunningTestSeconds": 30
+}
diff --git a/src/Components/test/testassets/BasicTestApp/RouterTest/Links.razor b/src/Components/test/testassets/BasicTestApp/RouterTest/Links.razor
index 98f6dd5497..536fa70ad3 100644
--- a/src/Components/test/testassets/BasicTestApp/RouterTest/Links.razor
+++ b/src/Components/test/testassets/BasicTestApp/RouterTest/Links.razor
@@ -16,7 +16,7 @@
Other with base-relative URL (matches all)
Other with query
Other with hash
- With parameters
+ With parameters
With more parameters
Long page 1
Long page 2
diff --git a/src/Installers/Windows/SharedFramework/SharedFramework.wixproj b/src/Installers/Windows/SharedFramework/SharedFramework.wixproj
index d9362eab33..4476040486 100644
--- a/src/Installers/Windows/SharedFramework/SharedFramework.wixproj
+++ b/src/Installers/Windows/SharedFramework/SharedFramework.wixproj
@@ -24,10 +24,6 @@
$(RepoRoot)\src\Installers\Windows\SharedFramework\SharedFrameworkPackage.nuspec
-
-
-
-
$(WixExtDir)\WixDependencyExtension.dll
diff --git a/src/Installers/Windows/SharedFramework/SharedFrameworkPackage.nuspec b/src/Installers/Windows/SharedFramework/SharedFrameworkPackage.nuspec
index 66e9055af4..29145c1165 100644
--- a/src/Installers/Windows/SharedFramework/SharedFrameworkPackage.nuspec
+++ b/src/Installers/Windows/SharedFramework/SharedFrameworkPackage.nuspec
@@ -8,7 +8,6 @@
Microsoft
https://www.microsoft.com/net/dotnet_library_license.htm
https://github.com/aspnet/aspnetcore
- packageIcon.png
true
$MAJOR$.$MINOR$ ASP.NET Core TargetingPack ($ARCH$) Windows Installer MSI as a .nupkg for internal Visual Studio build consumption
© Microsoft Corporation. All rights reserved.
diff --git a/src/Installers/Windows/TargetingPack/TargetingPack.wixproj b/src/Installers/Windows/TargetingPack/TargetingPack.wixproj
index 72c6afc6a0..984035c9d6 100644
--- a/src/Installers/Windows/TargetingPack/TargetingPack.wixproj
+++ b/src/Installers/Windows/TargetingPack/TargetingPack.wixproj
@@ -23,10 +23,6 @@
$(RepoRoot)\src\Installers\Windows\TargetingPack\TargetingPackPackage.nuspec
-
-
-
-
$(WixExtDir)\WixDependencyExtension.dll
diff --git a/src/Installers/Windows/TargetingPack/TargetingPackPackage.nuspec b/src/Installers/Windows/TargetingPack/TargetingPackPackage.nuspec
index 5c85b569ba..0c15816136 100644
--- a/src/Installers/Windows/TargetingPack/TargetingPackPackage.nuspec
+++ b/src/Installers/Windows/TargetingPack/TargetingPackPackage.nuspec
@@ -8,7 +8,6 @@
Microsoft
https://www.microsoft.com/net/dotnet_library_license.htm
https://github.com/aspnet/aspnetcore
- packageIcon.png
true
$MAJOR$.$MINOR$ ASP.NET Core TargetingPack ($ARCH$) Windows Installer MSI as a .nupkg for internal Visual Studio build consumption
© Microsoft Corporation. All rights reserved.
diff --git a/src/Mvc/Mvc.Analyzers/src/Microsoft.AspNetCore.Mvc.Analyzers.csproj b/src/Mvc/Mvc.Analyzers/src/Microsoft.AspNetCore.Mvc.Analyzers.csproj
index b098c7cad2..2ece75d8d8 100644
--- a/src/Mvc/Mvc.Analyzers/src/Microsoft.AspNetCore.Mvc.Analyzers.csproj
+++ b/src/Mvc/Mvc.Analyzers/src/Microsoft.AspNetCore.Mvc.Analyzers.csproj
@@ -19,7 +19,6 @@
-
diff --git a/src/Mvc/Mvc.Analyzers/src/Microsoft.AspNetCore.Mvc.Analyzers.nuspec b/src/Mvc/Mvc.Analyzers/src/Microsoft.AspNetCore.Mvc.Analyzers.nuspec
index 106615a7da..2cba2a2f13 100644
--- a/src/Mvc/Mvc.Analyzers/src/Microsoft.AspNetCore.Mvc.Analyzers.nuspec
+++ b/src/Mvc/Mvc.Analyzers/src/Microsoft.AspNetCore.Mvc.Analyzers.nuspec
@@ -2,12 +2,11 @@
$CommonMetadataElements$
- packageIcon.png
+ $CommonFileElements$
-
diff --git a/src/Mvc/Mvc.Api.Analyzers/src/Microsoft.AspNetCore.Mvc.Api.Analyzers.csproj b/src/Mvc/Mvc.Api.Analyzers/src/Microsoft.AspNetCore.Mvc.Api.Analyzers.csproj
index 0ae605cb69..d3a6e138f1 100644
--- a/src/Mvc/Mvc.Api.Analyzers/src/Microsoft.AspNetCore.Mvc.Api.Analyzers.csproj
+++ b/src/Mvc/Mvc.Api.Analyzers/src/Microsoft.AspNetCore.Mvc.Api.Analyzers.csproj
@@ -24,7 +24,6 @@
-
diff --git a/src/Mvc/Mvc.Api.Analyzers/src/Microsoft.AspNetCore.Mvc.Api.Analyzers.nuspec b/src/Mvc/Mvc.Api.Analyzers/src/Microsoft.AspNetCore.Mvc.Api.Analyzers.nuspec
index 106615a7da..2cba2a2f13 100644
--- a/src/Mvc/Mvc.Api.Analyzers/src/Microsoft.AspNetCore.Mvc.Api.Analyzers.nuspec
+++ b/src/Mvc/Mvc.Api.Analyzers/src/Microsoft.AspNetCore.Mvc.Api.Analyzers.nuspec
@@ -2,12 +2,11 @@
$CommonMetadataElements$
- packageIcon.png
+ $CommonFileElements$
-
diff --git a/src/Mvc/Mvc.Core/src/ChallengeResult.cs b/src/Mvc/Mvc.Core/src/ChallengeResult.cs
index a0bcd94b00..c51cbe7700 100644
--- a/src/Mvc/Mvc.Core/src/ChallengeResult.cs
+++ b/src/Mvc/Mvc.Core/src/ChallengeResult.cs
@@ -11,7 +11,7 @@ using Microsoft.Extensions.Logging;
namespace Microsoft.AspNetCore.Mvc
{
///
- /// An that on execution invokes .
+ /// An that on execution invokes .
///
public class ChallengeResult : ActionResult
{
diff --git a/src/Mvc/Mvc.Core/src/ForbidResult.cs b/src/Mvc/Mvc.Core/src/ForbidResult.cs
index 78e4fc1274..4ae09b2451 100644
--- a/src/Mvc/Mvc.Core/src/ForbidResult.cs
+++ b/src/Mvc/Mvc.Core/src/ForbidResult.cs
@@ -11,7 +11,7 @@ using Microsoft.Extensions.Logging;
namespace Microsoft.AspNetCore.Mvc
{
///
- /// An that on execution invokes .
+ /// An that on execution invokes .
///
public class ForbidResult : ActionResult
{
diff --git a/src/Mvc/Mvc.Core/src/SignInResult.cs b/src/Mvc/Mvc.Core/src/SignInResult.cs
index 0f0ba36f20..010138ff81 100644
--- a/src/Mvc/Mvc.Core/src/SignInResult.cs
+++ b/src/Mvc/Mvc.Core/src/SignInResult.cs
@@ -12,7 +12,7 @@ using Microsoft.Extensions.Logging;
namespace Microsoft.AspNetCore.Mvc
{
///
- /// An that on execution invokes .
+ /// An that on execution invokes .
///
public class SignInResult : ActionResult
{
@@ -35,8 +35,8 @@ namespace Microsoft.AspNetCore.Mvc
/// The claims principal containing the user claims.
/// used to perform the sign-in operation.
public SignInResult(string authenticationScheme, ClaimsPrincipal principal, AuthenticationProperties properties)
- {
- AuthenticationScheme = authenticationScheme ?? throw new ArgumentNullException(nameof(authenticationScheme));
+ {
+ AuthenticationScheme = authenticationScheme ?? throw new ArgumentNullException(nameof(authenticationScheme));
Principal = principal ?? throw new ArgumentNullException(nameof(principal));
Properties = properties;
}
diff --git a/src/Mvc/Mvc.Core/src/SignOutResult.cs b/src/Mvc/Mvc.Core/src/SignOutResult.cs
index 61a9331bab..47dbfb8ecb 100644
--- a/src/Mvc/Mvc.Core/src/SignOutResult.cs
+++ b/src/Mvc/Mvc.Core/src/SignOutResult.cs
@@ -12,7 +12,7 @@ using Microsoft.Extensions.Logging;
namespace Microsoft.AspNetCore.Mvc
{
///
- /// An that on execution invokes .
+ /// An that on execution invokes .
///
public class SignOutResult : ActionResult
{
@@ -62,7 +62,7 @@ namespace Microsoft.AspNetCore.Mvc
/// The authentication scheme to use when signing out the user.
/// used to perform the sign-out operation.
public SignOutResult(IList authenticationSchemes, AuthenticationProperties properties)
- {
+ {
AuthenticationSchemes = authenticationSchemes ?? throw new ArgumentNullException(nameof(authenticationSchemes));
Properties = properties;
}
diff --git a/src/ProjectTemplates/TemplateProjects.props b/src/ProjectTemplates/TemplateProjects.props
index fd6dc06fe4..8cfab01c93 100644
--- a/src/ProjectTemplates/TemplateProjects.props
+++ b/src/ProjectTemplates/TemplateProjects.props
@@ -21,8 +21,4 @@
-
-
-
-
diff --git a/src/ProjectTemplates/Web.Spa.ProjectTemplates/content/Angular-CSharp/Program.cs b/src/ProjectTemplates/Web.Spa.ProjectTemplates/content/Angular-CSharp/Program.cs
index 69560b82e0..549d0b8bb8 100644
--- a/src/ProjectTemplates/Web.Spa.ProjectTemplates/content/Angular-CSharp/Program.cs
+++ b/src/ProjectTemplates/Web.Spa.ProjectTemplates/content/Angular-CSharp/Program.cs
@@ -2,9 +2,9 @@ using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
-using Microsoft.AspNetCore;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Configuration;
+using Microsoft.Extensions.Hosting;
using Microsoft.Extensions.Logging;
namespace Company.WebApplication1
@@ -13,11 +13,14 @@ namespace Company.WebApplication1
{
public static void Main(string[] args)
{
- CreateWebHostBuilder(args).Build().Run();
+ CreateHostBuilder(args).Build().Run();
}
- public static IWebHostBuilder CreateWebHostBuilder(string[] args) =>
- WebHost.CreateDefaultBuilder(args)
- .UseStartup();
+ public static IHostBuilder CreateHostBuilder(string[] args) =>
+ Host.CreateDefaultBuilder(args)
+ .ConfigureWebHostDefaults(webBuilder =>
+ {
+ webBuilder.UseStartup();
+ });
}
}
diff --git a/src/ProjectTemplates/Web.Spa.ProjectTemplates/content/React-CSharp/ClientApp/src/components/api-authorization/AuthorizeService.js b/src/ProjectTemplates/Web.Spa.ProjectTemplates/content/React-CSharp/ClientApp/src/components/api-authorization/AuthorizeService.js
index 87cfa82e86..4ca7bfc5c0 100644
--- a/src/ProjectTemplates/Web.Spa.ProjectTemplates/content/React-CSharp/ClientApp/src/components/api-authorization/AuthorizeService.js
+++ b/src/ProjectTemplates/Web.Spa.ProjectTemplates/content/React-CSharp/ClientApp/src/components/api-authorization/AuthorizeService.js
@@ -148,7 +148,7 @@ export class AuthorizeService {
throw new Error(`Found an invalid number of subscriptions ${subscriptionIndex.length}`);
}
- this._callbacks = this._callbacks.splice(subscriptionIndex[0].index, 1);
+ this._callbacks.splice(subscriptionIndex[0].index, 1);
}
notifySubscribers() {
diff --git a/src/ProjectTemplates/Web.Spa.ProjectTemplates/content/React-CSharp/Program.cs b/src/ProjectTemplates/Web.Spa.ProjectTemplates/content/React-CSharp/Program.cs
index 69560b82e0..549d0b8bb8 100644
--- a/src/ProjectTemplates/Web.Spa.ProjectTemplates/content/React-CSharp/Program.cs
+++ b/src/ProjectTemplates/Web.Spa.ProjectTemplates/content/React-CSharp/Program.cs
@@ -2,9 +2,9 @@ using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
-using Microsoft.AspNetCore;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Configuration;
+using Microsoft.Extensions.Hosting;
using Microsoft.Extensions.Logging;
namespace Company.WebApplication1
@@ -13,11 +13,14 @@ namespace Company.WebApplication1
{
public static void Main(string[] args)
{
- CreateWebHostBuilder(args).Build().Run();
+ CreateHostBuilder(args).Build().Run();
}
- public static IWebHostBuilder CreateWebHostBuilder(string[] args) =>
- WebHost.CreateDefaultBuilder(args)
- .UseStartup();
+ public static IHostBuilder CreateHostBuilder(string[] args) =>
+ Host.CreateDefaultBuilder(args)
+ .ConfigureWebHostDefaults(webBuilder =>
+ {
+ webBuilder.UseStartup();
+ });
}
}
diff --git a/src/ProjectTemplates/Web.Spa.ProjectTemplates/content/ReactRedux-CSharp/Program.cs b/src/ProjectTemplates/Web.Spa.ProjectTemplates/content/ReactRedux-CSharp/Program.cs
index a7108005ed..549d0b8bb8 100644
--- a/src/ProjectTemplates/Web.Spa.ProjectTemplates/content/ReactRedux-CSharp/Program.cs
+++ b/src/ProjectTemplates/Web.Spa.ProjectTemplates/content/ReactRedux-CSharp/Program.cs
@@ -1,11 +1,10 @@
using System;
using System.Collections.Generic;
-using System.IO;
using System.Linq;
using System.Threading.Tasks;
-using Microsoft.AspNetCore;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Configuration;
+using Microsoft.Extensions.Hosting;
using Microsoft.Extensions.Logging;
namespace Company.WebApplication1
@@ -14,11 +13,14 @@ namespace Company.WebApplication1
{
public static void Main(string[] args)
{
- CreateWebHostBuilder(args).Build().Run();
+ CreateHostBuilder(args).Build().Run();
}
- public static IWebHostBuilder CreateWebHostBuilder(string[] args) =>
- WebHost.CreateDefaultBuilder(args)
- .UseStartup();
+ public static IHostBuilder CreateHostBuilder(string[] args) =>
+ Host.CreateDefaultBuilder(args)
+ .ConfigureWebHostDefaults(webBuilder =>
+ {
+ webBuilder.UseStartup();
+ });
}
}
diff --git a/src/ProjectTemplates/templates.nuspec b/src/ProjectTemplates/templates.nuspec
index 49a1d320ec..33cb467b12 100644
--- a/src/ProjectTemplates/templates.nuspec
+++ b/src/ProjectTemplates/templates.nuspec
@@ -5,13 +5,12 @@
- packageIcon.png
+ $CommonFileElements$
-
diff --git a/src/SignalR/common/Http.Connections/src/Internal/HttpConnectionContext.cs b/src/SignalR/common/Http.Connections/src/Internal/HttpConnectionContext.cs
index 6d3fe467e9..dac620efa8 100644
--- a/src/SignalR/common/Http.Connections/src/Internal/HttpConnectionContext.cs
+++ b/src/SignalR/common/Http.Connections/src/Internal/HttpConnectionContext.cs
@@ -253,7 +253,7 @@ namespace Microsoft.AspNetCore.Http.Connections.Internal
if (TransportType == HttpTransportType.WebSockets)
{
- // The websocket transport will close the application output automatically when reading is cancelled
+ // The websocket transport will close the application output automatically when reading is canceled
Cancellation?.Cancel();
}
else
@@ -443,6 +443,45 @@ namespace Microsoft.AspNetCore.Http.Connections.Internal
}
}
+ internal async Task CancelPreviousPoll(HttpContext context)
+ {
+ CancellationTokenSource cts;
+ lock (_stateLock)
+ {
+ // Need to sync cts access with DisposeAsync as that will dispose the cts
+ if (Status == HttpConnectionStatus.Disposed)
+ {
+ cts = null;
+ }
+ else
+ {
+ cts = Cancellation;
+ Cancellation = null;
+ }
+ }
+
+ using (cts)
+ {
+ // Cancel the previous request
+ cts?.Cancel();
+
+ try
+ {
+ // Wait for the previous request to drain
+ await PreviousPollTask;
+ }
+ catch (OperationCanceledException)
+ {
+ // Previous poll canceled due to connection closing, close this poll too
+ context.Response.ContentType = "text/plain";
+ context.Response.StatusCode = StatusCodes.Status204NoContent;
+ return false;
+ }
+
+ return true;
+ }
+ }
+
public void MarkInactive()
{
lock (_stateLock)
diff --git a/src/SignalR/common/Http.Connections/src/Internal/HttpConnectionDispatcher.cs b/src/SignalR/common/Http.Connections/src/Internal/HttpConnectionDispatcher.cs
index 6ed9932839..9da1ea0c18 100644
--- a/src/SignalR/common/Http.Connections/src/Internal/HttpConnectionDispatcher.cs
+++ b/src/SignalR/common/Http.Connections/src/Internal/HttpConnectionDispatcher.cs
@@ -164,7 +164,7 @@ namespace Microsoft.AspNetCore.Http.Connections.Internal
Log.EstablishedConnection(_logger);
- // Allow the reads to be cancelled
+ // Allow the reads to be canceled
connection.Cancellation = new CancellationTokenSource();
var ws = new WebSocketsServerTransport(options.WebSockets, connection.Application, connection, _loggerFactory);
@@ -189,28 +189,15 @@ namespace Microsoft.AspNetCore.Http.Connections.Internal
return;
}
+ if (!await connection.CancelPreviousPoll(context))
+ {
+ // Connection closed. It's already set the response status code.
+ return;
+ }
+
// Create a new Tcs every poll to keep track of the poll finishing, so we can properly wait on previous polls
var currentRequestTcs = new TaskCompletionSource