Commit Graph

20074 Commits

Author SHA1 Message Date
David Fowler 02bf53de96
Small clean up and allocation removals (#21918)
- Remove IAsyncResult implementation
- Make AsyncAcceptContext derive from TaskCompletionSource
2020-05-19 08:18:54 -07:00
Dawid Szmidka 6c7a8bb397
Allow custom handling of authorization failures (with sample app) (#21117) 2020-05-19 00:56:21 -07:00
John Luo 263c376a80
Merge pull request #21968 from dotnet/johluo/noship-analyzers
Do not ship analyzer packages
2020-05-18 18:50:35 -07:00
Kahbazi eff4e4bf52
Add AllowAnonymous extension method on IEndpointConventionBuilder (#21909) 2020-05-18 16:42:13 -07:00
John Luo 5ea27bd82c Do not ship analyzer packages 2020-05-18 16:15:55 -07:00
Javier Calvarro Nelson a9449cd20c
[Templates] Update SPA dependencies to keep npm audit happy (#21330)
* Update react dependencies

* Update angular dependencies

* Update react-redux dependencies
2020-05-18 14:59:29 -07:00
Brennan 66ddf3523a Fix cleaning send queue on restart (#18511) 2020-05-18 14:58:38 -07:00
Chris Ross f712fd7c38
Quarantine flaky tests (#21957)
* Quarantine HttpsNoClientCert_NoClientCert

* Quarantine StopPropagation
2020-05-18 21:19:58 +00:00
Pranav K 9949ab46c3
Fixup JS (#21922)
* Fixup JS

* Avoid monkey patching
2020-05-18 13:21:31 -07:00
Justin Kotalik 41eb22a0ac
Unquarantine tests (#21895)
* Unquarantine tests

* Update ShutdownTests.cs

* Update ShutdownTests.cs

* Update HubConnectionHandlerTests.cs

* Update src/SignalR/server/SignalR/test/HubConnectionHandlerTests.cs

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

* Update HubConnectionTests.cs

Co-authored-by: Sébastien Ros <sebastienros@gmail.com>
Co-authored-by: Brennan <brecon@microsoft.com>
2020-05-18 19:04:48 +00:00
Kahbazi 5cfebf260f
Use ReferenceEquals in HttpMethodMatcherPolicy (#21277) 2020-05-17 16:28:36 +00:00
Pranav K 8efeefb3d1
Merge branch 'blazor-wasm' into prkrishn/merge-blazor-wasm 2020-05-16 21:10:28 -07:00
John Luo c565c2a4f1 Merge branch 'master' of ..\AspNetCore-Tooling\ into johluo/tooling-soncolidation-source-2 2020-05-16 17:50:17 -07:00
Phillip Carter 71171a2d51 Undo weird formatting 2020-05-16 11:50:28 -07:00
Phillip Carter c147d57398 Update F# web templates to be more idiomatic 2020-05-16 11:18:44 -07:00
Ninds f908247222
Allow use of a default MemoryPoolFeature on ConnectionContext (#18579) 2020-05-15 14:42:52 -07:00
Doug Bunting 0f80048f18 Port `-nobl` and `net5.0` changes from 'master'
* Update dependencies from https://github.com/dotnet/arcade build 20200511.9
  - Microsoft.DotNet.Arcade.Sdk: 5.0.0-beta.20228.4 => 5.0.0-beta.20261.9
  - Microsoft.DotNet.GenAPI: 5.0.0-beta.20228.4 => 5.0.0-beta.20261.9
  - Microsoft.DotNet.Helix.Sdk: 5.0.0-beta.20228.4 => 5.0.0-beta.20261.9

* Pre-emptively take -nobl change

* Disable binlogs in CI

* Fix build.sh to know about -nobl

* Align build.ps1|sh with latest Arcade parameters
  - do not enable binary logs by default in CI builds
  - leave `-binaryLog` and `-excludeCIBinaryLog` handling to eng/common/tools.ps1|sh
    - was unnecessary since `-bl /bl:{some name}` worked fine, ignoring OOMs

nit: document `-excludeCIBinarylog` a bit more

* Do not pass unknown options into CodeCheck.ps1

* Pass `-ci -nobl` into remaining CI build jobs

* Switch default TFM to `net5.0`

* Update missing project templates tfms

* Add more `-ci -nobl`
  - needed because _all_ builds in the pipeline are implicitly CI builds
    - default-build.yml adds `-ci` when script wasn't explicit

* Default templates to net5.0

* PR feedback

* Update TFMs in explicit .nuspec files

* Update TFMs in test projects

* Update TFMs in test C# code

* Update TFMs in infrastructure files

* Future-proof a check for `net5.0` or later
  - avoid comparisons involving `$(TargetFramework)` in .targets files
    - fine to compare it with `''` or `$(DefaultNetCoreTargetFramework)`

* !fixup! Undo a couple of earlier fixes
  - remove a duplicate `$()` setting
  - correct the one remaining versioned `#if` define
    - did not make it `#if NETCOREAPP` because benchmarks test numerous .NET Core TFMs

* Disable binary logs in CodeCheck.ps1

* Specify `-ci -nobl` just once when using `parameters.buildArgs`

* Restore `$binaryLog` default logic

This cherry-picks most of d5849f3534 into this branch
- [master] Update dependencies from dotnet/arcade dotnet/aspnetcore-tooling (#21630)
- does not include dotnet/aspnetcore-tooling updates

Co-authored-by: dotnet-maestro[bot] <42748379+dotnet-maestro[bot]@users.noreply.github.com>
Co-authored-by: Will Godbe <wigodbe@microsoft.com>
Co-authored-by: Viktor Hofer <viktor.hofer@microsoft.com>
2020-05-15 14:31:34 -07:00
Hao Kung 5508e7661c
Use bogus phone tokens for failure message check to avoid collisions (#21853) 2020-05-15 14:22:38 -07:00
Justin Kotalik ec0dbd0387
Revert change specific for only 5.0-preview5 (#21880) 2020-05-15 11:25:33 -07:00
Pranav K 8966415b6b
Merge commit 'bbafecc0535e1de3264845e51ea8b3d18eb3ca61' into prkrishn/merge-blazor-wasm 2020-05-15 10:12:32 -07:00
Justin Kotalik 54b10629bd
Merge pull request #21791 from dotnet-maestro-bot/merge/release/3.1-to-master 2020-05-15 08:35:28 -07:00
github-actions[bot] 9bc1255a42
Sync shared code from runtime (#21866)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2020-05-15 12:19:17 +00:00
dotnet-maestro[bot] d5849f3534
[master] Update dependencies from dotnet/arcade dotnet/aspnetcore-tooling (#21630)
* Update dependencies from https://github.com/dotnet/arcade build 20200511.9
- Microsoft.DotNet.Arcade.Sdk: 5.0.0-beta.20228.4 => 5.0.0-beta.20261.9
- Microsoft.DotNet.GenAPI: 5.0.0-beta.20228.4 => 5.0.0-beta.20261.9
- Microsoft.DotNet.Helix.Sdk: 5.0.0-beta.20228.4 => 5.0.0-beta.20261.9

* Update dependencies from https://github.com/dotnet/aspnetcore-tooling build 20200514.6

Microsoft.AspNetCore.Mvc.Razor.Extensions , Microsoft.AspNetCore.Razor.Language , Microsoft.CodeAnalysis.Razor , Microsoft.NET.Sdk.Razor
 From Version 5.0.0-preview.5.20261.4 -> To Version 5.0.0-preview.6.20264.6

* Pre-emptively take -nobl change

* Disable binlogs in CI

* Fix build.sh to know about -nobl

* Align build.ps1|sh with latest Arcade parameters
- do not enable binary logs by default in CI builds
- leave `-binaryLog` and `-excludeCIBinaryLog` handling to eng/common/tools.ps1|sh
  - was unnecessary since `-bl /bl:{some name}` worked fine, ignoring OOMs

nit: document `-excludeCIBinarylog` a bit more

* Do not pass unknown options into CodeCheck.ps1

* Pass `-ci -nobl` into remaining CI build jobs

* Switch default TFM to `net5.0`

* Update missing project templates tfms

* Add more `-ci -nobl`
- needed because _all_ builds in the pipeline are implicitly CI builds
  - default-build.yml adds `-ci` when script wasn't explicit

* Default templates to net5.0

* PR feedback

* Update TFMs in explicit .nuspec files

* Update TFMs in test projects

* Update TFMs in test C# code

* Update TFMs in infrastructure files

* Future-proof a check for `net5.0` or later
- avoid comparisons involving `$(TargetFramework)` in .targets files
  - fine to compare it with `''` or `$(DefaultNetCoreTargetFramework)`

* !fixup! Undo a couple of earlier fixes
- remove a duplicate `$()` setting
- correct the one remaining versioned `#if` define
  - did not make it `#if NETCOREAPP` because benchmarks test numerous .NET Core TFMs

* Disable binary logs in CodeCheck.ps1

* Specify `-ci -nobl` just once when using `parameters.buildArgs`

* Restore `$binaryLog` default logic

Co-authored-by: Doug Bunting <6431421+dougbu@users.noreply.github.com>
Co-authored-by: Will Godbe <wigodbe@microsoft.com>
Co-authored-by: Viktor Hofer <viktor.hofer@microsoft.com>
2020-05-15 00:17:02 +00:00
William Godbe 817127dfd0
[release/3.1] Give .msi's non-stable branding (#21801)
* Give .msi's non-stable branding

* Add BuildNumber to version

* Make GUIDInputs unique per-build
2020-05-14 16:34:09 -07:00
Justin Kotalik d8ba089c3c
Revert "Quarantine all ProjectTemplate tests until dotnet new lock issue is resolved." (#21831)
This reverts commit 9a5d3c7640.
2020-05-14 14:24:20 -07:00
Pranav K 48261fdada
Undo use of pipewriter in FileBufferingWriteStream (#21833) 2020-05-14 12:38:49 -07:00
Pranav K 0e652d1aba
Ensure dotnet run uses build output, not publish (#21720)
Fixes https://github.com/dotnet/aspnetcore/issues/17710
2020-05-14 12:38:04 -07:00
Justin Kotalik d99e7fecb0
Merge pull request #21806 from dotnet-maestro-bot/merge/release/5.0-preview5-to-master 2020-05-14 12:14:47 -07:00
Justin Kotalik b3c78ff291 Merge branch 'merge/release/3.1-to-master' of https://github.com/dotnet-maestro-bot/AspNetCore into merge/release/3.1-to-master 2020-05-14 11:09:08 -07:00
Artyom Tarasov 17c90a7e17
Fix for https://github.com/dotnet/aspnetcore/issues/17277 (#21819)
Fixed adding a string with a large number of trailing zeros to StringBuilder, which sometimes caused the thread to hang
2020-05-14 10:47:26 -07:00
Justin Kotalik 6725c718db
Update Microsoft.AspNetCore.Http.Abstractions.csproj 2020-05-14 10:13:45 -07:00
Justin Kotalik a5136c1cc1 Merge branch 'merge/release/3.1-to-master' of https://github.com/dotnet-maestro-bot/AspNetCore into merge/release/3.1-to-master 2020-05-14 09:48:49 -07:00
Justin Kotalik e7f3941b1b Revert "Quarantine all ProjectTemplate tests until dotnet new lock issue is resolved."
This reverts commit 9a5d3c7640.
2020-05-14 09:41:40 -07:00
John Luo 8fba9b0c90 Use ActivatorUtilities shared source 2020-05-13 22:23:30 -07:00
dotnet-maestro[bot] b67d161e03
[release/5.0-preview5] Update dependencies from dotnet/aspnetcore-tooling (#21710)
* Update dependencies from https://github.com/dotnet/aspnetcore-tooling build 20200511.4

- Microsoft.AspNetCore.Mvc.Razor.Extensions: 5.0.0-preview.5.20258.1 -> 5.0.0-preview.5.20261.4
- Microsoft.AspNetCore.Razor.Language: 5.0.0-preview.5.20258.1 -> 5.0.0-preview.5.20261.4
- Microsoft.CodeAnalysis.Razor: 5.0.0-preview.5.20258.1 -> 5.0.0-preview.5.20261.4
- Microsoft.NET.Sdk.Razor: 5.0.0-preview.5.20258.1 -> 5.0.0-preview.5.20261.4

Dependency coherency updates

- Microsoft.Extensions.Caching.Abstractions: 5.0.0-preview.5.20253.7 -> 5.0.0-preview.5.20260.5 (parent: Microsoft.AspNetCore.Razor.Language)
- Microsoft.Extensions.Caching.Memory: 5.0.0-preview.5.20253.7 -> 5.0.0-preview.5.20260.5 (parent: Microsoft.AspNetCore.Razor.Language)
- Microsoft.Extensions.Configuration.Abstractions: 5.0.0-preview.5.20253.7 -> 5.0.0-preview.5.20260.5 (parent: Microsoft.AspNetCore.Razor.Language)
- Microsoft.Extensions.Configuration.Binder: 5.0.0-preview.5.20253.7 -> 5.0.0-preview.5.20260.5 (parent: Microsoft.AspNetCore.Razor.Language)
- Microsoft.Extensions.Configuration.CommandLine: 5.0.0-preview.5.20253.7 -> 5.0.0-preview.5.20260.5 (parent: Microsoft.AspNetCore.Razor.Language)
- Microsoft.Extensions.Configuration.EnvironmentVariables: 5.0.0-preview.5.20253.7 -> 5.0.0-preview.5.20260.5 (parent: Microsoft.AspNetCore.Razor.Language)
- Microsoft.Extensions.Configuration.FileExtensions: 5.0.0-preview.5.20253.7 -> 5.0.0-preview.5.20260.5 (parent: Microsoft.AspNetCore.Razor.Language)
- Microsoft.Extensions.Configuration.Ini: 5.0.0-preview.5.20253.7 -> 5.0.0-preview.5.20260.5 (parent: Microsoft.AspNetCore.Razor.Language)
- Microsoft.Extensions.Configuration.Json: 5.0.0-preview.5.20253.7 -> 5.0.0-preview.5.20260.5 (parent: Microsoft.AspNetCore.Razor.Language)
- Microsoft.Extensions.Configuration.UserSecrets: 5.0.0-preview.5.20253.7 -> 5.0.0-preview.5.20260.5 (parent: Microsoft.AspNetCore.Razor.Language)
- Microsoft.Extensions.Configuration.Xml: 5.0.0-preview.5.20253.7 -> 5.0.0-preview.5.20260.5 (parent: Microsoft.AspNetCore.Razor.Language)
- Microsoft.Extensions.Configuration: 5.0.0-preview.5.20253.7 -> 5.0.0-preview.5.20260.5 (parent: Microsoft.AspNetCore.Razor.Language)
- Microsoft.Extensions.DependencyInjection.Abstractions: 5.0.0-preview.5.20253.7 -> 5.0.0-preview.5.20260.5 (parent: Microsoft.AspNetCore.Razor.Language)
- Microsoft.Extensions.DependencyInjection: 5.0.0-preview.5.20253.7 -> 5.0.0-preview.5.20260.5 (parent: Microsoft.AspNetCore.Razor.Language)
- Microsoft.Extensions.FileProviders.Abstractions: 5.0.0-preview.5.20253.7 -> 5.0.0-preview.5.20260.5 (parent: Microsoft.AspNetCore.Razor.Language)
- Microsoft.Extensions.FileProviders.Composite: 5.0.0-preview.5.20253.7 -> 5.0.0-preview.5.20260.5 (parent: Microsoft.AspNetCore.Razor.Language)
- Microsoft.Extensions.FileProviders.Physical: 5.0.0-preview.5.20253.7 -> 5.0.0-preview.5.20260.5 (parent: Microsoft.AspNetCore.Razor.Language)
- Microsoft.Extensions.FileSystemGlobbing: 5.0.0-preview.5.20253.7 -> 5.0.0-preview.5.20260.5 (parent: Microsoft.AspNetCore.Razor.Language)
- Microsoft.Extensions.Hosting.Abstractions: 5.0.0-preview.5.20253.7 -> 5.0.0-preview.5.20260.5 (parent: Microsoft.AspNetCore.Razor.Language)
- Microsoft.Extensions.Hosting: 5.0.0-preview.5.20253.7 -> 5.0.0-preview.5.20260.5 (parent: Microsoft.AspNetCore.Razor.Language)
- Microsoft.Extensions.Http: 5.0.0-preview.5.20253.7 -> 5.0.0-preview.5.20260.5 (parent: Microsoft.AspNetCore.Razor.Language)
- Microsoft.Extensions.Logging.Abstractions: 5.0.0-preview.5.20253.7 -> 5.0.0-preview.5.20260.5 (parent: Microsoft.AspNetCore.Razor.Language)
- Microsoft.Extensions.Logging.Configuration: 5.0.0-preview.5.20253.7 -> 5.0.0-preview.5.20260.5 (parent: Microsoft.AspNetCore.Razor.Language)
- Microsoft.Extensions.Logging.Console: 5.0.0-preview.5.20253.7 -> 5.0.0-preview.5.20260.5 (parent: Microsoft.AspNetCore.Razor.Language)
- Microsoft.Extensions.Logging.Debug: 5.0.0-preview.5.20253.7 -> 5.0.0-preview.5.20260.5 (parent: Microsoft.AspNetCore.Razor.Language)
- Microsoft.Extensions.Logging.EventSource: 5.0.0-preview.5.20253.7 -> 5.0.0-preview.5.20260.5 (parent: Microsoft.AspNetCore.Razor.Language)
- Microsoft.Extensions.Logging.EventLog: 5.0.0-preview.5.20253.7 -> 5.0.0-preview.5.20260.5 (parent: Microsoft.AspNetCore.Razor.Language)
- Microsoft.Extensions.Logging.TraceSource: 5.0.0-preview.5.20253.7 -> 5.0.0-preview.5.20260.5 (parent: Microsoft.AspNetCore.Razor.Language)
- Microsoft.Extensions.Logging: 5.0.0-preview.5.20253.7 -> 5.0.0-preview.5.20260.5 (parent: Microsoft.AspNetCore.Razor.Language)
- Microsoft.Extensions.Options.ConfigurationExtensions: 5.0.0-preview.5.20253.7 -> 5.0.0-preview.5.20260.5 (parent: Microsoft.AspNetCore.Razor.Language)
- Microsoft.Extensions.Options.DataAnnotations: 5.0.0-preview.5.20253.7 -> 5.0.0-preview.5.20260.5 (parent: Microsoft.AspNetCore.Razor.Language)
- Microsoft.Extensions.Options: 5.0.0-preview.5.20253.7 -> 5.0.0-preview.5.20260.5 (parent: Microsoft.AspNetCore.Razor.Language)
- Microsoft.Extensions.Primitives: 5.0.0-preview.5.20253.7 -> 5.0.0-preview.5.20260.5 (parent: Microsoft.AspNetCore.Razor.Language)
- Microsoft.Extensions.Internal.Transport: 5.0.0-preview.5.20253.7 -> 5.0.0-preview.5.20260.5 (parent: Microsoft.AspNetCore.Razor.Language)
- Microsoft.Win32.Registry: 5.0.0-preview.5.20253.7 -> 5.0.0-preview.5.20260.5 (parent: Microsoft.AspNetCore.Razor.Language)
- Microsoft.Win32.SystemEvents: 5.0.0-preview.5.20253.7 -> 5.0.0-preview.5.20260.5 (parent: Microsoft.AspNetCore.Razor.Language)
- System.ComponentModel.Annotations: 5.0.0-preview.5.20253.7 -> 5.0.0-preview.5.20260.5 (parent: Microsoft.AspNetCore.Razor.Language)
- System.Diagnostics.EventLog: 5.0.0-preview.5.20253.7 -> 5.0.0-preview.5.20260.5 (parent: Microsoft.AspNetCore.Razor.Language)
- System.Drawing.Common: 5.0.0-preview.5.20253.7 -> 5.0.0-preview.5.20260.5 (parent: Microsoft.AspNetCore.Razor.Language)
- System.IO.Pipelines: 5.0.0-preview.5.20253.7 -> 5.0.0-preview.5.20260.5 (parent: Microsoft.AspNetCore.Razor.Language)
- System.Net.Http.WinHttpHandler: 5.0.0-preview.5.20253.7 -> 5.0.0-preview.5.20260.5 (parent: Microsoft.AspNetCore.Razor.Language)
- System.Net.WebSockets.WebSocketProtocol: 5.0.0-preview.5.20253.7 -> 5.0.0-preview.5.20260.5 (parent: Microsoft.AspNetCore.Razor.Language)
- System.Reflection.Metadata: 5.0.0-preview.5.20253.7 -> 5.0.0-preview.5.20260.5 (parent: Microsoft.AspNetCore.Razor.Language)
- System.Runtime.CompilerServices.Unsafe: 5.0.0-preview.5.20253.7 -> 5.0.0-preview.5.20260.5 (parent: Microsoft.AspNetCore.Razor.Language)
- System.Security.Cryptography.Cng: 5.0.0-preview.5.20253.7 -> 5.0.0-preview.5.20260.5 (parent: Microsoft.AspNetCore.Razor.Language)
- System.Security.Cryptography.Pkcs: 5.0.0-preview.5.20253.7 -> 5.0.0-preview.5.20260.5 (parent: Microsoft.AspNetCore.Razor.Language)
- System.Security.Cryptography.Xml: 5.0.0-preview.5.20253.7 -> 5.0.0-preview.5.20260.5 (parent: Microsoft.AspNetCore.Razor.Language)
- System.Security.Permissions: 5.0.0-preview.5.20253.7 -> 5.0.0-preview.5.20260.5 (parent: Microsoft.AspNetCore.Razor.Language)
- System.Security.Principal.Windows: 5.0.0-preview.5.20253.7 -> 5.0.0-preview.5.20260.5 (parent: Microsoft.AspNetCore.Razor.Language)
- System.ServiceProcess.ServiceController: 5.0.0-preview.5.20253.7 -> 5.0.0-preview.5.20260.5 (parent: Microsoft.AspNetCore.Razor.Language)
- System.Text.Encodings.Web: 5.0.0-preview.5.20253.7 -> 5.0.0-preview.5.20260.5 (parent: Microsoft.AspNetCore.Razor.Language)
- System.Text.Json: 5.0.0-preview.5.20253.7 -> 5.0.0-preview.5.20260.5 (parent: Microsoft.AspNetCore.Razor.Language)
- System.Threading.Channels: 5.0.0-preview.5.20253.7 -> 5.0.0-preview.5.20260.5 (parent: Microsoft.AspNetCore.Razor.Language)
- System.Windows.Extensions: 5.0.0-preview.5.20253.7 -> 5.0.0-preview.5.20260.5 (parent: Microsoft.AspNetCore.Razor.Language)
- Microsoft.Extensions.DependencyModel: 5.0.0-preview.5.20253.7 -> 5.0.0-preview.5.20260.5 (parent: Microsoft.AspNetCore.Razor.Language)
- Microsoft.NETCore.App.Ref: 5.0.0-preview.5.20253.7 -> 5.0.0-preview.5.20260.5 (parent: Microsoft.AspNetCore.Razor.Language)
- Microsoft.NETCore.App.Runtime.win-x64: 5.0.0-preview.5.20253.7 -> 5.0.0-preview.5.20260.5 (parent: Microsoft.AspNetCore.Razor.Language)
- Microsoft.NETCore.App.Internal: 5.0.0-preview.5.20253.7 -> 5.0.0-preview.5.20260.5 (parent: Microsoft.AspNetCore.Razor.Language)
- Microsoft.NETCore.Platforms: 5.0.0-preview.5.20253.7 -> 5.0.0-preview.5.20260.5 (parent: Microsoft.AspNetCore.Razor.Language)
- Microsoft.Net.Compilers.Toolset: 3.7.0-1.20254.1 -> 3.7.0-2.20259.1 (parent: Microsoft.AspNetCore.Razor.Language)

* Try BuildPool.Windows.10.Amd64.VS2019.Pre queues

- do not merge into 'master' branch

* Update RuntimeExtensionsReferenceDirectory with new tfm

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
Co-authored-by: Doug Bunting <6431421+dougbu@users.noreply.github.com>
Co-authored-by: John Luo <johluo@microsoft.com>
2020-05-14 01:49:47 +00:00
Brennan db864981d5
Do not ship SiteExtension in previews (#21786)
* Do not ship SiteExtension in previews
  - We've generally avoided shipping the SiteExtension in preview releases.
* fb
2020-05-13 17:51:42 -07:00
N. Taylor Mullen f9b4101852 Merge remote-tracking branch 'origin/release/3.1' 2020-05-13 17:27:44 -07:00
Todd Grunke d782a06462 Decrease allocations from using method groups (dotnet/aspnetcore-tooling#1896)
* Previous optimization didn't help as much as intended.

By specifying a method group as the arguments to method like ReadWhile, an allocation was still occurring. Instead, cache the Func as a member in the class and use it instead of the method group.\n\nCommit migrated from 2e6aa150bc
2020-05-13 16:00:34 -07:00
Pranav K b3c6c43789
Remove the need for a global lock when building or publishing a project (#21753)
* Change template test build and publish to not perform dotnet restore
* Remove locking requirements for build and publish
* Increase timeout for dotnet new operations since it's network bound
2020-05-13 11:40:42 -07:00
Doug Bunting de38479e5f
Improve build reliability (#20760)
* Improve build reliability
  - ensure `ResolveCustomReferences` target executes before packages are used
  - `ResolveAssemblyReferences` and `ResolveAssemblyReferencesDesignTime` targets run too late
    - e.g. failed builds of Microsoft.AspNetCore.WebUtilities or Microsoft.AspNetCore.Hosting when building from root
  - add `GetReferenceProjectTargetPathMetadata` for ease of use as well as reliability
    - avoids extra work to get existing metadata (ref/ projects execute no tasks in this target)

  nit: rename `@(ReferenceProjectMetadata)` -> `@(ReferenceProjectTargetPathMetadata)`

* Ensure `GetTargetPathMetadata` target runs with `$(TargetFramework)` set
  - ref/ projects all multi-target and otherwise no-op this target

* Revert "Fix various "Type or namespace not found" errors (#20736)"
  - change is no longer needed with other fixes in this PR

  This reverts commit 8218d6e0e7.
2020-05-13 11:31:09 -07:00
Ryan Nowak b194b6c90a
Fix use of precedence in endpoint routing DFA (#20801) (#21200)
* Fix use of precedence in endpoint routing DFA

Fixes: #18677
Fixes: #16579

This is a change to how sorting is use when building endpoint routing's graph of
nodes that is eventually transformed into the route table. There were
bugs in how this was done that made it incompatible in some niche
scenarios both with previous implementations and how we describe the
features in the abstract.

There are a wide array of cases that might have been impacted by this
bug because routing is a pattern language. Generally the bugs will involve a
catch-all, and some something that changes ordering of templates.

Issue #18677 has the simplest repro for this, the following templates
would not behave as expected:

```
a/{*b}
{a}/{b}
```

One would expect any URL Path starting with `/a` to match the first
route, but that's not what happens.

---

The change supports an opt-in via the following AppContext switch:

```
Microsoft.AspNetCore.Routing.UseCorrectCatchAllBehavior
```

Set to true to enable the correct behavior.

---

The root cause of this bug was an issue in how the algorithm used to be
build the DFA was designed. Specifically that it uses a BFS to build the
graph, and it uses an up-front one-time sort of endpoints in order to
drive that BFS.

The building of the graph has the expectation that at each level, we
will process **all** literal segments (`/a`) and then **all** parameter
segments (`/{a}`) and then **all** catch-all segments (`/{*a}`). Routing
defines a concept called *precedence* that defines the *conceptual*
order in while segments types are ordered.

So there are two problems:

- We sort based on criteria other than precedence (#16579)
- We can't rely on a one-time sort, it needs to be done at each level
(#18677)

---

The fix is to repeat the sort operation at each level and use precedence
as the only key for sorting (as dictated by the graph building algo).

We do a sort of the matches of each node *after* building the
precedence-based part of the DFA, based on the full sorting criteria, to
maintain compatibility.

* Add test
2020-05-13 11:12:14 -07:00
Brennan 8ff1cb906d
Set certificate in some Kestrel tests to avoid global machine state (#21516) (#21542) 2020-05-13 11:11:02 -07:00
William Godbe 9e2a480925
[release/3.1] Add .version file to shared framework zip (#21548)
* Add .version file to shared framework zip

* Fix test
2020-05-13 10:59:55 -07:00
Pranav K 572c6fa4ce
Add retries when initial connection fails (#21711)
* Add retries when initial connection fails
2020-05-13 07:59:34 -07:00
William Godbe 7c58b8b767
Add .version file to shared framework zip (#21587)
* Add .version file to shared framework zip

* Fix test

* Test for proper version file depending on env
2020-05-12 17:10:02 -07:00
Will Godbe a14119a308 Merge remote-tracking branch 'internal/internal/release/3.1' into wtgodbe/315 2020-05-12 16:02:32 -07:00
N. Taylor Mullen 9a5d3c7640 Quarantine all ProjectTemplate tests until dotnet new lock issue is resolved.
- Investigation pending in https://github.com/dotnet/aspnetcore/issues/21748
2020-05-12 15:31:11 -07:00
N. Taylor Mullen b419ec07d6 Quarantine Microsoft.Extensions.SecretManager.Tools.Tests.SecretManagerTests.Clear_Secrets
- https://dev.azure.com/dnceng/public/_build/results?buildId=640828&view=ms.vss-test-web.build-test-results-tab&runId=19910360&resultId=108857&paneView=debug
2020-05-12 15:29:41 -07:00
David Fowler 5a0c097ad4
Added some kestrel event counters (#21649)
* Added some kestrel event counters
- Connection queue length - This is the amount of connections accepted and queued in the thread pool.
- Connection count - The number of connections
- Total connections - The total number of connections ever connected.
- Connection Rate - Connections per second

* Added TLS counters
- Current TLS handshakes
- Total TLS handshakes
- Failed TLS handshakes
- TLS handshake per second

* Added HTTP/2 queue length counter

* Improve the event information
- Add TLS version to handshake events
- Add HTTP version to request queue events
- Renamed HTTP/2 request queue length to http request queue


Contributes to #4769
2020-05-12 11:04:37 -07:00
John Luo dfb126da17
Quarantine flagged tests (#21723) 2020-05-12 09:00:20 -07:00
Pranav K 4b88074e30
Add a simplified version of ServerComponentRenderingTest.CanDispatchAsyncWorkToSyncContext (#21633)
ServerComponentRenderingTest.CanDispatchAsyncWorkToSyncContext is quarantined but since it's not running on Helix there isn't any history available for it. With all the moving
parts in the server test, it's unclear if it's a product vs test setup issue.

Authoring a more simplified test so we can track test history. Note that it's starting off as quarantined because there's no evidence that the product code isn't broken

Fixes https://github.com/dotnet/aspnetcore/issues/19413
2020-05-11 12:54:01 -07:00
Todd Grunke 016fd1ee9e Improve CSharpLanguageCharacteristics.MapKeyword performance (dotnet/aspnetcore-tooling#1879)
* Improve CSharpLanguageCharacteristics.MapKeyword performance

The razor typing perf test profile I'm looking at has 156 ms of CPU cycles spent in this method, mostly in Enum.ToString()
\n\nCommit migrated from e821a4642e
2020-05-11 12:42:39 -07:00
Pranav K 158126c27a
Add a scenario with timers (#19626)
* Add a scenario for measuring navigating between components

* Apply suggestions from code review

Co-authored-by: Steve Sanderson <SteveSandersonMS@users.noreply.github.com>

Co-authored-by: Steve Sanderson <SteveSandersonMS@users.noreply.github.com>
2020-05-11 10:46:26 -07:00
Pranav K 22522a0d78
Update to mono sources http://github.com/mono/mono/commit/57dcba253 (#21700) 2020-05-11 10:40:12 -07:00
Todd Grunke a70de6b67b Small perf improvement in TokenizerBackedParser.Accept and ReadWhile. (dotnet/aspnetcore-tooling#1882)
In the razor perf typing test, Accept was showing 27 ms allocating enumerators. Additionally, modified ReadWhile to only allocate if it would return a non-empty collection (and to not use the complexity introduced by using yield enumerators)\n\nCommit migrated from 27a14af36a
2020-05-11 10:28:31 -07:00
Todd Grunke 485924edd2 Improve Annotation and SpanContext performance. (dotnet/aspnetcore-tooling#1881)
The razor perf test shows about 70 ms CPU of WithSpanContext is in allocation. GetAnnotation similarly is showing about 60 ms in allocation (of which this only partly improves)\n\nCommit migrated from a060f129ff
2020-05-11 10:27:40 -07:00
Todd Grunke d1e7d8e466 Improve HtmlTokenizer.AtToken performance. (dotnet/aspnetcore-tooling#1880)
Our razor typing test measured 153 CPU ms in this method. Optimized by fewer calls to CurrentCharacter, not checking '<' twice, and uswing a switch stmt.\n\nCommit migrated from c601c2f11e
2020-05-11 10:26:56 -07:00
dotnet-maestro[bot] f701a188c2 [master] Update dependencies from dotnet/arcade dotnet/runtime (dotnet/aspnetcore-tooling#1873)
* Update dependencies from https://github.com/dotnet/runtime build 20200507.11

- Microsoft.Extensions.Logging: 5.0.0-preview.5.20253.7 -> 5.0.0-preview.5.20257.11
- Microsoft.Extensions.Configuration.Json: 5.0.0-preview.5.20253.7 -> 5.0.0-preview.5.20257.11
- Microsoft.Extensions.DependencyModel: 5.0.0-preview.5.20253.7 -> 5.0.0-preview.5.20257.11
- Microsoft.NETCore.App.Runtime.win-x64: 5.0.0-preview.5.20253.7 -> 5.0.0-preview.5.20257.11
- Microsoft.NETCore.Platforms: 5.0.0-preview.5.20253.7 -> 5.0.0-preview.5.20257.11
- Microsoft.NETCore.App.Internal: 5.0.0-preview.5.20253.7 -> 5.0.0-preview.5.20257.11
- Microsoft.NETCore.App.Ref: 5.0.0-preview.5.20253.7 -> 5.0.0-preview.5.20257.11
- System.Diagnostics.DiagnosticSource: 5.0.0-preview.5.20253.7 -> 5.0.0-preview.5.20257.11
- System.Text.Encodings.Web: 5.0.0-preview.5.20253.7 -> 5.0.0-preview.5.20257.11
- System.Reflection.Metadata: 5.0.0-preview.5.20253.7 -> 5.0.0-preview.5.20257.11

* Update dependencies from https://github.com/dotnet/arcade build 20200506.5

- Microsoft.DotNet.Arcade.Sdk: 5.0.0-beta.20228.4 -> 5.0.0-beta.20256.5

* Update SDKs and TFMs

* Try fixing SDK target

* Try removing reference to xunit?

* Try again?

* Revert test tfm

* Remove more xunit references

* Update dependencies from https://github.com/dotnet/runtime build 20200508.3

- Microsoft.Extensions.Logging: 5.0.0-preview.5.20253.7 -> 5.0.0-preview.5.20258.3
- Microsoft.Extensions.Configuration.Json: 5.0.0-preview.5.20253.7 -> 5.0.0-preview.5.20258.3
- Microsoft.Extensions.DependencyModel: 5.0.0-preview.5.20253.7 -> 5.0.0-preview.5.20258.3
- Microsoft.NETCore.App.Runtime.win-x64: 5.0.0-preview.5.20253.7 -> 5.0.0-preview.5.20258.3
- Microsoft.NETCore.Platforms: 5.0.0-preview.5.20253.7 -> 5.0.0-preview.5.20258.3
- Microsoft.NETCore.App.Internal: 5.0.0-preview.5.20253.7 -> 5.0.0-preview.5.20258.3
- Microsoft.NETCore.App.Ref: 5.0.0-preview.5.20253.7 -> 5.0.0-preview.5.20258.3
- System.Diagnostics.DiagnosticSource: 5.0.0-preview.5.20253.7 -> 5.0.0-preview.5.20258.3
- System.Text.Encodings.Web: 5.0.0-preview.5.20253.7 -> 5.0.0-preview.5.20258.3
- System.Reflection.Metadata: 5.0.0-preview.5.20253.7 -> 5.0.0-preview.5.20258.3

* Use `dotnet msbuild` in CI builds

* Update dependencies from https://github.com/dotnet/runtime build 20200509.5

- Microsoft.Extensions.Logging: 5.0.0-preview.5.20253.7 -> 5.0.0-preview.5.20259.5
- Microsoft.Extensions.Configuration.Json: 5.0.0-preview.5.20253.7 -> 5.0.0-preview.5.20259.5
- Microsoft.Extensions.DependencyModel: 5.0.0-preview.5.20253.7 -> 5.0.0-preview.5.20259.5
- Microsoft.NETCore.App.Runtime.win-x64: 5.0.0-preview.5.20253.7 -> 5.0.0-preview.5.20259.5
- Microsoft.NETCore.Platforms: 5.0.0-preview.5.20253.7 -> 5.0.0-preview.5.20259.5
- Microsoft.NETCore.App.Internal: 5.0.0-preview.5.20253.7 -> 5.0.0-preview.5.20259.5
- Microsoft.NETCore.App.Ref: 5.0.0-preview.5.20253.7 -> 5.0.0-preview.5.20259.5
- System.Diagnostics.DiagnosticSource: 5.0.0-preview.5.20253.7 -> 5.0.0-preview.5.20259.5
- System.Text.Encodings.Web: 5.0.0-preview.5.20253.7 -> 5.0.0-preview.5.20259.5
- System.Reflection.Metadata: 5.0.0-preview.5.20253.7 -> 5.0.0-preview.5.20259.5

* Try undoing `$(EnableFrameworkPathOverride) workaround

* Fix windows builds

* Fix NET.sdk.Razor.Test

* Try fix codecheck

* Skip tests failing with CS1701

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
Co-authored-by: John Luo <johluo@microsoft.com>
Co-authored-by: Doug Bunting <6431421+dougbu@users.noreply.github.com>\n\nCommit migrated from a60b721dbb
2020-05-11 02:32:33 +00:00
Ben Adams a410ed4601
Use Pinned Object Heap for MemoryPool (#21614) 2020-05-09 15:26:35 -07:00
Todd Grunke b0d819f1e8 Several changes targeted to improving perf of RazorSyntaxTree.Parse (dotnet/aspnetcore-tooling#1874)
* Several changes targeted to improving perf of RazorSyntaxTree.Parse

1) Modify ParserHelpers.IsNewLine to use a switch instead of Array.IndexOf
2) Modify Tokenizer.CreateToken to take in an array of RazorDiagnostics rather than an IReadOnlyList as that was causing a ToArray call on an empty diagnostics very often (during a SyntaxFactory.Token call)
3) Modify TokenizerBackedParser.Putback to allow an IReadOnlyList as a parameter to not require creation of a reverse enumerator.
4) Cut down allocations in HtmlMarkupParser.GetParserState by:
    a) Using an IReadOnlyList instead of IEnumerable to get rid of the allocations from the .any calls
    b) Don't allocate while reading initial spacing
    c) Inline the IsSpacingToken code so cut down on code executed and need to allocate a separate Func
5) Modify CSharpCodeParser.IsSpacingToken to now be a set of methods instead of a single method that allocates a Func. This is a very high traffic method.
6) Implement a fairly rudimentary Whitespace token cache, as they can be reused. This was based off Roslyn's SyntaxNodeCache, but simplified significantly. It's probably worth investigating whether you should more fully embrance token caching outside of whitespace.

* PR feedback and added one more optimization in LocateOwner that's been bugging me for years. Assuming all chidlren are contained within a nodes span, we can short-circuit the DFS this code was doing significantly cutting time in this method which is important as it's exercised on the main thread during typing.

* missed a space

* StringTextToSnapshot's switch to IsNewLine needed to use start as the index to begin the search, not zero.\n\nCommit migrated from 45411f7526
2020-05-09 06:06:13 -07:00
N. Taylor Mullen ed7338c15a Remove RazorDeveloperTools because they were infrequently used and caused problems.
\n\nCommit migrated from c2d717bc98
2020-05-08 16:52:27 -07:00
John Luo 81d269d6f3
Merge branch 'master' into merge/release/5.0-preview4-to-master 2020-05-08 14:48:06 -07:00
Pranav K 5d96b5de10
Template test infrastructure fixups (#21558)
* Template test infrastructure fixups

* Add timeouts to process launches and lock acquisitions
* Dispose launched processes
* Remove unused code
2020-05-08 13:27:17 -07:00
Javier Calvarro Nelson a67c14f5b0
[SPA] Fix register/profile paths (#21625) 2020-05-08 13:17:25 -07:00
Pranav K cacabfdaba
Fixups 2020-05-08 11:38:14 -07:00
Pranav K d0677559b7
Template test infrastructure fixups
* Add timeouts to process launches and lock acquisitions
* Dispose launched processes
* Remove unused code
2020-05-08 11:38:13 -07:00
Javier Calvarro Nelson 95a2208530
[Templates] Unquarantine some tests that have been passing for the past month (#21613)
Unquarantine some tests that have been passing for the past month
2020-05-08 09:57:23 -07:00
David Fowler 6aa13dde98
Use a dedicated thread for timers in rather than a Timer (#21490)
* Use a dedicated thread for timers in rather than a Timer
- This make it possible to still timeout various operations when there's thread pool starvation occurring.
- Print heartbeat slow if duration > interval
2020-05-08 01:07:36 -07:00
Todd Grunke c027fcf8e6 Missed a minor optimization as I wasn't using a parameter for the binary search method. The files I've opened don't actually hit the code path (they always hit the optimization for checking the previous/next/current line)
\n\nCommit migrated from 75f34eec60
2020-05-07 20:44:15 -07:00
Javier Calvarro Nelson cdfa43bbe0
Avoid trying to fix the trusted root certificates (#21599) 2020-05-07 18:41:52 -07:00
Todd Grunke 069b409dd4 Fix perf issue in LineTrackingStringbuffer.ScanLines.
I noticed several hundred ms spent in this method from a customer profile. Primarilly, the method was doing a linear scan of all lines trying to find one that contained the requested position. I changed this to a binary search, but kept/improved the optimization around checking next/previous lines before instigating the search.

Note, there was also a bug where the old code did:

else if (absoluteIndex > _currentLine.Index && _currentLine.Index + 1 < _lines.Count)

but it should have been coparing absoluteIndex with _currentLine.Start
\n\nCommit migrated from 32a0f28708
2020-05-07 17:35:41 -07:00
Christian Wenz 64a0d0396e
Upgrade jQuery in samples to version 3.5.1 (#21577)
Fixes #21572
2020-05-07 14:42:14 -07:00
Andrew J Said b328f501fa
Log type of ObjectResult in ObjectResultExecutor (#21425)
* Log type of ObjectResult in ObjectResultExecutor

* Log only class name of FileResult, ObjectResult types
2020-05-07 12:55:57 -07:00
Pranav K 51f18b5652
Use Encoding.CreateTranscodingStream (#21509)
* Use Encoding.CreateTranscodingStream

Fixes https://github.com/dotnet/aspnetcore/issues/21243
2020-05-06 16:59:39 -07:00
Brennan 5fd4f87977
Avoid crashing in PollingFileWatcher (#21544) 2020-05-06 15:47:50 -07:00
Javier Calvarro Nelson a9d702624a
[Fixes #19666] [Components] Improve reliability of component quarantined tests (take 2) (#21499)
* Tries to increase the reliability of the tests by:
  * Trying to ensure that the server is up and running before connecting.
  * Retrying a connection attempt multiple times.
2020-05-06 10:12:06 -07:00
Doug Bunting fdb0372a67
Upgrade to more recent .NET SDK (#21017)
* Update SDK to preview.5.20251.2
  - includes support for the `net5.0` TFM
  - includes fix for `$(PublishDepsFilePath)`
  - includes fix for incorrect NU5118 warnings when `'$(PackAsTool)' == 'true'`
* !!temporary!! Suppress NU5129 warnings
  - build/ and buildTransitive/ naming conventions do not treat TFMs as equivalent
* Run `InjectRequestHandlerOnPublish` later
  - late enough for .deps file to exist i.e. after the `CopyFilesToPublishDirectory` target
  - `AfterTargets` is a bit flaky; use `BeforeTargets` with empty targets instead
* Always add `@(AssemblyAttribute)` items before they are processed
  - use `BeforeTargets="GetAssemblyAttributes"` for consistently throughout the repo
2020-05-05 21:59:15 -07:00
Brennan c9cdc4891a
Deflake TimeAwaitable finalizer test (#21523) 2020-05-05 19:45:08 -07:00
Javier Calvarro Nelson d6409371ae
[Templates] Diagnostics improvements and certificate fixes (#21493)
* Move template specific helpers out of shared and into templates
* More debug info, fix casing issues
* Keep test skipped
* Undo lock changes
* Standarize retry logic
* Tweak certificate validation code
2020-05-05 19:39:51 -07:00
Brennan 88dbfaa2ab
Set certificate in some Kestrel tests to avoid global machine state (#21516) 2020-05-05 19:18:37 -07:00
Chris Ross 32b2894610
Revert "Handle IIS OnCompleted callbacks later #17268 (#17756)" (#21525)
This reverts commit 11ecc62ea9.
2020-05-05 19:06:54 -07:00
Pranav K 2ca2a2d405
Update debugger to 1a6e64a938 (#21524) 2020-05-06 00:17:48 +00:00
Javier Calvarro Nelson 8be526a11b
[SPA] Updates SPA dependencies to make npm audit happy (#21324)
* Update react dependencies

* Update angular dependencies

* Update react-redux dependencies
2020-05-05 12:17:48 -07:00
Pranav K 4f5bf164df
Show debugger attach message (#21483)
Also spruce up branding
2020-05-05 09:06:55 -07:00
Pranav K 9e412f4c7f
Do not attempt to load satellite assemblies until after MainAsync has executed (#21476)
WASM runtime does not like it when you attempt to load satellite assemblies
for two sets of non-neutral cultures - the first is always loaded. This change
defers loading satellite assemblies until after Program.Main has executed
and the developer has configured the culture for the application.

Fixes https://github.com/dotnet/aspnetcore/issues/21433
2020-05-05 09:06:42 -07:00
Stephen Halter 4ebf695a98
Fix NRE in KestrelServerOptions.Listen*() (#21467)
* Fix NRE in KestrelServerOptions.Listen*()

* Fix tests
2020-05-05 03:04:28 +00:00
N. Taylor Mullen 4bdf89bdf9 Fix more policheck failures in MSN.cshtml\n\nCommit migrated from c2507ca208 2020-05-04 13:49:38 -07:00
Javier Calvarro Nelson 7eca4ab2ec [Static web assets] Use prebuilt packages in tests
* Avoids running dotnet restore and dotnet pack during tests which caused test hangs\n\nCommit migrated from 300eeb08d2
2020-05-04 12:19:08 -07:00
Pranav K cc2b64ec5e
Re-use the Blazor app for stress runs (#21078)
* Re-use the Blazor app for stress runs

Our current stress runs re-used the perf tests which recreated the blazor app on each run. Perf runs are meant to run
and be done, however, we want stress apps to be long lasting to capture things like memory leaks.

This change creates a fork in the tests to support stress runs that re-use the app between runs.
2020-05-04 09:02:05 -07:00
Kahbazi a4c45262fb
Add AuthenticationDisplayName to HttpSys (#21410)
* Add AuthenticationDisplayName to HttpSys

* update reference assembly

* Update Microsoft.AspNetCore.Server.HttpSys.netcoreapp.cs

* Trigger build
2020-05-02 09:11:51 -07:00
Ajay Bhargav B 3eb812a3f5
Quarantined dotnet user-secrets test (#21412) 2020-05-01 17:49:48 -07:00
Safia Abdalla 37da482969
Move Blazor Server template tests to new project (#21345) 2020-05-01 11:47:52 -07:00
Stephen Halter 100823af0d
Kestrel reloadable endpoint config (#21072) 2020-04-30 20:42:19 -07:00
Safia Abdalla 2a97de0344
Fix intermediate path for service worker assets (#21128) 2020-04-30 15:03:16 -07:00
Pranav K 147f5758c6
Ensure satellite resources are published when building in VS (#21347)
* Ensure satellite resources are published when building in VS

Fixes https://github.com/dotnet/aspnetcore/issues/21355
2020-04-30 14:57:04 -07:00
Artak 9025f63fc3
Marked the Mono.WebAssembly.Interop package as non-shipping (#21367)
* Marked the Mono.WebAssembly.Interop package as non-shipping
2020-04-30 14:56:59 -07:00
John Luo 2fa0212285
Fix package overrides (#21329)
* Fix package overrides

* Add a test
2020-04-30 13:59:32 -07:00
Julius 63415b7dd2
Jfheins/improve error message (#21295)
* Add test for empty URL

* Throw if URL is empty, adjust test
2020-04-30 12:46:31 -07:00
Safia Abdalla 8271204317
De-quarantine BlazorServerTemplateWorks_IndividualAuth test (#21286) 2020-04-30 12:17:48 -07:00
Steve Sanderson 4438f33304 Update ws-proxy to match runtime in use (from Mono commit cc6d4bf6cfce33ae3b41f74ac14ac2cb770603d5) 2020-04-30 16:56:25 +01:00
Stephen Halter 49b4f418d5
Quarantine dotnet-user-secrets InitCommandTests (#21338) 2020-04-29 20:56:43 -07:00
Ben Adams 3af92e29b5
Make connection options parsing "safe" (#21004) 2020-04-29 16:23:56 -07:00
Artak 5d88e3365b
Disable documentation generation for a test project (#21340) 2020-04-29 15:33:36 -07:00
Javier Calvarro Nelson c10fea055c Revert "[Blazor] Unquarantine ComponentHubReliabilityTests (#21319)"
This reverts commit f36adf0805.
2020-04-29 11:09:38 -07:00
Javier Calvarro Nelson f36adf0805
[Blazor] Unquarantine ComponentHubReliabilityTests (#21319)
Fixes #19666
2020-04-29 10:04:26 -07:00
David Fowler 0fbf919d50
Use the RequestContext as the threadpool workitem (#21294)
- Avoids a task allocation (reuses the existing RequestContext allocation)
- Side benefit is that it's easier to see what things are queued into the threadpool for diagnostics!
2020-04-29 00:06:42 -07:00
David Fowler 5c6f97b9ef
Made changes to FileBufferWriteStream (#21223)
* Made changes to FileBufferWriteStream
- Make the internal FileStream write only
- Make a new readable stream over the same file in DrainBufferAsync to copy data to the buffer.
- Added an overload to DrainBufferAsync into a PipeWriter and use this overload in the 2 formatters in MVC. This should reduce the amount of copying from the internal buffer and reduces pinning (since these buffers are already pinned)
- Improved formatter tests
2020-04-28 23:22:39 -07:00
Andrew Stanton-Nurse 8fe81d9182
unquarantine some user secrets tests (#21304) 2020-04-29 01:20:02 +00:00
John Luo 2ec9b2e5d1 Use the correct crossgen 2020-04-28 17:23:53 -07:00
Brennan 600d5ff497
[SignalR] Fix DataProtection with parallel tests (#21271) 2020-04-28 14:53:27 -07:00
Ben Adams 5fc067266f
Make GetFinalTransferCoding "safe" (#21202) 2020-04-28 13:01:22 -07:00
Ben Adams 8b2f8088e9
Make GetKnownHttpScheme "safe" (#21204) 2020-04-28 12:58:38 -07:00
Pranav K e73d0fb575
Fixup ProcessAsync_AwaitersUseTheResultOfExecutor (#21274)
This test simulates concurrent calls on a CacheTagHelper to ensure only one enters a critical section.
However it re-uses a TagHelperOutput instance that's modified concurrently which isn't valid or what happens at runtime.

Fixes https://github.com/dotnet/aspnetcore/issues/20825
2020-04-28 12:28:55 -07:00
Stephen Halter 5ac720abb3
Don't count start line toward header size limit (#21272) 2020-04-28 10:36:45 -07:00
Javier Calvarro Nelson 1af2060d53 [Fixes dotnet/aspnetcore-tooling#17233 dotnet/aspnetcore-tooling#18543 dotnet/aspnetcore-tooling#18707 dotnet/aspnetcore-tooling#18561][Static web assets] Improve test reliability (dotnet/aspnetcore-tooling#1844)
* Improves the reliability of the affected tests with retries
* Pack and restore fail/hang in some occasions. The retries minimize
  the chances of these happening.
* For pack, we retry a few times but we ultimately continue as we've
  seen the package gets generated when pack hangs and looks correct.
  If that were not to be the case in the future, the test will fail.\n\nCommit migrated from 0d03b57617
2020-04-28 10:25:49 -07:00
Brennan da1a721003
Move TS tests to async and fix some test log leaking (#21076) 2020-04-27 16:57:28 -07:00
N. Taylor Mullen 986d465c19 Fix PoliCheck failures.
Addresses:
- https://devdiv.visualstudio.com/DevDiv/_workitems/edit/1111066
- https://devdiv.visualstudio.com/DevDiv/_workitems/edit/1111067
- https://devdiv.visualstudio.com/DevDiv/_workitems/edit/1111068
\n\nCommit migrated from 9603451af9
2020-04-27 13:38:52 -07:00
Pranav K b837ebf206
Produce RTM branded blazor packages (#21257) 2020-04-27 13:37:33 -07:00
Pranav K 9cecd089e4
Ignitor fixups (#21198)
* Ignitor fixups

* Do not throw if an ElementReferenceCapture node is encountered.
* Allow configuring the HubConnectionBuilder
* Make useful API public
2020-04-27 13:27:11 -07:00
Cédric Luthi b73b2027cc
Improve exception when HTTP.sys can't register a prefix (#20718)
* Improve exception when HTTP.sys can't register a prefix

Propose an actionable solution and include a link to the documentation.

* Add SkipOnHelix attribute
2020-04-27 20:16:26 +00:00
Bruce Adams c7a2c0648a
Fixes username IdentityError description (#20497)
Fixes #20496
2020-04-27 11:33:38 -07:00
John Luo 05f58bbbfa Build aspnetcore for win-arm64 (#19317)
* Build for win-arm64

* Missed file

* Disable Selenium tests on arm64

* Include installers in the uploaded artifacts
2020-04-27 00:34:47 -07:00
Doug Bunting 54722a52b6
A quick collection of quick fixes (#20993)
* Quick fix: Simplify devBuilds.yml
  - remove an excess build step

* Quick fix: Move `SetupNugetSources` script invocations above `parameters.beforeBuild`
  - ensure NuGet.config is ready for all internal builds
  - remove now-duplicate `SetupNugetSources` invocations wherever default-build.yml is used

* Quick fix: Clean up SiteExtensions/build.cmd
  - quote all rooted paths
  - check `%ERRORLEVEL%` after every `CALL`
  - nits:
    - add a few more `ECHO` commands
    - wrap long lines

* Quick fix: Ensure `$(BuildNative)` is always set correctly
  - fix problems using `-all` or `/p:BuildAllProjects=true` without `-buildNative`
    - ensure `$(BuildNative)` is `false` where it's not supported
  - move some duplicated settings into eng/Common.props and `<Import />` the new file
  - remove now-duplicated parts of conditions using `$(BuildNative)`

* Quick fix: Consistently use `--build-*`
  - avoid `/p:Build*`  on the command line (except with eng/scripts/ci-source-build.sh)
  - nits:
    - remove now-useless `-buildNative` with `-all`
    - expand and correct a couple of related comments and messages

* Quick fix: Support `-all` together with `-projects`
  - remove need to specify `/p:BuildAllProjects=true`
  - nit: simplify some Boolean logic
2020-04-25 18:39:19 -07:00
Ryan Brandenburg 2589a63141
Quarantine ServerAcceptsRequestWithheaderTotalSizeWithinLimit (#21191) 2020-04-25 21:26:50 +00:00
Christian Wenz f1dcc59255
Update jQuery 2.2 and 3.3.1 in samples to 3.4.1 (#20356) 2020-04-25 11:26:43 -07:00
Ben Adams f5fa16e998
Make HTTP/1.1 startline parsing "safe" (#20885) 2020-04-23 18:32:54 -07:00
Brennan 2cd6a13a56
Quarantine flaky test (#21156) 2020-04-23 14:17:34 -07:00
Safia Abdalla 40f0cdfa3c
Fix up template generation for config (#21147) 2020-04-23 12:17:12 -07:00
Hao Kung 9ae096c929
Quarantine identity test (#21102) 2020-04-23 11:03:51 -07:00
Pranav K 5da314644a Add an option to allow trimming collation data 2020-04-23 12:08:21 +01:00
Brennan 1cd85c3ff9
Fix SiteExtension build and warning (#21131) 2020-04-22 20:14:20 -07:00
Brennan d775e9d959
Fixing build warnings (#21044) 2020-04-22 15:36:40 -07:00
Brennan f7c26b3130
Quarantine test that caused test abort (#21113) 2020-04-22 15:34:23 -07:00
John Luo 241dc6b98e
Fix race in gRPC interop test logging (#21080)
* Remove server-side logging
2020-04-22 14:28:47 -07:00
Larry Ewing 5dc5f6c230
Silence the runtime output from the debugger (#20975)
* Silence the runtime output from the debugger

* Update src/Components/Web.JS/src/Platform/Mono/MonoPlatform.ts

Co-authored-by: Pranav K <prkrishn@hotmail.com>
2020-04-22 11:15:49 -07:00
George 2456e19de2
Use encodeURIComponent instead of encodeURI to support returnURLs with more than one query (#20874)
When return URLs query parameters such as
2020-04-22 09:39:48 -07:00
Martin Costello 0ee1420c7f
Fix missing space in exception message (#20900)
Fix missing space in exception message when the .deps file cannot be found.
2020-04-22 09:39:02 -07:00
Ryan Nowak 80861f1da9
Fix use of precedence in endpoint routing DFA (#20801)
* Fix use of precedence in endpoint routing DFA

Fixes: #18677
Fixes: #16579

This is a change to how sorting is use when building endpoint routing's graph of
nodes that is eventually transformed into the route table. There were
bugs in how this was done that made it incompatible in some niche
scenarios both with previous implementations and how we describe the
features in the abstract.

There are a wide array of cases that might have been impacted by this
bug because routing is a pattern language. Generally the bugs will involve a
catch-all, and some something that changes ordering of templates.

Issue #18677 has the simplest repro for this, the following templates
would not behave as expected:

```
a/{*b}
{a}/{b}
```

One would expect any URL Path starting with `/a` to match the first
route, but that's not what happens.

---

The root cause of this bug was an issue in how the algorithm used to be
build the DFA was designed. Specifically that it uses a BFS to build the
graph, and it uses an up-front one-time sort of endpoints in order to
drive that BFS.

The building of the graph has the expectation that at each level, we
will process **all** literal segments (`/a`) and then **all** parameter
segments (`/{a}`) and then **all** catch-all segments (`/{*a}`). Routing
defines a concept called *precedence* that defines the *conceptual*
order in while segments types are ordered.

So there are two problems:

- We sort based on criteria other than precedence (#16579)
- We can't rely on a one-time sort, it needs to be done at each level
(#18677)

---

The fix is to repeat the sort operation at each level and use precedence
as the only key for sorting (as dictated by the graph building algo).

We do a sort of the matches of each node *after* building the
precedence-based part of the DFA, based on the full sorting criteria, to
maintain compatibility.

* Add test
2020-04-21 22:48:27 -07:00
Doug Bunting 2e970f8e4f Quarantine recent test failures
- see also #21080 for another recent failure
2020-04-21 22:27:15 -07:00
David Fowler f9a9788c67
Use the default pipe options for backpressure (#21001)
* Use the default pipe options for backpressure
- This controls memory so clients aren't easily overwhelmed. With the changes made to Pipe to no longer throw if the pause threshold is exceeded makes this work well.
- Remove PipeReaderFactory
- Implement cancellation in SSE

Contributes to #17797
2020-04-21 16:31:18 -07:00
Pranav K 25f89e22f3
Update dbgproxy to 70ff920a89 (#21075) 2020-04-21 16:09:45 -07:00
dotnet-maestro[bot] b8f7dde377
[blazor-wasm] Update dependencies from dotnet/arcade dotnet/blazor (#20972)
* Update dependencies from https://github.com/dotnet/blazor build 20200417.2

- Microsoft.AspNetCore.Components.WebAssembly.Runtime: 3.2.0-rc1.20217.1 -> 3.2.0-rc1.20217.2

* Update dependencies from https://github.com/dotnet/blazor build 20200418.1

- Microsoft.AspNetCore.Components.WebAssembly.Runtime: 3.2.0-rc1.20217.1 -> 3.2.0-rc1.20218.1

* Update dependencies from https://github.com/dotnet/arcade build 20200418.1

- Microsoft.DotNet.Arcade.Sdk: 1.0.0-beta.20208.8 -> 1.0.0-beta.20218.1
- Microsoft.DotNet.GenAPI: 1.0.0-beta.20208.8 -> 1.0.0-beta.20218.1
- Microsoft.DotNet.Helix.Sdk: 2.0.0-beta.20208.8 -> 2.0.0-beta.20218.1

* Update dependencies from https://github.com/dotnet/blazor build 20200420.1

- Microsoft.AspNetCore.Components.WebAssembly.Runtime: 3.2.0-rc1.20217.1 -> 3.2.0-rc1.20220.1

* Update to BROWSER RID

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
Co-authored-by: Pranav K <prkrishn@hotmail.com>
2020-04-21 20:19:04 +00:00
Brice Lambson 929f68bd87 Use SQLite write-ahead logging and shared caches
This will result in less locking and, thus, greater throughput.
2020-04-21 12:44:22 -07:00
Pranav K 2612ec89b2
Updating build to https://github.com/mono/mono/commit/ae8e4b5b044 (#21034) 2020-04-21 06:53:34 -07:00
James Newton-King 42056d27d2
Remove flaky FlowControl_ParallelStreams_FirstInFirstOutOrder… (#21037) 2020-04-21 15:44:02 +12:00
Pranav K 6c23730fa8
Compute SHA256s for blazor.boot.json in parallel (#21021)
* Compute SHA256s for blazor.boot.json in parallel
2020-04-20 17:25:24 -07:00
Pranav K 202d21431e
Avoid copying timezone data bytes (#21028)
This was missed in the PR when changing the implementation to use
slices of Uint8Array rather than slices of ArrayBuffer.

Making the function non-async since it's entirely synchronous.
2020-04-20 15:20:35 -07:00
Pranav K 2bd662fe0b
Update DbgProxy to c8cbcaad (#20865) 2020-04-20 11:22:29 -07:00
Pranav K 4191eb5c76
Use System.Text.Json's copy ctor (#21016) 2020-04-20 11:14:17 -07:00
David Fowler ab0a422154
Add missing projects to allow solution build (#21000) 2020-04-19 21:58:35 -07:00
Pranav K 99781d3b25
Share SignalR's HubProtocol implementation in Blazor (#20922) 2020-04-18 10:07:51 -07:00
Safia Abdalla 089bb4a072
Improve tests for logging configuration support (#20973) 2020-04-17 20:55:07 -07:00
David Fowler 812dfb97d3
Fix TimerAwaitable rooting (#20937)
* Fix TimerAwaitable rooting
- This fixes an issue where components that use timer awaitable currently need to be explicitly stopped and disposed for it to be unrooted. This makes it possible to write a finalizer.
2020-04-17 19:05:44 -07:00
Daniel Roth f393c7481a
Update Blazor WebAssembly survey link for 3.2.0-rc1 (#20974) 2020-04-17 16:30:47 -07:00
Pranav K d2ee131fd8
Fixup reference to M.AspNetCore.Components.WebAssembly.HttpHandler (#20891)
* Fixup reference to Microsoft.AspNetCore.Components.WebAssembly.HttpHandler

As part of attempting to fix the reference in the test project (which ultimately wasn't needed), I messed up the package reference in the WebAssembly package
This fixes the package reference and removes unnecessary code from the test project
2020-04-17 14:23:20 -07:00
Javier Calvarro Nelson 8f12519b0e
Fix typo in ServiceWorkerAssetsManifest.targets (#20944)
Fixes a typo that prevented the service worker from being removed during publish
2020-04-17 07:16:05 -07:00
Safia Abdalla 8b6ccff647
Fix AuthStateAsyncReturnsUnrelatedCancelledTask_TreatAsFailure flake (#20881) 2020-04-17 06:55:20 -07:00
Daniel Eisterhold cf1c5cbb52
Fix content showing on top of sticky header (#20283)
Fix content showing on top of sticky header
2020-04-17 13:21:43 +01:00
David Fowler de63489aca
Add support for listening to arbitrary endpoints (#20892)
* Add support for listening to arbitrary endpoints
- This adds support for kestrel using arbitrary transports with any endpoint. This lets the consumer set an endpoint that flows all the way to the transport.
- Added tests

* Update src/Servers/Kestrel/Core/src/KestrelServerOptions.cs

Co-Authored-By: Chris Ross <Tratcher@Outlook.com>

Co-authored-by: Chris Ross <Tratcher@Outlook.com>
2020-04-16 23:57:41 -07:00
Steve Sanderson 03068c9165 Transfer .NET unhandled exceptions to JS via dedicated interop call. Fixes #20280 (#20907) 2020-04-17 07:45:06 +01:00
Steve Sanderson e95264f237 Support overriding how boot resources are loaded. Fixes #5462 2020-04-17 07:45:06 +01:00
Steve Sanderson fcb96b6edd Upgrade all NPM dependencies. Update to use current Emscripten APIs matching newer type definitions. 2020-04-17 07:45:06 +01:00
Brennan e569e7c770
Update BenchmarkDotNet for 5.0 (#20889) 2020-04-16 22:37:56 -07:00
Scott Addie b89880b1a6
Define default unpkg file for SignalR MsgPack library (#20703) 2020-04-17 02:51:14 +00:00
Scott Addie dcff62347e
Define default unpkg file for SignalR JS client (#20697)
Fixes #20696
2020-04-17 02:07:08 +00:00
Pranav K 50a2527ca9
Copy I18N assemblies when running without the linker (#20878)
* Copy I18N assemblies when running without the linker
Fixes https://github.com/dotnet/aspnetcore/issues/20517
2020-04-16 16:52:07 -07:00
Javier Calvarro Nelson 8e1e81ae78
[HTTPS] Update certificate strategy for Mac OS (#20022)
* Fixes and improvements for dotnet-dev-certs:
* Revamps the HTTPS developer certificate tool implementation.
  * It accumulated a lot of cruft during the past few years and that has made making changes harder.
* Separated the CertificateManager implementation into different classes per platform.
  * This centralizes the decision point of choosing a platform in a single place.
  * Makes clear what the flow is for a given platform.
  * Isolates changes needed for a given platform in the future.
* Moved CertificateManager to a singleton
  * No more statics!
* Updates logging to use EventSource
  * We didn't have a good way of performing logging as the code is shared and must run in multiple contexts and the set of dependencies need to be kept to a minimum.
  * Adding ETW allow us to log/monitor the the tool execution and capture the logs with `dotnet trace` without having to invent our own logging.
  * We can decide to write an EventListener in `dotnet-dev-certs` to write the results to the console output.
* Updates the way we handle the dev-cert in Mac OS to use the security tool to import the certificate into the store instead of using the certificate store.
2020-04-16 13:52:10 -07:00
Ryan Brandenburg 820b0b20c0
Remove SPA project template tests (#20863) 2020-04-16 09:19:05 -07:00
Sébastien Ros 5b5784d950
Merge pull request #20873 from dotnet-maestro-bot/merge/release/3.1-to-master
[automated] Merge branch 'release/3.1' => 'master'
2020-04-15 15:50:25 -07:00
Sébastien Ros b243ae1615
Fixing QueryCollection property documentation (#20044)
* Fixing QueryCollection property documentation

* Update src/Http/Http/src/QueryCollection.cs

Co-Authored-By: Chris Ross <Tratcher@Outlook.com>

Co-authored-by: Sourabh Shirhatti <shirhatti@outlook.com>
Co-authored-by: Chris Ross <Tratcher@Outlook.com>
2020-04-15 22:28:43 +00:00
Sébastien Ros 998ebad707
Merge branch 'master' into merge/release/3.1-to-master 2020-04-15 13:01:24 -07:00
dotnet-bot 4f307c40be Merge in 'release/3.1' changes 2020-04-15 19:43:15 +00:00
David Fowler 1b99352ec7
Don't re-use DefaultHttpContext if IHttpContextAccessor is in use (#15049) (#20844)
* Don't re-use DefaultHttpContext if IHttpContextAccessor is in use
- Consumers may still get null or an ODE but will never end up with data from a different request.
- Make sure an ODE is thrown from all properties on HttpContext after the request is over.
2020-04-15 12:41:59 -07:00
Safia Abdalla b2c88e9a23
Add Microsoft.Extensions.Logging namespace to template (#20869)
* Add Microsoft.Extensions.Logging namespace to template
* Update Program.cs
2020-04-15 12:39:32 -07:00
dotnet-bot 12c9727281 Merge in 'release/3.1' changes 2020-04-15 19:27:41 +00:00
Brennan 5353ce9509
Use SemVer1 for SiteExtension (#20839) 2020-04-15 12:26:21 -07:00
Javier Calvarro Nelson ad725861a9
[Blazor][Wasm] Build fixes for incrementalism and PWA (#20861)
* Fixes incrementalism issue caused by a wrong up to date check
* Fixes PWA template on hosted scenario by removing the 'ServiceWorker' from the content itemgroup in all scenarios.
2020-04-15 10:26:00 -07:00
WuYafeng 377b9e5e09
Inconsistency between file `BuildServiceProviderAnalyzer.cs` and type `BuildServiceProviderValidator` (#20804) 2020-04-15 09:38:53 -07:00
ar0311 4c312e1d51
Fix weather.json (#20769)
Removed "temperatureF" elements from weather.json as WeatherForecast class calculates the Fahrenheit temperature internally from the retrieved Celcius temperature and not from the retrieved json data.
2020-04-15 09:37:33 -07:00
Stephen Halter ea555458dc
Always flush HTTP/2 headers despite flow control (#20831) 2020-04-15 09:22:27 -07:00
Pranav Krishnamoorthy 23c02ef9a9 Merged PR 7269: Avoid caching JsonSerializer
Avoid caching JsonSerializer
2020-04-14 22:38:24 +00:00
Safia Abdalla d03c3b2a1e
Move auth config options to app settings (#20790)
* Move auth config options to app settings
* Move logging configuration setup to host builder
* Address issues from peer review
2020-04-14 15:29:09 -07:00
dotnet-bot 45a57eac45 Merge in 'release/3.1' changes 2020-04-14 20:46:41 +00:00
BrennanConroy 260de2c10b Add BuildNumber to SiteExtension build 2020-04-14 13:42:25 -07:00
Pranav K 3fbb2f0cd9
Add timezone support (#20493) 2020-04-14 13:37:49 -07:00
dotnet-bot a2428c7175 Merge in 'release/3.1' changes 2020-04-14 20:01:33 +00:00
William Godbe 01429973ee
[release/3.1] Pass access token as query string when running SignalR in the browser (#20466)
* Pass access token as query string when running SignalR in the browser

* WEBASSEMBLY -> BROWSER
2020-04-14 12:59:06 -07:00
Alessio Franceschelli 970c9244c7
ModelValidation: Fixed MaxDepth exception when there are more items left then MaxValidationDepth after reaching MaxAllowedErrors (#18212)
* Consolidated similar tests in a theory

* Fix for InvalidOperationException when reached maxAllowedErrors and there are more items left then max depth

* Refactored Visitor logic to reduce the risk of a missing Pop.

* Added comment on when it can throw

* Updated reference assembly

* Reverted publid API change
2020-04-14 12:45:20 -07:00
dotnet-bot e3bd613f37 Merge in 'release/3.1' changes 2020-04-14 18:01:07 +00:00
William Godbe 8218d6e0e7
Fix various "Type or namespace not found" errors (#20736)
* Add manual packageReferences where needed

* Add more explicit packageRefs

* Fix typo

* undo changes to blazor.server.js

* Fix typo

* Don't gen ref assemblies in CodeCheck
2020-04-14 10:57:26 -07:00
N. Taylor Mullen e7df020906 Quarantine AppCanHandleClientAbortingConnectionMidRequest. 2020-04-14 10:39:31 -07:00
Daniel Roth 468af978a3 Update Blazor WebAssembly survey link for 3.2.0-preview5 2020-04-14 10:11:55 -07:00
Wayne Adams 75c779773f
Add missing OffsetX and OffsetY events to MouseEventArgs. (#20478)
* Add missing OffsetX and OffsetY events to MouseEventArgs.
* Update public interfaces
* Generate Reference Assemblies
2020-04-14 10:00:32 -07:00
Pranav K 9dda113d60 Make Ignitor tests flaky 2020-04-14 09:37:09 -07:00
Pranav K f3a1fb6ad3 Fixups 2020-04-14 09:37:09 -07:00
Safia Abdalla b289633533 Do not override existing web.config during IIS publish 2020-04-14 09:37:09 -07:00
Pranav K 38285eb9ba
Pin shared fx version to 3.1.0 (#20802) 2020-04-14 09:36:40 -07:00
Thomas Levesque 5d914d4d2d
Implement HttpRequestStreamReader.ReadToEndAsync (#18232) 2020-04-13 23:40:21 -07:00
Helgevold Consulting, LLC 70daed535a
Allow access to msgpack configuration options (#20438) 2020-04-13 21:58:03 -07:00
Pranav K 1e70883e87
Create a ref-assembly package for HttpHandler (#20382)
* Create a ref-assembly package for HttpHandler

Fixes #19202
2020-04-13 14:07:15 -07:00
Steve Sanderson 05990683cf
Unconditionally enable razor pages in hosted template. Fixes #20791 (#20792) 2020-04-13 17:53:54 +01:00
Ben Adams 6016e70285
Make header parsing "safe" (#20562)
* OnHeadersComplete improve speculation and memory ordering (VTune)
2020-04-13 09:46:43 -07:00
Alessio Franceschelli e3d3da3546
HttpRequestStreamReader overrides for Read Span, ReadAsync Memory, ReadLine and ReadLineAsync (#18802) 2020-04-13 08:18:12 -07:00
Javier Calvarro Nelson 546b52004c
[Blazor][Wasm] Adds HttpMessageHandler to automatically attach tokens to outgoing requests (#20682)
* Adds an authorization handler for integration with HttpClient in different scnearios.
* Adds a message handler to streamline calling protected resources on the same base address.
2020-04-13 04:27:53 -07:00
Brennan 2b7b79f4db
Fix flaky HealthCheck test (#20741) 2020-04-11 17:22:22 -07:00
Pranav K 3c1bd093e9
Print disk usage (#20704)
* Print disk usage
* Try again
* Disk util part3
* dont look at /tmp
* Remove max-depth
* Add disk usage stats to all non-windows platforms
* Disable Ubuntu quarantined test step
* Apply suggestions from code review
  - Make thingies worky on macOS
* Update .azure/pipelines/jobs/default-build.yml
* Undo skip of qurantined test run
* Update .azure/pipelines/jobs/default-build.yml
  - do not reference directory that doesn't exist
* Update .azure/pipelines/jobs/default-build.yml
  - reduce noise in Mac disk utilization output

Co-authored-by: Doug Bunting <6431421+dougbu@users.noreply.github.com>
2020-04-11 12:59:18 -07:00
Pranav K cc0407877f
Merge branch 'blazor-wasm' into blazor-wasm-preview5 2020-04-10 21:49:10 -07:00
Günther Foidl 810969084a
Replaced Span<T>.Fill(0) with Span<T>.Clear() (#20023) 2020-04-10 15:18:37 -05:00
Safia Abdalla c4703acfa7
Enable reading and editing from same Configuration object (#20647) 2020-04-10 09:59:05 -07:00
Stephen Halter 5607ea1e0c
Remove workaround in HeaderPropagationMiddleware (#20533)
Fixed by #14146 which starts each request on a fresh ExecutionContext
2020-04-09 16:43:18 -07:00
Hao Kung 200f2c49be
Reenable sharedfx with arm64 queue skipped (#20659) 2020-04-09 12:24:03 -07:00
Javier Calvarro Nelson 5f7e1a0004
[Static web assets] Add comment about static web assets in CreateDefaultBuilder (#20653)
Updates the existing comment to indicate that we plug-in static web assets in development
2020-04-09 01:28:19 -07:00
Hao Kung 1bbca1502b
Revert "Reenable framework unit tests on helix (#19975)" (#20657)
This reverts commit 9a792f2a27.
2020-04-09 05:00:26 +00:00
Javier Calvarro Nelson 43bd9dbf3e
[Blazor][Wasm] API review feedback (#20652)
* UserFactory->AccountClaimsPrincipalFactory
* Change constants to static readonly
* Make applicationpaths provider and RemoteAuthenticatorViewCore dependencies internal
* Change collection types, make properties get only where possible
* Change state constraint to extend RemoteAuthenticationState
2020-04-08 16:08:43 -07:00
John Luo 84a04c9df1
Quarantining tests (#20631)
* Quarantining tests

* Namespace collision
2020-04-08 12:53:53 -07:00
Brennan 8e50db65f3
Cleanup resources in Java client (#20473) 2020-04-08 12:48:50 -07:00
Jan Joneš 1d56c516f8 Implement `EmptyOrWhiteSpaceWriter.Encoding` 2020-04-08 11:59:18 -07:00
TeBeCo f3963e7cb7
Applying suggesting fix from https://github.com/dotnet/aspnetcore/issues/10422 and use "CopyToOutputDirectory" rather than "CopyToPublishDirectory" (#20274) 2020-04-08 09:57:32 -07:00
Michiel van Wessem ada3bdf45d
Fix max redirect count (#20428)
Without this change, RedirectHandler always follows MaxRedirects + 1. If MaxRedirects was initially set to 1, the body of the while statement is executed twice. This defect expresses itself when calling WebApplicationFactory<Startup>.CreateClient() with WebApplicationFactoryClientOptions.MaxAutomaticRedirections >= 1 and .AllowAutoRedirects = true in integration tests.
2020-04-08 09:50:43 -07:00
Alexey Ananyev f9ee790d02
Fix typo in a private method name (#20589)
`ApplicationPartManager` has a private method named `GetAsemblyClosure` containing a typo. It should be named `GetAssemblyClosure`.
2020-04-08 09:48:24 -07:00
github-actions[bot] f05b5c8576
Sync shared code from runtime (#20640)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2020-04-08 13:44:24 +00:00
Hao Kung 9a792f2a27
Reenable framework unit tests on helix (#19975) 2020-04-07 23:39:27 -07:00
Javier Calvarro Nelson f34ef732d2
[Blazor][Wasm] Auth cleanups (#20587)
* Avoid using query parameter when passing messages to the error UI.
* Adds an additional parameter to automatically perform the redirect.
* Fix provisioning additional tokens in MACWA.
* Fix create solution with spaces
* Cleanup Msal startup APIs.
* Rename UserFactory -> AccountClaimsPrincipalFactory
2020-04-06 16:07:17 -07:00
Steve Sanderson 3224092fdd
Update ws-proxy sources to match Mono commit c5149e31b4d7c (#20579) 2020-04-06 22:52:14 +01:00
John Luo 270013880d
Merge pull request #20484 from dotnet/johluo/remove-extensions-deps
Migrate analyzers from dotnet/extensions.
Pin Microsoft.Extensions.DiagnosticAdapter.
2020-04-06 14:48:41 -07:00
Chris Oliver b463e049b6
Move BadHttpRequestException to Http.Abstractions (#20339) 2020-04-06 14:42:16 -07:00
Kahbazi 1f76cce14a
Add overloads to CookieAuthentication to config options with services (#19268)
* Add overloads to CookieAuthentication to config options with services

* Update reference assembly

* Use the new method in sampple

* Add overloads for other authentication providers

* Update ref assemblies

* Change IServiceProvider to TService
2020-04-06 21:23:49 +00:00
John Luo 1cc6171b0a Fix tests 2020-04-06 11:56:22 -07:00
John Luo 6ad0d5849c
Merge branch 'master' into johluo/remove-extensions-deps 2020-04-06 11:17:56 -07:00
Artak c2afc704a6
Enable doc comments generation (#20564)
Co-authored-by: Pranav K <prkrishn@hotmail.com>
2020-04-06 10:41:28 -07:00
Pranav K 351eba767c
Cleanup Blazor standalone publish output (#20470)
* Remove stray content from Blazor's publish output.
* Introduce BlazorPrunePublishOutput as a way for users to opt-out of this.

Fixes https://github.com/dotnet/aspnetcore/issues/17018
2020-04-06 08:50:27 -07:00
Javier Calvarro Nelson 8232c6a4d8
[Fixes #19644][Blazor] Support brotli compression for framework files (#20363)
* [Blazor] Support brotli compression for framework files
* Adds a new tool to the Blazor.Build package to perform brotli compression.
* Performs brotli compression at publish time
* Centralizes hashing computation in one place and creates hash files for
  performing incremental compilations
2020-04-06 08:29:24 -07:00
John Luo 3ec1676ac6
Ingest updated packages from dotnet/runtime (#20300) 2020-04-06 01:06:22 -07:00
Hao Kung cc79bcc67b
Reenable cert tests on helix (#20372) 2020-04-04 13:02:22 -07:00
Javier Calvarro Nelson fd9c786165
[Blazor] More auth fixes (#20192)
* Introduces customization options for mapping user claims principals.
* Supports login/logout flows extensibility.
* Improves E2E test reliability
* Improves reliability on the AuthenticationService
* Improves the experience by trying to silently log-in users on startup.
* Avoids loading the Blazor application when within a hidden iframe.
2020-04-04 04:06:25 -07:00
John Luo 75bdd71ebc
Re-enable project template tests (#20529) 2020-04-03 17:48:15 -07:00
John Luo 59adb88839 Don't reference analyzer in framework projects since there's no code 2020-04-03 17:13:30 -07:00
Ryan Nowak 8e66833886
Merge pull request #20523 from dotnet-maestro-bot/merge/release/5.0-preview3-to-master
[automated] Merge branch 'release/5.0-preview3' => 'master'
2020-04-03 15:53:41 -07:00
Kevin Pilch f4be244fd1
More updates docs (#20513) 2020-04-03 22:09:36 +00:00
Ryan Nowak 27df28fada Skipping a Blazor template test
This test is causing hangs in quarantine. Adding an explicit skip.
2020-04-03 14:46:04 -07:00
John Luo 87c0f3e2cf Migration fixups 2020-04-03 14:41:31 -07:00
Ryan Nowak 2883a47542 Quarantine a hosting test that failed
This test failed overnight on linux. The part that failed was checking the exit code
of `kill` which is a little surprising. This implies that `kill` itself was also
forcibly killed - so we're increasing the timeout before we kill `kill`. 👍
2020-04-03 13:27:03 -07:00
Ryan Nowak 66ae2ba817
Merge branch 'master' into merge/release/5.0-preview3-to-master 2020-04-03 13:13:40 -07:00
Javier Calvarro Nelson 39a24220cf Use pfx file instead of cert from the store 2020-04-03 11:56:22 -07:00
John Luo 8fac70750e
Merge pull request #20421 from dotnet/johluo/migrate-more-extensions-logging
Johluo/migrate more extensions logging
2020-04-03 11:49:22 -07:00
John Luo 5e81b276a7 Use migrated analyzers 2020-04-03 11:46:49 -07:00
John Luo 52d0f31c3f Merge branch 'master' of ..\Extensions\ into johluo/remove-extensions-deps 2020-04-03 11:40:13 -07:00
Ryan Brandenburg cb523d73e2
Remove test that hits HTTP (#20476) 2020-04-03 11:28:27 -07:00
Adam Sitnik 54b4a0ffa2
add micro benchmark for parsing Json TechEmpower request (#20505) 2020-04-03 11:09:17 -07:00
Scott Addie e75ff49869
Preserve new lines and whitespace when adding secret (#19504) 2020-04-03 17:37:46 +00:00
Safia Abdalla e67e7a08ca
Remove WebAssemblyLoggerFactory and refactor logging setup (#20432)
**Changes in this PR**
 - Replaces `WebAssemblyLoggerFactory` with `LoggerFactory` from logging extensions package
 - Moves WebAssemblyConsoleLogger and PrependMessageLogger to provider model

Now that we are using the standard `LoggerFactory` support for config options like `SetMinimumLevel` and `AddProvider` is available.

Compared to what is currently in the `blazor-wasm` branch, the changes in this PR add an additional 12 kb to the total compressed size.

Addresses #19737
2020-04-03 10:22:05 -07:00
Pranav K 41a9588353
Move specifying default Blazor linker config to props file (#20458)
Fixes #20443
2020-04-03 09:04:38 -07:00
Andrew Stanton-Nurse dee14b7eb5
fix #13651 by logging serialization failures as error (#20116) 2020-04-02 23:41:34 -07:00
TeBeCo c01c8dd476
Changing msgpack options (#20031) 2020-04-02 17:41:40 -07:00
Ben Adams f17520c6f0
Start each request on fresh ExecutionContext (#14146) 2020-04-02 17:26:22 -07:00
Pranav K 1b2cb0b93c
Apply suggestions from code review
Co-Authored-By: Steve Sanderson <SteveSandersonMS@users.noreply.github.com>
2020-04-02 15:21:42 -07:00
Pranav K a127eb86da
Fixup 2020-04-02 15:14:48 -07:00
Pranav K 861e88c61b
Fixup tests 2020-04-02 15:14:44 -07:00
Pranav K a7c2d25ffa
Remove constraints on WebAssembly.Build package
Make Blazor-Wasm projects not-packable by default
2020-04-02 15:13:35 -07:00
Pranav K 0c614ff9c7
Fixup 2020-04-02 15:13:34 -07:00
Pranav K a9494214fa
Preserve files being published to the publish root and the wwwroot
Fixes https://github.com/dotnet/aspnetcore/issues/19926
2020-04-02 15:13:33 -07:00
James Newton-King 746ac6bc8f
Fix flaky StreamPool_MultipleStreamsInSequence_PooledStreamReu… (#20434) 2020-04-03 10:10:46 +13:00
James Newton-King b53179267a Merged PR 6773: Fix routing policy exit destination
**Description**

An infinite loop can happen in routing if there is a catch all route with host name matching.

This problem is caused by the DFA matcher builder giving an incorrect exit destination to policies. Currently the exit destination is the catch all state, so the policy will transition to itself when there is no match. It will run again, transition to itself again, run again, etc. This causes the policy to run forever.

What should happen is the host name policy fails, it transitions to the final state with no candidates, and the route matcher does not match any endpoints. The browser is returned a 404 status.

**Customer Impact**

This problem shows up in this situation:
1. If a customer has configured a catch all route in their app
2. The catch all route has host matching
3. A browser makes a request to the server that matches the catch all route but doesn't match the host name

The route matcher will run forever, using up a threadpool thread. When threadpool threads are exhausted the server will stop responding.

**Regression?**

No.

**Risk**

Medium. The fix is simple but route matching is complex, and routing runs with every request.
2020-04-02 20:30:18 +00:00
Ryan Nowak 2c1de1621e Social distancing for tests that are symptomatic
These tests failed in official builds last night.
2020-04-02 12:52:51 -07:00
James Newton-King 53eaa8f106
Fix flaky StreamPool_StreamIsInvalidState_DontReturnedToPool (#20433) 2020-04-03 08:23:13 +13:00
John Luo f4a4346298 Because jkotalik told me to 2020-04-02 11:58:26 -07:00
Ryan Nowak 5f8bb71608
Merge pull request #20456 from dotnet-maestro-bot/merge/release/3.1-to-master
[automated] Merge branch 'release/3.1' => 'master'
2020-04-02 11:18:00 -07:00
Ryan Nowak 7bb31301d2
Merge pull request #20384 from dotnet-maestro-bot/merge/release/5.0-preview3-to-master
[automated] Merge branch 'release/5.0-preview3' => 'master'
2020-04-02 10:55:15 -07:00
William Godbe 39b9c7baf9
Merge pull request #20396 from dotnet-maestro-bot/merge/release/3.1-to-master
[automated] Merge branch 'release/3.1' => 'master'
2020-04-02 09:19:09 -07:00
Steve Sanderson 113cb5422d
Support JsonStringEnumConverter. Fixes #19086 (#20446)
* Fix serializing enums. Fixes #19086

* Add E2E test
2020-04-02 16:09:34 +01:00
Pranav K dd2f0c9d90
Remove the use of toJavaScriptString (#20260)
* Allow readString to optionally read boolean values as string

Fixes https://github.com/dotnet/aspnetcore/issues/19784
2020-04-02 07:51:57 -07:00
John Luo fcb23108b6 Relocate Logging.Testing to AspNetCore.Testing 2020-04-02 00:16:01 -07:00
John Luo 5f6fbed915
Merge branch 'master' into johluo/migrate-more-extensions-logging 2020-04-01 23:35:01 -07:00
Doug Bunting 0518cb5107
Suppress a warning (#20390)
- Suppress a warning

- Clarify a comment
2020-04-01 22:14:41 -07:00
William Godbe 2d6827a678
Always generate checksums as last part of publish job (#20367)
* Always generate checksums as last part of publish job

* Initialize props correctly

* Fix wildcard

* Import Arcade SDK

* Add NoWarn MSB4011

* Make import conditional on GenerateChecksums

* Select specific files to checksum

* Respond to feedback

* AfterTargets -> BeforeTargets
2020-04-01 16:25:37 -07:00
James Newton-King 0e4bcf602c
Add HPack dynamic compression (#20058) 2020-04-02 12:22:20 +13:00
Justin Kotalik b8743fc454 merging 2020-04-01 16:05:38 -07:00
Justin Kotalik 8460de4033 Merging 2020-04-01 16:04:02 -07:00
Steve Sanderson ae569e2b48
Add some extra publish integration tests, plus fix publish-from-VS-with-RID (#20410)
* Add detailed integration tests for publishing service workers, assets manifests, and blazor.boot.json
* Fix publishing from VS with non-portable RID
2020-04-01 13:35:30 -07:00
James Newton-King f1145fb6d7
Fix flaky ClientStreaming_ResponseCompletesWithoutResponseBody… (#20338) 2020-04-02 09:02:09 +13:00
Ryan Brandenburg 7d450bba80
OpenAPI Flaky fix (#20383)
Don't use network in tests unless we have to
2020-04-01 12:52:33 -07:00
Justin Kotalik bc140e8722
Unskip IIS Tests (#20417) 2020-04-01 12:26:02 -07:00
John Luo 4294861945 Migration cleanup 2020-04-01 12:02:53 -07:00
John Luo 5c6c7813a8 Merge branch 'master' of ..\Extensions\ 2020-04-01 11:19:24 -07:00
John Luo 71327c03ca
Try synchronizing dispose and output (#20341) 2020-04-01 10:03:30 -07:00
Justin Kotalik 85b1a73f65
Update BlazorServerTemplateTest.cs (#20377) 2020-04-01 09:56:14 -07:00
Markus Rodler a8bd551d99
Set crossorigin to anonymous for integrity attribute (#20348)
* Set crossorigin to anonymous for integrity attribute
dotnet/aspnetcore#20305

* Fix formatting of output
dotnet/aspnetcore#20305
2020-04-01 09:53:46 -07:00
Brennan ca5cd91d68
Replace RunTests scripts with .NET app (#20337) 2020-04-01 09:01:34 -07:00
Andrew Stanton-Nurse 3f683916bc
unquarantine negotiate tests (#20378)
these were quarantined because of the runtime JIT bug that caused DI failures, they can come out of the box now that the runtime issue is fixed
2020-03-31 23:56:45 +00:00
Justin Kotalik 14032eae01
Quarantine identity test (#20373)
https://dev.azure.com/dnceng/public/_build/results?buildId=580722&view=ms.vss-test-web.build-test-results-tab&runId=18259416&resultId=108224&paneView=debug
2020-03-31 16:40:00 -07:00
Brennan 4cc328aff4
Pass CancellationToken to WaitAsync in client (#20210) 2020-03-31 15:36:24 -07:00
James Newton-King 2f04721ff8
Fix flaky FlowControl_ParallelStreams_FirstInFirstOutOrder (#20342) 2020-04-01 11:08:27 +13:00
Justin Kotalik 1b3e8e1117
Quarantine GracefulTurnsAbortiveIfRequestsDoNotFinish (#20375)
https://dev.azure.com/dnceng/public/_build/results?buildId=581206&view=ms.vss-test-web.build-test-results-tab&runId=18274506&paneView=debug&resultId=119581
2020-03-31 14:46:17 -07:00
Justin Kotalik fa4600f5fa
Skip stream pool test (#20371) 2020-03-31 14:44:20 -07:00
Kevin Pilch f34033a415 Add .vsconfig files in root and beside slns 2020-03-31 14:25:44 -07:00
Brennan 58db57be4c
Plumb a clock interface through SignalR for testing (#19311) 2020-03-31 13:52:10 -07:00
Miroslav Jezik d1d9b97f77 Add tags to HealthReportEntry if an exception occurs 2020-03-31 12:37:40 -07:00
Hao Kung 15d5ffebca
Reeanble dataprotection test (#20319) 2020-03-31 11:36:50 -07:00
William Godbe 24619b8594
Merge pull request #20250 from dotnet-maestro-bot/merge/release/3.1-to-master
[automated] Merge branch 'release/3.1' => 'master'
2020-03-31 11:33:48 -07:00
Ryan Brandenburg 36c2448bd3 Serialize project state from VS to project.razor.json (dotnet/aspnetcore-tooling#1711)
Serialize project state to project.razor.json\n\nCommit migrated from fef50ba623
2020-03-31 11:07:08 -07:00