Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Templates] SPA template proxy approach update #31564

Merged
merged 1 commit into from Apr 9, 2021

Conversation

javiercn
Copy link
Member

@javiercn javiercn commented Apr 6, 2021

  • Introduces a new package Microsoft.AspNetCore.SpaProxy to handle launching the SPA proxy as the frontend for the app.
  • Removes unnecessary references to Microsoft.AspNetCore.SpaExtensions.
  • Updates the angular template to use a new approach where the SPA frontend proxy forwards requests to the backend API.

Additional details are here

TL;DR
There is a new package responsible for launching an NPM command to start the proxy upon startup.
The proxy launches using https in 5002 and forwards requests to 5001 for the configured paths.
Users can run from VS with a single F5 gesture (same experience).
Users can run with dotnet run with a single gesture.
Users can start the proxy manually with npm start and then do dotnet run separately.

@javiercn javiercn requested review from Tratcher and a team as code owners April 6, 2021 17:00
@javiercn javiercn requested review from HaoK, pranavkm, SteveSandersonMS and a team April 6, 2021 17:01
@Pilchie Pilchie added the area-mvc Includes: MVC, Actions and Controllers, Localization, CORS, most templates label Apr 6, 2021
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.

using Microsoft.AspNetCore.Hosting;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sort usings

public async Task StartAsync(CancellationToken cancellationToken)
{
_logger.LogInformation("Starting SPA development server");
bool running = await ProbeSpaDevelopmentServerUrl(cancellationToken);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
bool running = await ProbeSpaDevelopmentServerUrl(cancellationToken);
var running = await ProbeSpaDevelopmentServerUrl(cancellationToken);

}
catch (HttpRequestException httpException)
{
_logger.LogDebug(httpException, "Failed to reach the SPA Development proxy.");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should use the LoggerMessage pattern

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is only used for tooling purposes at development time, the LoggerMessage pattern is a bit overkill for this case.

{
try
{
var space = _options.LaunchCommand.IndexOf(' ');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you write a comment about what it's doing here? This is the value of LaunchCommand, this is what we're trying to do etc?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We might also want to note that we're deliberately not supporting LaunchCommand executable paths that contain spaces (for example: "c:\Users\My User\nodejs\bin\npm.cmd", which might seem valid given the surrounding quotes).

Somebody out there is going to run into trouble with spaces but it's probably enough of an edge case not to address if it requires bringing in some more complex parsing logic, especially given how you've made it easy for them to launch the SPA dev server manually if they want.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This only needs to support yarn/npm <<verb>> <<args>> if you want something very specialize then you can always wrap it on a shell script and use that as your command.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added a comment to make it clear.

// kills this process in a "rude" way, but this gets 95% there.
// For cases where the proxy is left open and where there might not be a "visible" window the recomendation
// is to kill the process manually. (We will not fail, we will simply notify the proxy is "already" up.
if (!_spaProcess.CloseMainWindow())
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might want to check if the process hasn't already exited. But this seems like a reasonable thing to do.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I honestly have no idea what combination of behaviors might occur for different SPA dev servers and OSes in which shutdown scenarios. From memory, it's very tricky trying to get consistent behaviors for shutting down child processes.

In all likelihood we'll just have to see what happens in practice with the React/Angular/etc dev servers on different OSes and whether it leads to a workflow people find convenient. We can tweak the shutdown logic later if there are any problematic cases, such as something being left half-shut-down.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All the frameworks use the webpack dev server in the end. From my empirical tests CloseMainWindow() tries to do the right thing or returns false (but conveniently doesn't throw).

The behavior here is at least comparable to the behavior in the script runner SpaExtensions, I verified the shutdown across OSes on common scenarios (ctrl+c, close window, etc.). We might end up not even shipping this package in RTM, so I think it's good for now (or at least as good as its going to get)

{
_spaProcess.Kill(entireProcessTree: true);
_spaProcess = null;
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably want to dispose _spaProcess too

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This have made me think that this code might not be 100% correct, since I'm not 100% sure I should mock with the _spaProcess instance when running in the context of the finalizer. That said, I don't think that matters since this object is managed by the DI container and will always be disposed, and the worst case scenario is an that an exception is thrown and caught within the finalizer, which I think it's fine.

I'm not going to change it since that would require me to retest all the templates across OSs again.

.reduce((previous, current) => previous || current.groups.value, undefined) ||
process.env.npm_package_name;

if(!certificateName){
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if(!certificateName){
if (!certificateName) {

// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.

using Microsoft.AspNetCore.Hosting;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sort usings

private readonly HttpClient _httpClient = new(new HttpClientHandler()
{
// It's ok for us to do this here since this service is only plugged in during development.
ServerCertificateCustomValidationCallback = HttpClientHandler.DangerousAcceptAnyServerCertificateValidator
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a fairly minor point as it would only matter potentially in the future but... it feels kinda dangerous to have this _httpClient lying around in this state, as someone might start using it for other purposes in the future where they actually need cert validation to happen as usual.

Since this HttpClient instance is only used to probe for the SPA server startup, it might be nice not to have it as a class-level field, and instead new up an instance each time we're going to do a set of calls into ProbeSpaDevelopmentServerUrl. The perf cost of doing that would be nothing in practice.

{
try
{
var response = await _httpClient.GetAsync(_options.ServerUrl, cancellationToken);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How long might this call last? Do we generally find that the SPA dev servers reply instantly if they are alive, or do they potentially wait minutes while going through a webpack build?

Maybe even if they do take ages it's desirable to wait for them. Just asking to clear up my understanding of the startup flow.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It comes back right away. However I've updated the code to add a timeout after 1 second or if the host request cancellation, whatever happens first.

var sw = Stopwatch.StartNew();
var livenessProbeSucceeded = false;
var maxTimeoutReached = false;
while (_spaProcess != null && !_spaProcess.HasExited && !livenessProbeSucceeded && !maxTimeoutReached)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like the !livenessProbeSucceeded part of this condition isn't needed, because it only becomes true on L79, after which we'd break out of the loop anyway.

Suggested change
while (_spaProcess != null && !_spaProcess.HasExited && !livenessProbeSucceeded && !maxTimeoutReached)
while (_spaProcess != null && !_spaProcess.HasExited && !maxTimeoutReached)

var maxTimeoutReached = false;
while (_spaProcess != null && !_spaProcess.HasExited && !livenessProbeSucceeded && !maxTimeoutReached)
{
livenessProbeSucceeded = await ProbeSpaDevelopmentServerUrl(cancellationToken);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we impose a shorter timeout here than whatever cancellationToken has? Since we're polling, it would seem more natural to only wait a few seconds at a time, rather than potentially waiting for minutes on each loop.

The MaxTimeout will only be honored with reasonable accuracy if each polling loop is short enough.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Each poll attempt will wait at most 1 second to receive an answer and 1 second after each unsuccessful connection

<ContentWithTargetPath Include="$(_SpaProxyServerLaunchConfig)" CopyToOutputDirectory="PreserveNewest" CopyToPublishDirectory="Never" TargetPath="spa.proxy.json" />
<FileWrites Include="$(_SpaProxyServerLaunchConfig)" />
</ItemGroup>
</Target>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is an interesting design. TBH I was expecting developers to create and edit the spa.proxy.json file themselves - I didn't predict we'd be generating it at build time based on a set of MSBuild properties.

One drawback to generating it like this is with formatting. The logic here will produce an invalid JSON file if SpaProxyLaunchCommand contains a " character, which could actually be very common since people like to pass all kinds of arguments to their startup commands. Not sure if \n or other characters would cause issues too.

Do you think the MSBuild properties are more discoverable/convenient than just telling people to drop in a spa.proxy.json file to their project? In both cases they will only know about this by reading some docs or tutorial, so in either design we're relying on them copy/pasting stuff.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One drawback to generating it like this is with formatting. The logic here will produce an invalid JSON file if SpaProxyLaunchCommand contains a " character, which could actually be very common since people like to pass all kinds of arguments to their startup commands. Not sure if \n or other characters would cause issues too.

In general you should put arguments inside package.json otherwise you loose the ability to run npm/yarn start from the cli. I started down that route where the command in the project file contained everything. There are alternatives to make this work for all people if needed, like wrapping the command in a script file and using the script for launch instead.

Comment on lines 25 to 39
spawn(
'dotnet',
[
'dev-certs',
'https',
'--export-path',
certFilePath,
'--format',
'Pem',
'--no-password',
],
{
stdio: 'inherit',
}
).on('exit', (code) => process.exit(code));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

By all means please ignore this suggestion if you don't like it, but the code might seem less intimidating and easier to skim-read if formatted closer to the JS-typical brace style and more compactly:

Suggested change
spawn(
'dotnet',
[
'dev-certs',
'https',
'--export-path',
certFilePath,
'--format',
'Pem',
'--no-password',
],
{
stdio: 'inherit',
}
).on('exit', (code) => process.exit(code));
spawn('dotnet', [
'dev-certs', 'https',
'--no-password',
'--export-path', certFilePath,
'--format', 'Pem',
], { stdio: 'inherit' })
.on('exit', code => process.exit(code));

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

vs code formatting is fighting me :). I'll fix it, it used to be that way

Comment on lines 11 to 14
const certificateName = process.argv.map(arg => arg.match(/--name=(?<value>.+)/i))
.filter(Boolean)
.reduce((previous, current) => previous || current.groups.value, undefined) ||
process.env.npm_package_name;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some slightly funky formatting going on here. Also if you're interested, this can be done without reduce which would reduce the scariness factor a bit:

Suggested change
const certificateName = process.argv.map(arg => arg.match(/--name=(?<value>.+)/i))
.filter(Boolean)
.reduce((previous, current) => previous || current.groups.value, undefined) ||
process.env.npm_package_name;
const certificateArg = process.argv.map(arg => arg.match(/--name=(?<value>.+)/i)).filter(Boolean)[0];
const certificateName = certificateArg ? certificateArg.groups.value : process.env.npm_package_name;

The ternary could be reduced further to certificateArg?.groups.value || process.env.npm_package_name but I think that's harder to understand.

Since this is just code style please feel free to ignore the suggestion!

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

?. and stuff like that is not a good idea in these script files since they need to run in node, but I get your point.

I didn't know you could index on an empty array in JS, that's tricky but neat!

{
spa.UseAngularCliServer(npmScript: "start");
}
endpoints.MapFallbackToFile("index.html");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, this file looks a lot nicer now! Great stuff!

Copy link
Member

@SteveSandersonMS SteveSandersonMS left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks superb to me. I'm impressed you were able to find ways of bringing so much functionality while hardly increasing the conceptual load or implementation complexity at all.

javiercn added a commit that referenced this pull request Apr 9, 2021
* A new package Microsoft.AspNetCore.SpaProxy has been added that is
  used by the templates to launch their development proxy via npm/yarn.
* The SPA development proxy for each CLI now is the frontend for the
  application and proxies the requests to the backend which is the
  ASP.NET Core application.
* At publish time the application assets are copied to the wwwroot.
* SpaServices.Extensions has been removed from the templates since it is
  no longer needed. MapFallbackToFile("index.html") handles unknown
  requests and serves the SPA entry point.
* The templates have been updated to keep using HTTPS with the SPA proxy
  configured to use the ASP.NET Core HTTPS development certificate via a
  new aspnetcore-https.js file that ships within the template.
* The configuration for angular has been updated with a proxy.conf.js
  file to proxy requests to the backend.
* The entry point for the application in development is now
  https://localhost:5002 when using https and http://localhost:5002
  otherwise.
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.DependencyInjection;

[assembly: HostingStartup(typeof(Microsoft.AspNetCore.SpaProxy.SpaHostingStartup))]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a development time only package that we wire-up in launchSettings.json and that takes care of launching the angular/react proxy server when you do dotnet run it's not used in the published app.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can find all the details here

}
}

~SpaProxyLaunchManager()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is there a finalizer?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To ensure cleanup of the process in as many situations as possible. This is a development time only package

@javiercn javiercn merged commit 6bc4b79 into main Apr 9, 2021
@javiercn javiercn deleted the javiercn/spa-proxy-update branch April 9, 2021 18:23
eugene2candy pushed a commit to eugene2candy/Home that referenced this pull request Apr 10, 2021
* Update dependencies from https://github.com/dotnet/efcore build 20210315.3 (dotnet#30960)

[main] Update dependencies from dotnet/efcore

* Feedback from Pranav

* Remove regex use in DataProtection (dotnet#30855)

* Fix null ref in SyntaxTokenCache (dotnet#30978)

Fixes dotnet#27154

* Pool SocketSenders (dotnet#30771)

- SocketAsyncEventArgs have lots of state on them and as a result are quite big (~350) bytes at runtime. We can pool these since sends are usually very fast and we can reduce the per connection overhead as a result.
- We also allocate one per IOQueue to reduce contention.
- Fixed buffer list management
- Disposed pool when the transport is disposed
- Added project to slnf so running tests in VS was possible
- Clear the buffer and buffer list before returning to the pool
- This cleans up dumps as the pooled senders don't see references to buffers
while pooled in the queue
- Keep track of items in the pool separately from the queue count.

* Add Consolidated view classifier to make view types internal (dotnet#30976)

* Add Consolidated view classifier to make view types internal

* Address feedback from peer review

* Address feedback and fix tests

* Fix nullability of TypeNameHelper.GetTypeDisplayName parameter (dotnet#30987)

* [main] Update dependencies from dotnet/runtime dotnet/efcore (dotnet#30968)

[main] Update dependencies from dotnet/runtime dotnet/efcore


 - Remove assemblies from the ref and runtime pack

 - Remove more references

* Update src/Features/JsonPatch/src/Internal/ConversionResultProvider.cs

Co-authored-by: Pranav K <prkrishn@hotmail.com>

* Update src/Features/JsonPatch/src/PublicAPI.Unshipped.txt

Co-authored-by: Pranav K <prkrishn@hotmail.com>

* Update dependencies from https://github.com/dotnet/efcore build 20210316.2 (dotnet#30991)

[main] Update dependencies from dotnet/efcore

* HTTP/3 input validation and connection abort (dotnet#29665)

* Connection error for invalid HTTP/3 frame on request stream

* Update src/Servers/Kestrel/Core/src/CoreStrings.resx

* Write frame types and errors codes in logs as per spec

* Clean up

* Add HTTP/3 connection exception with code

* Connection abort

* More abort connection stuff

* More test

* More tests

* PR feedback

* Update dependencies from https://github.com/dotnet/efcore build 20210317.1 (dotnet#30998)

[main] Update dependencies from dotnet/efcore

* helix + pw + linux/osx (dotnet#30676)

* [main] Update dependencies from dotnet/runtime dotnet/efcore (dotnet#30999)

[main] Update dependencies from dotnet/runtime dotnet/efcore

* Dispose streams that don't fit in pool (dotnet#30995)

* Dispose streams that don't fit in pool

* PR feedback

* Update NodeJS dependency in build instructions (dotnet#31000)

* Respect consolidated views in all document classifiers (dotnet#31008)

* Respect consolidated views in all document classifiers

* Address feedback from peer review

* E2E test apps for WinForms and WPF BlazorWebView (dotnet#31021)

* Add API to Renderer to trigger a UI refresh on hot reload (dotnet#30884)

* Add API to Renderer to trigger a UI refresh on hot reload

Fixes dotnet#30816

* Update RazorExtensions.cs (dotnet#31029)

* Fix credscan issues in aspnetcore (dotnet#30337)

* Fix credscan issues in DataProtection

* Fix credscan issues in Identity, except where they affect checked in certs

* Updated scan

* [Blazor] Adds static web assets support for Blazor desktop (dotnet#31041)

* Wires up static web assets support on the WebViewManager.

* Support ElementReference.Focus in WebView (dotnet#31050)

* Support InputFile in WebView (dotnet#31049)

* Update DotNetMuxerTest (dotnet#31053)

Fixes dotnet#24082

* Bring back working DevServer packaging setup (dotnet#31043)

* Bring pack working DevServer packaging setup

* Revert "Bring pack working DevServer packaging setup"

This reverts commit 0dda92e.

* Update runtimeconfig.template.json

* Quarantine one failing test (dotnet#31045)

- dotnet#31044
- `RazorPagesTemplate_RazorRuntimeCompilation_BuildsAndPublishes()`

* Update SDK to bring unified assembly changes (dotnet#31039)

* Update SDK to bring unified assembly changes

* Update SDK to pick up Razor pages fix

* Fixup test

Co-authored-by: Pranav K <prkrishn@hotmail.com>

* Update launchSettings to indicate hotReload is to be used (dotnet#31060)

* Fix race in FrameAfterTrailers_UnexpectedFrameError dotnet#30754 (dotnet#31061)

* Fix JS interop cases in WebView (dotnet#31054)

* Template tests: Create dev cert only once (dotnet#31012)

* Simplify Razor bug reports. (dotnet#31033)

* Simplify Razor bug reports.

- We now have better mechanisms for capturing information so no need to scare users off.

* Address code review feedback

* [Blazor][Desktop] Mark packages as shipping (dotnet#31035)

* Make packages shipping
* Update RepoTasks to msbuild 16.9
* Update global.json
* Update Nuget

* Remove WebView dependency to AspNetCore.App (dotnet#31071)

The Blazor Desktop project must not depend on Microsoft.AspNetCore.App because it needs to run on almost any platform, including Android/iOS. But AspNetCore.App doesn't run on those platforms. This changes WebView to not use any packages that are part of AspNetCore.App, such as StaticFiles and Http.Abstractions. Instead, it has copies of those files.

* Use longer delay in test (dotnet#31072)

* [SignalR TS] Fix permanent Disconnecting state (dotnet#30948)

* Changed logLevel to Information instead of warning for EphemeralDataProtectionProvider (dotnet#29405)

Fixes dotnet#29107

* [Blazor][Desktop] Fixes nullable annotations on the public API baselines (dotnet#31073)

* Fix nullable annotations
* Fix APIs
* Add missing API baseline file

* Implements shadow copying for ASP.NET Core + IIS (dotnet#28357)

* Suppress generating source checksums when configured (dotnet#31089)

Hot reload / EnC does not like it when type level attributes are modified. Razor views and Pages
include a RazorSourceChecksumAttribute that includes a checksum of all of it's inputs (current cshtml file, and
all _ViewImports that contribute to it). It's used used by runtime compilation to tell if the compiled view is
current compared to it's inputs. However, it gets in the way with enc since editing a file updates the checksum.

We'll disable this feature by default in RazorSourceGenerator, and enable it using an MSBuild switch that's configured
by runtime compilation

* Caching Redis: Add option to register profiling session (dotnet#31018)

* Add option to register profiling session

* Add API change

* Fix public API declaration

* Cleanup

* Quarantine and fix RequestTrailers_CanReadTrailersFromRequest dotnet#31057 (dotnet#31059)

* Sync shared code from runtime (dotnet#31094)

Co-authored-by: Tratcher <Tratcher@users.noreply.github.com>

* Revert "Remove ANCM shim and outofprocess handler from Runtime SiteEx… (dotnet#31042)

* Revert "Remove ANCM shim and outofprocess handler from Runtime SiteExtension (dotnet#24884)"

This reverts commit 7f7528f.

* Enable site extension build temporarily

* Enable build native

* Fixing site extension build

* No need to set

* Fixing up build

* Update .azure/pipelines/ci.yml

* Update ci.yml

* retry

* Update .azure/pipelines/ci.yml

* Follow ups for Blazor AOT (dotnet#31098)

* Follow ups for Blazor AOT

* Add Emscripten packs to manifest
* Update acquire tool to use manifest from the dotnet sdk
* Add AOT option to templates

* Undo Emscripten for now

* [Blazor] [Desktop] Exclude Resources.resx from the embedded file manifest (dotnet#31107)

Excludes unnecessary embedded resources from the embedded files manifest provider.

* Fix some low hanging allocation fruit (dotnet#31115)

* Fix some low hanging allocation fruit
- Use singleton pipe options
- Use Task.Yield instead of AwaitableThreadPool on the server side
- Change WebSocketMiddleware handshake helpers to remove enumerator allocations.

* Fix issues preventing hot reload for Blazor WASM (dotnet#31108)

* Configure DOTNET_MODIFIABLE_ASSEMBLIES=debug env variable
* Fixup broken reflection

* Fixup targeting pack intermediate zip version

* Add new Polly DI extension method for HttpClientFactory (dotnet#28283)

* Fix IDE warnings

Fix IDE warnings about non-disposed handlers.

* Update return type documentation

Update the comment's type to match the method's.

* Add new AddPolicyRegistry overload

Add a new overload for AddPolicyRegistry() that allows the
caller to configure the policy registry using other services
that are registered with the service provider, such as config.

* Add more nullability to Mvc.Core (dotnet#31076)

* Update nuget & msbuild versions (dotnet#31064)

* Update nuget & msbuild versions

* Update RepoTasks.csproj

* Fix one test

* Fix all tests

* Update dependencies from https://github.com/dotnet/arcade build 20210317.3 (dotnet#31124)

Microsoft.DotNet.Build.Tasks.Installers , Microsoft.DotNet.Arcade.Sdk , Microsoft.DotNet.Helix.Sdk
 From Version 6.0.0-beta.21160.7 -> To Version 6.0.0-beta.21167.3

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>

* Update branding to 6.0.0-preview4

* Revert "Update branding to 6.0.0-preview4"

This reverts commit 5c8e9f1.

* Added missing event ids for hosting events (dotnet#31149)

- Fixed slnf file

* Don't separately build arm64 installers

* Don't build targeting pack nupkgs

* Undo change that stopped building installers in win-arm64 leg.

This reverts commit 03aab5d.

* Update comment

* Update branding to 6.0.0-preview4 (dotnet#31153)

* Dispose the DiagnosticListener (dotnet#31170)

- Add the DiagnosticListener to the DI container as a lambda so it gets disposed.

* Add support for tabs vs. spaces settings for generated files

* Fixed grammar on `SessionOptions.IOTimeout` XML (dotnet#31174)

Fixed grammar on `SessionOptions.IOTimeout`

* Resolve remaining credscan bugs (dotnet#31157)

* Default to Kestrel over IISExpress (dotnet#31161)

* Update CONTRIBUTING.md (dotnet#31167)

* Update CONTRIBUTING.md

* Follow-up edits

* Add tracing to templates process launch for debugging (dotnet#31202)

* Add tests

* Cleanup

* Cleanup

* Remove unsafe from BytesOrdinalEqualsStringAndAscii (dotnet#31201)

* Add field

* Cleanup

* Revert changes to global.json

* fix naming

* Add hotReloadProfile to Razor Pages template (dotnet#31197)

* BlazorTemplate test improvements (dotnet#30907)

* Split the HPackEncoder partial class (dotnet#31210)

* [main] Update dependencies from dotnet/runtime dotnet/efcore (dotnet#31020)

[main] Update dependencies from dotnet/runtime dotnet/efcore


 - Do not declare iOS and Android support everywhere
- runtime update includes new annotations making non-support obvious
- see dotnet/runtime#49354 (w/ a similar Android PR coming soon)

 - !fixup! Fix typo in item group name

 - !fixup! Set `$(RemoveDevicePlatformSupport)` in correct project
- not needed in BlazorManifest.csproj
- but, is needed in dotnet-install-blazoraot.csproj

 - suppress

 - Fixup

* Annotate Blazor wasm auth assemblies for trimmability (dotnet#31119)

Minor cleanup when inspecting the code

* Creates script command for sql-cache-tool (dotnet#30398)

* Creates script command for sql-cache-tool
* Includes idempotency, output to stdout, or specific file
* Fixes help suggestion to be command-specific

* Corrects typo

* Revert "BlazorTemplate test improvements (dotnet#30907)" (dotnet#31223)

This reverts commit 730e39b.

* Sync shared code from runtime (dotnet#31182)

Co-authored-by: dotnet <dotnet@users.noreply.github.com>

* Unquarantine BootResourceCachingTest (dotnet#31154)

* Resolve final credscan bug (dotnet#31196)

* READMEs for Servers (dotnet#31207)

* READMEs for Servers

* Remove en-us

* Update src/Servers/README.md

Co-authored-by: Brennan <brecon@microsoft.com>

* Update src/Servers/Kestrel/README.md

Co-authored-by: Chris Ross <Tratcher@Outlook.com>

* Update src/Servers/IIS/README.md

Co-authored-by: Chris Ross <Tratcher@Outlook.com>

* Feedback

* Update src/Servers/HttpSys/README.md

* Quick test

* HttpSys

* Update README.md

* Feedback

* Update src/Servers/IIS/README.md

Co-authored-by: Günther Foidl <gue@korporal.at>

* Update src/Servers/Kestrel/README.md

Co-authored-by: Günther Foidl <gue@korporal.at>

Co-authored-by: Brennan <brecon@microsoft.com>
Co-authored-by: Chris Ross <Tratcher@Outlook.com>
Co-authored-by: Günther Foidl <gue@korporal.at>

* Components test parole for good behavior (dotnet#31156)

* Add hotReloadProfile to Razor Pages template (dotnet#31216)

* Add hotReloadProfile to Razor Pages template

* Turn off hotReloadProfile for Blazor WebAssembly projects

The WebAssembly experience is a bit problematic in preview3 because of runtime issues
dotnet/runtime#50190. We'll turn it off in the templates by default
to avoid giving a confusing experience out of the box.

* [main] Update dependencies from dotnet/efcore dotnet/runtime (dotnet#31220)

[main] Update dependencies from dotnet/efcore dotnet/runtime

* Readmes for HTTP and Site Extensions (dotnet#31250)

* Readmes for HTTP and Site Extensions

* Apply suggestions from code review

Co-authored-by: Brennan <brecon@microsoft.com>

Co-authored-by: Brennan <brecon@microsoft.com>

* Update dependencies from https://github.com/dotnet/efcore build 20210325.2 (dotnet#31254)

[main] Update dependencies from dotnet/efcore

* Refactor and fix failing tests

* Revert global.json changes

* Enable CA2012 (Use ValueTask Correctly) (dotnet#31221)

* Unquarantine a couple servers tests (dotnet#31213)

* Update src/Razor/Microsoft.AspNetCore.Razor.Language/src/CodeGeneration/CodeWriter.cs

Co-authored-by: Pranav K <prkrishn@hotmail.com>

* Sync shared code from runtime (dotnet#31271)

Co-authored-by: Tratcher <Tratcher@users.noreply.github.com>

* Update dependencies from https://github.com/dotnet/runtime build 20210326.1 (dotnet#31277)

[main] Update dependencies from dotnet/runtime

* Use Emscripten SDKs in WASM workload (dotnet#31259)

* Update dependencies from https://github.com/dotnet/efcore build 20210326.1 (dotnet#31283)

[main] Update dependencies from dotnet/efcore

* Clean up verbiage on build scripts (dotnet#31262)

* Clean up verbiage on build scripts

* Update docs/BuildFromSource.md

Co-authored-by: Kevin Pilch <kevinpi@microsoft.com>

Co-authored-by: Kevin Pilch <kevinpi@microsoft.com>

* Enable nullable on more authentication projects (dotnet#31230)

* Enable nullable on Azure projects (dotnet#31298)

* Reduce allocations for Cookies. (dotnet#31258)

* Update dependencies from https://github.com/dotnet/efcore build 20210326.2 (dotnet#31292)

[main] Update dependencies from dotnet/efcore

* [release/6.0-preview3] Update dependencies from dotnet/efcore dotnet/runtime (dotnet#31255)

[release/6.0-preview3] Update dependencies from dotnet/efcore dotnet/runtime


 - Port changes from main

 - Merge branch 'release/6.0-preview3' into darc-release/6.0-preview3-ce4fb228-ea32-4f60-95e1-0e60d42e3fc3

* [main] Update dependencies from dotnet/runtime dotnet/efcore (dotnet#31310)

[main] Update dependencies from dotnet/runtime dotnet/efcore

* Update dependencies from https://github.com/dotnet/runtime build 20210327.4 (dotnet#31329)

[main] Update dependencies from dotnet/runtime

* Fix comment grammar (dotnet#31326)

Minor update to XML docs to fix sentence grammar.

* Use LoggerMessage.Define in HttpSys (dotnet#31333)

- Use LoggerMessage.Define() throughout HttpSys instead of ILogger extension methods.
- Also updates two incorrect event Id field names.

Fixes dotnet#31313.

* Reduce the per connection overhead in SocketConnection (dotnet#31308)

* Reduce the per connection overhead in SocketConnection
- Removed 3 state machines (StartAsync, ProcessSends and ProcessReceives)
- Use ValueTask to remove delegate allocation on both senders and receivers
- Remove field from DoSend and DoReceive state machine

* Faster strongly typed features for server FeatureCollection (dotnet#31322)

- Use strongly typed features
- Use Unsafe.As to workaround dotnet/runtime#49614
- Do the casting it for Set<T> as well
- Add more benchmarks
- Reorder features (order of reset);

* Update dependencies from https://github.com/dotnet/runtime build 20210328.6 (dotnet#31350)

[main] Update dependencies from dotnet/runtime

* Move logging to separate class to prevent allocation per generic type (dotnet#31345)

* Badges, badges! (Licence, Help wanted, Good first issue, Chat) (dotnet#31341)

* Badges, badges! (Licence, Help wanted, Good first issue, Chat)

* Use correct links

* Update dependencies from https://github.com/dotnet/efcore build 20210329.1 (dotnet#31351)

[main] Update dependencies from dotnet/efcore

* Fix WebView header APIs and behavior (dotnet#31246)

* Fix WebView header APIs and behavior
- Change WebView to return dictionary of headers instead of strings (this is needed for Android)
- Change StaticContentProvider to use filename (always exists) instead of physical file path (not always available) to determine MIME type
- Fix WPF sample bug

* Update dependencies from https://github.com/dotnet/efcore build 20210329.2 (dotnet#31352)

[main] Update dependencies from dotnet/efcore

* Update dependencies from https://github.com/dotnet/efcore build 20210327.1 (dotnet#31309)

[release/6.0-preview3] Update dependencies from dotnet/efcore

* Update dependencies from https://github.com/dotnet/runtime build 20210329.3 (dotnet#31363)

[release/6.0-preview3] Update dependencies from dotnet/runtime

* Refactor logging in generic classes (dotnet#31364)

* Update dependencies from https://github.com/dotnet/efcore build 20210329.4 (dotnet#31366)

[release/6.0-preview3] Update dependencies from dotnet/efcore

* Update dependencies from https://github.com/dotnet/efcore build 20210329.3 (dotnet#31353)

[main] Update dependencies from dotnet/efcore

* Make RequestDelegateFactory public (was MapActionExpressionTreeBuilder) (dotnet#31171)

* Make RequestDelegateBuilder public

- Formerly known as MapActionExpressionTreeBuilder

* Add new BuildRequestDelegate overloads

* Address PR feedback

* RequestDelegateBuilder -> RequestDelegateFactory

* Build -> Create

* Address final review feedback.

* [Http] Remove some unsafe code and save a string allocation (dotnet#31267)

* Use one shot pbkdf2 (dotnet#31200)

* Use one shot pbkdf2

* Update NetCorePbkdf2Provider.cs

* CR feedback

* CR feedback

* Fix

* Just use GetBytes for now

* Update NetCorePbkdf2Provider.cs

* Use interned Header Names for known headers not in the pre-allocated block (dotnet#31311)

* Use interned headernames for known headers not in the preallocated block

* Switch Connection header values for interned values

* Use interned strings for websockets

* Keep baggage, tracestate, and traceparent with previous casing

* Update src/Servers/Kestrel/shared/KnownHeaders.cs

Co-authored-by: Chris Ross <Tratcher@Outlook.com>

* Feedback

Co-authored-by: Chris Ross <Tratcher@Outlook.com>

* Revert global.json changes

* Modify constructor

* Remove IReceiveHotReloadContext and HotReloadContext (dotnet#31281)

* Remove IReceiveHotReloadContext and HotReloadContext

React to API review feedback. Substitute IReceiveHotReloadContext and HotReloadContext
with RenderHandle.IsHotReloading

* Fixup

* Update src/Components/Components/src/RenderHandle.cs

* Update src/Components/Components/src/Properties/ILLink.Substitutions.xml

* Update src/Components/Components/src/Properties/ILLink.Substitutions.xml

* Flow Kestrel CancellationTokens to BindAsync (dotnet#31377)

* Update dependencies from https://github.com/dotnet/runtime build 20210329.5 (dotnet#31384)

[main] Update dependencies from dotnet/runtime

* [main] Update dependencies from dotnet/arcade (dotnet#31349)

[main] Update dependencies from dotnet/arcade

* Quarantine flaky test (dotnet#31389)

* Clean up NetCore PBKDF2 provider. (dotnet#31391)

* Update dependencies from https://github.com/dotnet/runtime build 20210330.7 (dotnet#31394)

[release/6.0-preview3] Update dependencies from dotnet/runtime

* Add a FeaturesCollection constructor that supports initial capacity (dotnet#31381)

* Add a FeaturesCollection constructor that supports initial capacity

* Raise authenticationFailed event when cert validation fails (dotnet#31370)

* Unquarantine UseStartupFactoryWorks (dotnet#31297)

* Update dependencies from https://github.com/dotnet/efcore build 20210330.1 (dotnet#31400)

[release/6.0-preview3] Update dependencies from dotnet/efcore

* Update dependencies from https://github.com/dotnet/efcore build 20210330.2 (dotnet#31401)

[main] Update dependencies from dotnet/efcore

* Fix generated CSS scopes in layout views and update templates (dotnet#31257)

* Fix generated CSS scopes in layout views and update templates

* Update template baselines

* Enabled scoped CSS for MVC template tests

* Bring back static CSS file

* Quarantine ClosesAfterDataSent (dotnet#31405)

* Update CONTRIBUTING.md (dotnet#31371)

Removed tab that seemed to cause a paragraph about the new help wanted label to be in a code fence.

* Support round trip serialization of AuthenticationProperties with System.Text.Json (dotnet#31330) dotnet#20722

* Update Microsoft.Net.Compilers.Toolset (dotnet#31403)

* Improve test failures for unexpected logs (dotnet#31406)

* Add ToString() to Testing's log WriteContext

* Update StrictTestServerTests to only show unexpected log

* Undo template change that induced flakiness (dotnet#31417)

* Add helpful exception message when exception handler returns 404 (dotnet#31142)

* Update dependencies from https://github.com/dotnet/runtime build 20210331.6 (dotnet#31421)

[release/6.0-preview3] Update dependencies from dotnet/runtime

* Do not serialize Parameters property on AuthenticationProperties (dotnet#31414)

* Do not serialize Parameters

Explicitly prevent the Parameters dictionary from being included in the deserialized payload.
See dotnet#31330 (comment).

* Ignore props backed by Items

Also ignore the properties backed by the Items dictionary to minimise the size of the serialized JSON payload.

* Add ignoreLineEndingDifferences

Stop tests from failing on non-Windows OSs due to different line endings.

* ArPow stage 1: local source-build infrastructure (dotnet#31235)

Conflicts:
	eng/Version.Details.xml

Co-authored-by: John Luo <johluo@microsoft.com>

* [main] Update dependencies from dotnet/runtime dotnet/efcore (dotnet#31411)

[main] Update dependencies from dotnet/runtime dotnet/efcore

* Update dependencies from https://github.com/dotnet/efcore build 20210331.4 (dotnet#31424)

[release/6.0-preview3] Update dependencies from dotnet/efcore

* Fix project path in slnf (dotnet#31431)

* Fix trailing comma in Caching.slnf (dotnet#31438)

* Fix file headers in src/Caching (dotnet#31439)

* [SignalR Java] Update to RxJava3 (dotnet#31426)

* Fixed de-duping hosting startup assemblies (dotnet#31440)

- De-dupe hosting startup assemblies based on assembly instance not the name of the assembly. Names can be short or long and we don't know if they resolve to the same assembly. Instead of trying to mess with names, we just check to make sure that the instance isn't the same.

* Trim down framework references for Blazor dev server (dotnet#31420)

* Only include Microsoft.AspNetCore.App framework reference for Blazor dev server
* Address feedback from peer review
* Use SharedFxVersion property

* Cross-target last few projects to DefaultNetCoreTargetFramework (dotnet#31239)

* Cross-target last 2 projects to DefaultNetCoreTargetFramework

* More projects

* Fixup

* Fixup again

* Fixup

* Undo SiteExtension change

* Update src/SiteExtensions/LoggingBranch/LB.csproj

Co-authored-by: Doug Bunting <6431421+dougbu@users.noreply.github.com>

Co-authored-by: Doug Bunting <6431421+dougbu@users.noreply.github.com>

* [main] Update dependencies from dotnet/runtime dotnet/efcore (dotnet#31425)

[main] Update dependencies from dotnet/runtime dotnet/efcore

* Use integer division trick to get exact base64 length (dotnet#31442)

* Add nullability to more MVC assemblies (dotnet#31338)

* Add nullability to more MVC assemblies

* [x] MVC.Cors
* [x] Mvc.DataAnnotations
* [x] Mvc.Localization
* [x] Mvc.Newtonsoft.Json
* [ ] Mvc.ViewFeatures (partial)

* Fixup

* Update src/Mvc/Mvc.ViewFeatures/src/Rendering/ViewContext.cs

* Apply suggestions from code review

* Update RazorPagePropertyActivator.cs

* Update assembly check on EventHandlerTagHelperDescriptorProvider (dotnet#31458)

* Remove legacy routing (dotnet#31295)

* [release/6.0-preview3] Update dependencies from dotnet/runtime dotnet/efcore (dotnet#31451)

[release/6.0-preview3] Update dependencies from dotnet/runtime dotnet/efcore

* Update dependencies from https://github.com/dotnet/arcade build 20210331.6 (dotnet#31427)

[main] Update dependencies from dotnet/arcade


 - Merge branch 'main' into darc-main-2c400715-e553-48d8-8d43-983dc7aa4b7d

* Update dependencies from https://github.com/dotnet/efcore build 20210401.3 (dotnet#31468)

[main] Update dependencies from dotnet/efcore

* Fix project paths in Azure.slnf (dotnet#31435)

* Fix project paths in Azure.slnf

* Update Azure.slnf

* Update IdentityModel versions to 6.10.0 dotnet#31454 (dotnet#31482)

* Removed static activity source from hosting (dotnet#31483)

* Removed static activity source from hosting
- Get it from DI instead

* Fixed test

* Use Random.Shared property (dotnet#31453)

* Use Random.Shared

Use the new .NET 6 Random.Shared static property where possible.
See dotnet/runtime#50297.

* Revert WebApi-CSharp changes

For some reason I don't understand, this template doesn't see Random.Shared when compiled so this reverts the previous change for this template.

* Remove baseline suppressions from 5.0 (dotnet#29934)

* Remove baseline suppressions from 5.0

* Use newer NuGet.Protocol version

- v4.8.2 ➡️  v5.8.1

* Fix condition

* Back to 5.8.1

* Undo components changes

* Whoops

* Whoops

Co-authored-by: Doug Bunting <6431421+dougbu@users.noreply.github.com>

* Remove DNT from pre-reserved headers (dotnet#31493)

No modern browser uses it anymore

* Reuse HttpProtocol CTS (dotnet#31466)

* Change Router _emptyParametersDictionary to a regular Dictionary (dotnet#31460)

* Change Router _emptyParametersDictionary to a regular Dictionary

This allows for ReadOnlyDictionary to be trimmed in a default Blazor WASM app. Saving roughly 3 KB .br compressed.

Contributes to dotnet#30098

* Update src/Components/Components/src/Routing/Router.cs

Co-authored-by: James Newton-King <james@newtonking.com>

* Clean up some MVC code (dotnet#31511)

* Clean up some MVC code

* PR feedback

* Do not throwing on InputBase.Dispose() if not in EditContext. (dotnet#31510)

* Do not throwing on InputBase.Dispose() if not in EditContext.

Fixes dotnet#30990

* Cache filters between requests in the ordinary case (dotnet#31513)

In the normal case,
* only the DefaultFilterFactoryProvider is registered
* all filters registered by the framework are reusable

We could so something targeted and cache filter instances between requests.

* Update dependencies from https://github.com/dotnet/arcade build 20210403.1 (dotnet#31526)

[main] Update dependencies from dotnet/arcade

* Flaky tests (dotnet#31502)

* Revert "Update assembly check on EventHandlerTagHelperDescriptorProvider (dotnet#31458)" (dotnet#31530)

This reverts commit 7bc87ba.

* Ability to deactivate DataAnnotationsValidation dynamically. Fixes dotnet#31027 (dotnet#31413)

* Use UriHelper.BuildAbsolute for RedirectToHttpsRule (dotnet#28899)

* Use UriHelper.BuildAbsolute and UriHelper.BuildRelative for RedirectRule (dotnet#28903)

* Still send 100 Continue with null MinRequestBodyDataRate (dotnet#31543)

* Update Selenium/Playwright (dotnet#31497)

* Update Selenium/Playwright

* Update selenium-config.json

* Update Versions.props

* Added VSCode debugging (for MvcSandbox) & code analysis support  (dotnet#29486)

* Added VSCode debugging support for MvcSandbox

* Added ignored vscode folders

* 1. Convered some more projects.
2. Added env variable for TargetFramework and used it in launch.json file rather than
hardcoding TFW.

* Addressed PR feedback.
1. Removed extensions.json
2. Updated BuildFromSource.md for Vscode instructions.
3. Added launch settings for BasicTestApp.

* Addressed PR feedback!

* Implement new SmallCapacityDictionary for dictionaries with a small amount of values. (dotnet#31360)

* Fix duplicated event names in KestrelTrace logger. (dotnet#31523) (dotnet#31554)

* Update area-owners.md (dotnet#31552)

* Data Protection minor tidying (dotnet#31512)

* Remove unused code

Remove unused constant, method and variable.

* Remove array allocations

Use Array.Empty() instead of allocating an empty array.
Use a static array for activation type instead of creating a new one per invocation.

* Rename field

Address PR feedback.

* [SignalR TS] Improve connection error messages (dotnet#31402)

* [MVC] Fix MSB4186 error (dotnet#31066)

Fix MSB4186 error if a project references Microsoft.AspNetCore.Mvc.Testing that is not itself an ASP.NET project, such as a helper library in a test suite.

* Re-use cancellation tokens in the https middleware (dotnet#31528)

* Re-use cancellation tokens in the https middleware
- These tokens are usually short lived and exist for the purposes of cancelling the handshake.

* Fix IPNetwork.Contains behavior for prefixes which are not at start of subnet range (dotnet#31573)

* Update branding to 5.0.6 (dotnet#31563)

* Use skipEnabledCheck for LoggerMessage.Define (dotnet#31562)

* Use skipEnabledCheck in MVC

* Use skipEnabledCheck in Http/Routing DefaultLinkGenerator, DefaultLinkParser, and DfaMatcher

* Use skipEnabledCheck in SignalR

* Use skipEnabledCheck in Components

* Use skipEnabledCheck in Hosting

* Use skipEnabledCheck in Servers/HttpSys

* Use skipEnabledCheck in Servers/Kestrel

* Use skipEnabledCheck in Middleware

* Avoid some allocations by checked IsEnabled first in MVC

* Avoid some allocations by checked IsEnabled first in Servers/Kestrel

* Simplify usage of logging in transports

* Fix up typo in Blazor Server launchSettings.json (dotnet#31580)

* Rename 'Blazor component' to 'component' to be more generic (dotnet#31590)

Co-authored-by: Adrian Wright <adrian@compiledcoding.co.uk>

* Update branding to 3.1.15 (dotnet#31577)

* Update branding to 3.1.15

Update Ubuntu 16.04 to 18.04

* Remove obsolete groovy code

* [release/5.0] Update nuget versions (dotnet#31490)

* Update nuget/msbuild versions

* Update nuget

* Nuget only

* Fix baseline, update to 5.8.1

* Undo test change

* Update MetadataSerializerTest.cs

* Set cab name for TargetingPack.wixproj (dotnet#30975)

* Added IConnectionSocketFeature  (dotnet#31588)

- Removed the nullable from the Socket property as approved in API review
- Make the IConnectionSocketFeature an additional feature instead of one implemented on the TransportConnection.
- Added a test to verify it works

* Fix null ref in SyntaxTokenCache (dotnet#30978) (dotnet#30988)

Fixes dotnet#27154

* Still send 100 Continue with null MinRequestBodyDataRate (dotnet#31568)

* [SignalR TS] Fix permanent Disconnecting state (dotnet#30948) (dotnet#31253)

* Fix arguments order for call of HeartbeatSlow (dotnet#28698) (dotnet#31080)

Co-authored-by: Roman Marusyk <Marusyk@users.noreply.github.com>

* Quarantine one failing test (dotnet#31045) (dotnet#31296)

- dotnet#31044
- `RazorPagesTemplate_RazorRuntimeCompilation_BuildsAndPublishes()`

Co-authored-by: Doug Bunting <6431421+dougbu@users.noreply.github.com>

* Fix merge

* Fix merge

* Update HubConnection.Reconnect.test.ts

* Update default-build.yml

* Error boundaries (dotnet#30874)

* Remove unused ADAL dependency (dotnet#31484)

* Remove unused dependency

* Remove outdated AAD sample

* Custom event args: support receiving IJSObjectReference (dotnet#31591)

* Add failing E2E case

* Implement fix

* Add E2E test

* Update src/Components/test/testassets/BasicTestApp/EventCustomArgsComponent.razor

* Update suppressions

* [SignalR TS] Set keep alive timer in receive loop (dotnet#31300)

* Unskip some fixed E2E tests (dotnet#31614)

* Fix "no event handler" in simultaneous blur+removal case (dotnet#31612)

* [SPA] Introduces new approach for proxying the SPA templates (dotnet#31564)

* A new package Microsoft.AspNetCore.SpaProxy has been added that is
  used by the templates to launch their development proxy via npm/yarn.
* The SPA development proxy for each CLI now is the frontend for the
  application and proxies the requests to the backend which is the
  ASP.NET Core application.
* At publish time the application assets are copied to the wwwroot.
* SpaServices.Extensions has been removed from the templates since it is
  no longer needed. MapFallbackToFile("index.html") handles unknown
  requests and serves the SPA entry point.
* The templates have been updated to keep using HTTPS with the SPA proxy
  configured to use the ASP.NET Core HTTPS development certificate via a
  new aspnetcore-https.js file that ships within the template.
* The configuration for angular has been updated with a proxy.conf.js
  file to proxy requests to the backend.
* The entry point for the application in development is now
  https://localhost:5002 when using https and http://localhost:5002
  otherwise.

* Infer default sources for parameters of minimal actions (dotnet#31603)

This does a big chunk of dotnet#30248 while heavily refactoring the RequestDelegateFactory by splitting it out into a bunch of smaller methods.

For part 2 of dotnet#30248, a "scalar value type that lives in the System namespace", I went with the alternative of "Something convention-based like the presence of a bool TryParse(string, out T) method" instead. This conventions work for types in any namespace including user-defined types.

* Avoid closure caused by local function (dotnet#31641)

* Avoid closure caused by local function
- Made the local function static and passed state via parameters.

* Remove form support from minimal APIs (dotnet#31646)

* Remove form support from minimal APIs

* Add

* MapActionSample -> MinimalSample

* Remove MapActionSample.csproj from Mvc.slnf

* [Templates] Update the react template to use the CLI proxy (dotnet#31652)

Updates the react template to use the http-proxy-middleware for handling
the requests instead of the asp.net core proxy in the same way it's done
for the Angular template.

* [SignalR] Allocate HubCallerClients once per connection (dotnet#31661)

* [main] Update dependencies from dotnet/emsdk dotnet/efcore dotnet/runtime (dotnet#31576)

[main] Update dependencies from dotnet/emsdk dotnet/efcore dotnet/runtime


 - Add `RemoveDevicePlatformSupport` To `Microsoft.AspNetCore.Authentication.Negotiate.csproj`

Co-authored-by: dotnet-maestro[bot] <42748379+dotnet-maestro[bot]@users.noreply.github.com>
Co-authored-by: Andre Milbradt <andremi@microsoft.com>
Co-authored-by: Andre Milbradt <onegoodsausage@users.noreply.github.com>
Co-authored-by: Pranav K <prkrishn@hotmail.com>
Co-authored-by: Hao Kung <HaoK@users.noreply.github.com>
Co-authored-by: David Fowler <davidfowl@gmail.com>
Co-authored-by: Safia Abdalla <safia@microsoft.com>
Co-authored-by: Kristian Hellang <kristian@hellang.com>
Co-authored-by: msftbot[bot] <48340428+msftbot[bot]@users.noreply.github.com>
Co-authored-by: James Newton-King <james@newtonking.com>
Co-authored-by: Chris Ross <Tratcher@Outlook.com>
Co-authored-by: Steve Sanderson <SteveSandersonMS@users.noreply.github.com>
Co-authored-by: Kevin Pilch <kevinpi@microsoft.com>
Co-authored-by: Javier Calvarro Nelson <jacalvar@microsoft.com>
Co-authored-by: Doug Bunting <6431421+dougbu@users.noreply.github.com>
Co-authored-by: N. Taylor Mullen <nimullen@microsoft.com>
Co-authored-by: Eilon Lipton <Eilon@users.noreply.github.com>
Co-authored-by: Brennan <brecon@microsoft.com>
Co-authored-by: Shreyas Jejurkar <shreyasjejurkar123@live.com>
Co-authored-by: Justin Kotalik <jukotali@microsoft.com>
Co-authored-by: Gabriel Lucaci <gabriel.lucaci.dev@gmail.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Tratcher <Tratcher@users.noreply.github.com>
Co-authored-by: John Luo <johluo@microsoft.com>
Co-authored-by: Martin Costello <martin@martincostello.com>
Co-authored-by: William Godbe <wigodbe@microsoft.com>
Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
Co-authored-by: Allison Chou <allichou@microsoft.com>
Co-authored-by: Anthony J <reapsprgm@gmail.com>
Co-authored-by: Jonathan Berube <jdberube@gmail.com>
Co-authored-by: dotnet <dotnet@users.noreply.github.com>
Co-authored-by: Günther Foidl <gue@korporal.at>
Co-authored-by: Stephen Toub <stoub@microsoft.com>
Co-authored-by: Ben Adams <thundercat@illyriad.co.uk>
Co-authored-by: Andrzej <andrzej.pindor@gmail.com>
Co-authored-by: Stephen Halter <halter73@gmail.com>
Co-authored-by: Kevin Jones <vcsjones@github.com>
Co-authored-by: Marek Linka <mareklinka@users.noreply.github.com>
Co-authored-by: Kevin Miller <scoundrel@gmail.com>
Co-authored-by: Michael Simons <msimons@microsoft.com>
Co-authored-by: Youssef Victor <youssefvictor00@gmail.com>
Co-authored-by: Eric Erhardt <eric.erhardt@microsoft.com>
Co-authored-by: fvoronin <fvoronin@gmail.com>
Co-authored-by: Paulo Morgado <470455+paulomorgado@users.noreply.github.com>
Co-authored-by: Tanay Parikh <TanayParikh@users.noreply.github.com>
Co-authored-by: Adrian Wright <47532258+adrianwright109@users.noreply.github.com>
Co-authored-by: Adrian Wright <adrian@compiledcoding.co.uk>
Co-authored-by: Sébastien Ros <sebastienros@gmail.com>
Co-authored-by: Roman Marusyk <Marusyk@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-mvc Includes: MVC, Actions and Controllers, Localization, CORS, most templates
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants