Commit Graph

20286 Commits

Author SHA1 Message Date
Brennan f1dd68f1bd
[Middleware] Move to GenericHost (#23626) 2020-07-07 17:32:35 -07:00
Pranav K 93634cd772
Follow ups for nullable (#23736)
* Follow ups for nullable

* Update src/Http/Routing/src/Matching/DfaMatcherBuilder.cs

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

Co-authored-by: James Newton-King <james@newtonking.com>
2020-07-07 21:46:50 +00:00
Hao Kung 380a5679bb
Remove bootstrap v3 (#23547) 2020-07-07 11:40:30 -07:00
Steve Sanderson 0ec15ea01d CR: Add ctor overload accepting IComponentActivator 2020-07-07 19:27:21 +01:00
Steve Sanderson 9e365f4356 CR: Make DefaultComponentActivator internal 2020-07-07 19:27:21 +01:00
Steve Sanderson 53588b45dc Updates to IComponentActivator PR 2020-07-07 19:27:21 +01:00
Mladen Macanović dae55edfec Add IComponentActivator 2020-07-07 19:27:21 +01:00
Javier Calvarro Nelson 156023d3f9
[HTTPS] Support exporting the dev-cert in PEM format and support importing an existing dev-cert in PFX (#23567)
* Support exporting the certificate key into PEM format
* Support importing an existing https dev certificate into the certificate store
2020-07-07 08:26:08 -07:00
Martin Costello 54bd692c78
Use TryGetValue() in TokenExtensions (#23708) 2020-07-06 22:27:59 -07:00
Pranav K 8750cd1038
Nullable followup for Routing (#23474)
* Nullable followup for routing.

* Update nullability based on usage
* Use nullable enable in a few files

* More nullable
2020-07-07 03:24:20 +00:00
Martin Costello fd1f1c3559
Use preferred overloads of string.Split() (#23712)
* Use preferred overloads of string.Split

* Revert TrimEntries for netstandard2.0

Revert usage of StringSplit.TrimEntries for projects that target netstandard2.0.

Co-authored-by: Levi Broderick <levib@microsoft.com>
2020-07-06 16:49:38 -07:00
msftbot[bot] a738d1ccfb
Merge pull request #23717 from dotnet-maestro-bot/merge/release/5.0-preview7-to-master
[automated] Merge branch 'release/5.0-preview7' => 'master'
2020-07-06 23:41:07 +00:00
Tanay Parikh 1c2a0f4fe6
Add Razor TagHelper Parsing Benchmarks (#23627)
* Add Razor TagHelper Parsing Benchmarks

Benchmarks:
|                                  Method |        Mean |     Error |    StdDev |     Op/s | Allocated |
|---------------------------------------- |------------:|----------:|----------:|---------:|----------:|
|      'TagHelper Design Time Processing' | 2,331.51 us | 28.916 us | 27.048 us |    428.9 | 985.33 KB |
| 'TagHelper Component Directive Parsing' |    90.46 us |  0.472 us |  0.394 us | 11,055.1 |   3.01 KB |

Notes / Attributions:
- `BlazorServerTagHelpers` is just a demo file concatonated from the basic `BlazorServer` files
- `taghelpers.json` was updated from: 73c96f1c00/src/Razor/benchmarks/Microsoft.AspNetCore.Razor.Performance/taghelpers.json
- `ReadTagHelpers` was copied over from fef50ba623/src/Razor/benchmarks/Microsoft.AspNetCore.Razor.Performance/ProjectSystem/ProjectSnapshotManagerBenchmarkBase.cs (L83-L93)

Fixes: https://github.com/dotnet/aspnetcore/issues/23454
2020-07-06 16:32:12 -07:00
Ajay Bhargav B 7412976b4c
Update Roslyn package versions (#23630)
* Update Roslyn package versions

* Fixes

* Fix analyzer warnings

* Fix root cause for analyzer warnings

* Fixed RuntimeCompilation test

* Add back nowarns
2020-07-06 14:35:10 -07:00
N. Taylor Mullen 17b01ae667 Fix PoliCheck issues
Fixes https://dev.azure.com/devdiv/DevDiv/_workitems/edit/1151846
Fixes https://dev.azure.com/devdiv/DevDiv/_workitems/edit/1151847
2020-07-06 13:02:45 -07:00
Kahbazi 5a375a7c22
Add Extensions method for options (#23602) 2020-07-06 11:54:44 -07:00
Martin Costello bbb695fe16
Minor code refactoring to TestHost library (#23692)
* Make fields readonly

Make a number of fields that aren't changed readonly.

* Use range to trim string

Use a range to trim the last character of the paths.

* Use nameof()

Use nameof() for exceptions rather than literals.

* Use Task.CompletedTask

Use Task.CompletedTask instead of Task.FromResult().

* Use Array.Empty()

Use Array.Empty() instead of allocating an empty array.

* Remove unused parameter

Remove unused CancellationToken parameter.

* Fix compilation error

Fix compilation error.

* Apply suggestions from code review

Add comment explaining range syntax.
2020-07-06 11:52:53 -07:00
Stephen Halter 0bc8ad7e6e
Change HttpRequest/ResponseJsonExtensions namespace (#23496) 2020-07-06 11:28:57 -07:00
Martin Costello a97746b72b
Remove used-once field (#23693)
Remove a field that's only used in one place, and just pass the char directly to string.Join() on use.
2020-07-06 10:32:15 -07:00
Pranav K 4b796c7bad
Quarantine components tests (#23644) 2020-07-06 10:30:10 -07:00
Brennan f6bc908a32
Write default values by default in Json (#23542) 2020-07-06 10:08:55 -07:00
Stephen Halter a57a80fcfb
Fix ContentLengthReadAsyncSingleBytesAtATime (#23641) 2020-07-06 09:48:07 -07:00
Martin Costello afbf3fdf6a
Remove unused code (#23691)
Remove an unused private method and an unused local variable.
2020-07-06 08:51:25 -07:00
Pranav K 80de1e7588
Quarantine test (#23636) 2020-07-06 15:49:33 +00:00
Javier Calvarro Nelson 9d3bf572b3
[HTTPS] Adds PEM support for Kestrel (#23584)
* Adds support for loading PEM certificates and keys in Kestrel.
* You can load PEM Certificate + PKCS8 encoded PEM Keys.
* Certificates in DER format + PKCS8 encoded PEM Keys.
* Supported key types are:
  * RSA
  * ECSA
  * DSA
2020-07-06 06:48:46 -07:00
Pranav K de034feb98
Merge branch 'master' into merge/release/5.0-preview7-to-master 2020-07-05 20:54:56 -07:00
Martin Costello 4b3fcaf769
Use new string.Split() overloads (#23683) 2020-07-05 13:16:15 -07:00
Martin Costello 3d5c8ed114
Use Array.Empty in WebEncoders (#23677) 2020-07-05 13:11:36 -07:00
Chris Ross df5269fea2
React to regression in Http.Sys (#23590)
* React to regression in Http.Sys #23164

* Add granular version check
2020-07-04 17:12:19 +00:00
Pranav K 499a3bcdc1
Add support for gzip compression during build and publish (#23611)
* Add support for gzip compression during build and publish

3.2 shipped with gzip compression during build and publish. During the port to 5.0, the build and publish
pipeline was different and ended up only during brotli compression during publish. However, during build
the app size is now up to 20MB. Statically compressing runtime assets during build reduces the payload size
to about 8.5 MB. This should help with faster initial boot ups and perception.

* Quarantine test

* More quarantine
2020-07-03 17:20:17 -07:00
Pranav K 1ed72f8f5f
Merge pull request #23631 from dotnet/prkrishn/merge-p7
Merge branch 'release/5.0-preview7' => 'master'
2020-07-03 15:03:38 -07:00
Pranav K 035ab19f31
Update PlatformInfo.cs (#23647)
* Update PlatformInfo.cs
* Simplify ComponentsProfiling initialization
2020-07-03 07:40:17 -07:00
Chris Ross 8182bb16a9
Disable cookie name encoding/decoding. (#23579) 2020-07-02 16:20:55 -07:00
Pranav K c67ecd2cf0
Quarantine test 2020-07-02 15:26:28 -07:00
Brennan aedcfbd5c0
Update RequestTests.cs (#23629) 2020-07-02 20:23:40 +00:00
Mackinnon Buck a729c4230e
InputRadio component with form support (#23415)
* Started on InputRadio forms component.

* Added E2E test for InputRadio.

* Added docstring for InputRadio.

* Changed value to be serialized using BindConverter.

* Added InputChoice for choice-based inputs.

InputChoice contains checks for valid choice types that used to exist in InputSelect. Both InputSelect and InputRadio now derive from InputChoice and thus also contain those checks.

* Added InputRadioGroup.

* Small fix.

* Removed InputChoice, cleaned up.

* Added internal access modifier to InputExtensions.

* Small improvements.

* Updated an outdated exception message.

* Updated test to reflect updated exception message.

* Improved API to enforce InputRadioGroup.

* Added support for InputSelect int and Guid bindings.

* Changed validation CSS classes to influence InputRadio components.
2020-07-02 11:48:34 -07:00
Pranav K 9a4e6cf97c
Merge remote-tracking branch 'origin/release/5.0-preview7' 2020-07-02 11:42:14 -07:00
Pranav K b7d9e8cfea
FIxup2 (#23618) 2020-07-02 17:29:26 +00:00
Pranav K dcd32c0d14
Quarantine tests (#23598)
* Quarantine tests

* Quarantine shutdowntest
2020-07-02 16:22:56 +00:00
Phillip Carter a722c4cd7a
Add F# worker service template (#22042) 2020-07-01 22:51:45 +00:00
Steve Sanderson 2cbc7a44cf
Use hasOwnProperty in a more robust way in JS interop. Fixes #23448 (#23573)
* Use hasOwnProperty in a more robust way in JS interop. Fixes #23448

* Update JS
2020-07-01 22:59:34 +01:00
James Newton-King 01de355289
Don't set StatusCode in WriteAsJsonAsync (#23583) 2020-07-02 09:48:05 +12:00
dotnet-maestro[bot] a4dd539b40
[master] Update dependencies from dotnet/runtime (#23563)
* Update dependencies from https://github.com/dotnet/runtime build 20200630.14

System.ComponentModel.Annotations , System.Diagnostics.DiagnosticSource , System.Diagnostics.EventLog , Microsoft.Extensions.Logging , Microsoft.Extensions.Logging.Abstractions , Microsoft.Extensions.Logging.Configuration , Microsoft.Extensions.Logging.Console , Microsoft.Extensions.Logging.Debug , Microsoft.Extensions.Logging.EventLog , Microsoft.Extensions.Logging.EventSource , Microsoft.Extensions.Logging.TraceSource , Microsoft.Extensions.Options , Microsoft.Extensions.Options.ConfigurationExtensions , Microsoft.Extensions.Internal.Transport , Microsoft.Extensions.Options.DataAnnotations , Microsoft.Extensions.Primitives , Microsoft.Extensions.Http , Microsoft.Extensions.Hosting , Microsoft.Extensions.Caching.Abstractions , Microsoft.Extensions.Caching.Memory , Microsoft.Extensions.Configuration , Microsoft.Extensions.Configuration.Abstractions , Microsoft.Extensions.Configuration.Binder , Microsoft.Extensions.Configuration.CommandLine , Microsoft.Extensions.Configuration.EnvironmentVariables , Microsoft.Extensions.Configuration.FileExtensions , Microsoft.Extensions.Hosting.Abstractions , Microsoft.Extensions.Configuration.Ini , Microsoft.Extensions.Configuration.UserSecrets , Microsoft.Extensions.Configuration.Xml , Microsoft.Extensions.DependencyInjection , Microsoft.Extensions.DependencyInjection.Abstractions , Microsoft.Extensions.DependencyModel , Microsoft.Extensions.FileProviders.Abstractions , Microsoft.Extensions.FileProviders.Composite , Microsoft.Extensions.FileProviders.Physical , Microsoft.Extensions.FileSystemGlobbing , Microsoft.Extensions.HostFactoryResolver.Sources , Microsoft.Extensions.Configuration.Json , Microsoft.NETCore.App.Runtime.win-x64 , Microsoft.NETCore.Platforms , Microsoft.Win32.Registry , Microsoft.Win32.SystemEvents , Microsoft.NETCore.App.Internal , Microsoft.NETCore.App.Ref , System.Drawing.Common , System.Security.Principal.Windows , System.ServiceProcess.ServiceController , System.Text.Encodings.Web , System.Text.Json , System.Threading.Channels , System.Windows.Extensions , System.Security.Permissions , System.Security.Cryptography.Xml , System.Security.Cryptography.Pkcs , System.IO.Pipelines , System.Net.Http.Json , System.Net.Http.WinHttpHandler , System.Net.WebSockets.WebSocketProtocol , System.Reflection.Metadata , System.Runtime.CompilerServices.Unsafe , System.Security.Cryptography.Cng
 From Version 5.0.0-preview.8.20328.6 -> To Version 5.0.0-preview.8.20330.14

* React to obsoletion

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
Co-authored-by: Pranav K <prkrishn@hotmail.com>
2020-07-01 15:57:26 +00:00
Pranav K dc4670e8d5
Merge pull request #23427 from dotnet-maestro-bot/merge/release/5.0-preview7-to-master
[automated] Merge branch 'release/5.0-preview7' => 'master'
2020-07-01 07:27:53 -07:00
Steve Sanderson 3cbe02f2fc
Blazor WebAssembly internal profiling infrastructure (#23510) 2020-07-01 11:28:13 +01:00
Tibor Tóth 1688b5a30b
ClientCollection builder methods returns with client (#13437) 2020-07-01 00:00:26 -07:00
Pranav K 8768cab874
Use linker extensibility to enable better trimming (#23512)
* Use linker extensibility to enable better trimming

* Configure TrimmerDefaults=link if unspecified
* Allow Microsoft.AspNetCore.* and Microsoft.Extensions.* packages to be trimmed.

* Make producing the trimmer root descriptor more incremental
2020-06-30 20:39:58 -07:00
Hans Bakker 5db89514e8
Allow extensibility of DefaultAuthorizationService (#23143)
* Allow extensibility of DefaultAuthorizationService

When only a small behavior change of the `DefaultAuthorizationService` is wanted, it would be nice if you could override its methods and building upon them rather than having a copy-paste of the class in your codebase.

Inside the `override` methods in your inherited class you could call the `base` method to reuse parts of its logic.

Please refer to https://github.com/dotnet/aspnetcore/issues/23094 for the usecase.

* updated ref assembly
2020-06-30 17:06:00 -07:00
Chris Ross c78a4dd63f
Quarantine ServerReset_BeforeRequestBody_ClientBodyThrows (#23541) 2020-06-30 23:33:42 +00:00
Filip Staffa e1d4728d90
Fix HeaderSegmentCollection failing when header value has a trailing space (#23159)
Co-authored-by: Filip Staffa <git@filipstaffa.net>
2020-06-30 15:05:54 -07:00
Pranav K 71e388eab7
Unquaratine blazor template tests (#23521)
* Ensure BlazorWebAssembly.js is present

* Unquaratine blazor template tests

* The failure issue https://github.com/dotnet/aspnetcore/issues/20479 was resolved, but the assembly level quarantine was
missed being removed.
* Use shorter project file names to avoid long path issues.
* Update blazorwasm template tests to react to net5 updates

* Update src/ProjectTemplates/Shared/ProjectFactoryFixture.cs
2020-06-30 21:58:54 +00:00
John Luo c4eaad5df5
Fix TLS test (#23489) 2020-06-30 14:46:21 -07:00
Kahbazi 71fef28e47
Remove user id from logs in order to comply GDPR (#17491) 2020-06-30 13:27:53 -07:00
Ajay Bhargav B 7f4b846e9f
Made the encodings of .razor and .cshtml files in the repo consistent (#23502)
* Added UTF8 BOMs to .razor and .cshtml files

* Fixes and unquarantined BOM tests

* Update .editorconfig
2020-06-30 12:03:01 -07:00
Pranav K 3fe6b07412
Ensure BlazorWebAssembly.js is present (#23518) 2020-06-30 11:38:20 -07:00
kapsiR 408b1ac443
Add autocomplete attributes to Identity UI (#14953)
* Add autocomplete attributes to Identity UI V3

* Add autocomplete attributes to Identity UI V4
2020-06-30 09:21:33 -07:00
Steve Sanderson eb76931578
Strip insignificant whitespace at compile time (#23385)
* Define @preservewhitespace directive attribute

* Have ComponentWhitespacePass respect preservewhitespace option

* Tests for overriding the preservewhitespace option (and fix implementation)

* Begin adding test infrastucture for ComponentWhitespacePass

* Remove leading/trailing whitespace from markup elements recursively

* Update baselines

* Add test showing we don't remove whitespace between sibling elements

* Remove whitespace before/after C# code statements (not expressions)

* Update baselines

* Slight improvements to test

* Remove leading/trailing whitespace inside component child content

* Update baselines

* Fix Razor tests

* Fix MVC test

* Better fix for MVC test

* CR: Make ComponentPreserveWhitespaceDirective conditional on langversion >= 5.0
2020-06-30 07:49:28 -07:00
Pranav K 4a93863b8d
Fix the blazorwasm benchmark app (#23498)
Specifying the RID and PublishDir when publishing the driver app causes all sorts of
build issues. This change moves specifying the RID in to the driver app and ensures PublishDir
does not flow to the referenced RazorSDK project.

* Fix docker build
* Update readme typos
2020-06-30 06:31:41 -07:00
Pranav K 7da6931209
Revert "Undo use of pipewriter in FileBufferingWriteStream (#21833)" (#23391)
This reverts commit 48261fdada.
2020-06-30 06:22:33 -07:00
Martin Costello acabbbc61b
Remove QueuePolicy locks (#23187)
* Use field rather than property

Operate on a field directly, rather than through a property.

* Make field readonly

Make field read-only as its value is never changed.

* Remove lock

Use Interlocked.Decrement() instead of taking a lock.

* Remove lock for increment

This removes the need for the lock in the success case at the cost of an extra  Interlocked.Decrement() call for the failed case.

* Fix typos

Change "availible" to "available".

* Add unit test for full queue

Add a unit test that validates request is not queued if the queue is already full.
2020-06-30 05:11:58 +00:00
Hao Kung 1c27ba1bbd
Add compat switch to opt out of breaking change in AuthZ (#23324) 2020-06-29 21:50:27 -07:00
Kevin Pilch 197f156fcd
Obsolete the Libuv transport (#23480) 2020-06-29 19:36:14 -07:00
Pranav K b93db41b5e
Merge branch 'master' into merge/release/5.0-preview7-to-master 2020-06-29 13:29:53 -07:00
Chris Ross e906c2067b
Quarantine Publish_HostedApp_WithSatelliteAssemblies (#23479) 2020-06-29 19:34:09 +00:00
Pranav K 126f14dbd2
Component package updates (#23371)
* Stop cross-compiling Component packages
* Remove Microsoft.JSInterop reference from M.A.Components
* Update RCL template

Fixes https://github.com/dotnet/aspnetcore/issues/23124
Fixes https://github.com/dotnet/aspnetcore/issues/23351
2020-06-29 11:36:59 -07:00
Justin Kotalik b724aa62bf
Update HttpsTests.cs (#23406) 2020-06-29 05:46:25 +00:00
pagan-gerbil cc3d47f550
Fixing a type (hubConnetion -> hubConnection) (#23440) 2020-06-28 03:38:42 +00:00
github-actions[bot] 5a22c49ff3
Sync shared code from runtime (#23430)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2020-06-27 08:09:39 -07:00
Brennan 646de19f1d
Update HubProtocol.md (#23389) 2020-06-26 21:33:29 -07:00
Stephen Halter b446ab7c6f
Add custom request header decoder API to Kestrel (#23233) 2020-06-26 19:49:35 -07:00
Pranav K 04ecd5539f
Merge pull request #23365 from dotnet-maestro-bot/merge/release/5.0-preview7-to-master
[automated] Merge branch 'release/5.0-preview7' => 'master'
2020-06-26 18:36:03 -07:00
Justin Kotalik 73555970ee
Quarantine dotnet-watch test (#23395)
* Quarantine dotnet-watch test

* Update ProgramTests.cs
2020-06-27 01:16:29 +00:00
Pranav K 23a3e845e5
Add RazorLangVersion 5.0 (#23408)
* Add RazorLangVersion 5.0

* Fixup more tests. Add a test for 3.1
2020-06-26 17:49:29 -07:00
Brennan e4158e8a59
Quarantine Publish_HostedApp_VisualStudio_WithSatelliteAssemblies and Publish_UpdatesFilesWhenSourcesChange (#23398)
* Update WasmPublishIntegrationTest.cs

* Update WasmCompressionTests.cs
2020-06-26 22:42:48 +00:00
Pranav K 8e8f0b447b
Merge branch 'master' into merge/release/5.0-preview7-to-master 2020-06-26 13:07:19 -07:00
Chris Ross eeaa85b8d0
Do not cache 304 responses (#23367)
* Do not cache 304 responses #23345

* More guids
2020-06-26 18:28:27 +00:00
Mackinnon Buck 36c6c2c2a6
ElementReference FocusAsync API (#23316)
* Added working focus extension method.

* Added return value documentation for FocusAsync().

* Removed IJSRuntime argument from FocusAsync().

* Removed ElementReference.JSRuntime in favor of IServiceProvider.

* Updated Web.JS release binaries.

* Implemented ElementReferenceContext.

* Made ElementReferenceContext a non-abstract property in Renderer.

* Made ElementReference.Context explicitly nullable.

* Removed useless IServiceProvider dependency in RemoteJSRuntime.

* Updated Microsoft.AspNetCore.Components reference assemblies.

* Improved documentation and limited public API.
2020-06-26 09:19:50 -07:00
Pranav K 65d9429a7d
Add workaround for https://github.com/mono/linker/issues/1298 (#23368) 2020-06-26 08:54:38 -07:00
Eric Erhardt 4891eadbbc
Remove the file extension in CreateBlazorTrimmerRootDescriptorFile (#23330)
The linker doesn't resolve assemblies correctly if the file extension (.dll) is included in the assembly name in the descriptor xml file.

See also https://github.com/mono/linker/issues/1294
2020-06-26 08:34:03 -07:00
John Luo ef1e47d7db
Fix unquarantined test (#23356)
This test was unquarantined but needed a fix to pass on Win7
2020-06-26 07:18:30 +00:00
Justin Kotalik 4ee3644166
Skip dotnet watch tests on arm (#23361) 2020-06-25 20:24:34 -07:00
Justin Kotalik d8a7cedff8
Quarantining blazor tests (#23364) 2020-06-25 18:11:30 -07:00
Pranav K 1f56e82732
Annotate Components.Forms \ Components.Web \ Component.Server with nullable attributes (#23204) (#23355)
* Annotate Components.Forms \ Components.Web with nullable attributes
Contributes to https://github.com/dotnet/aspnetcore/issues/5680

* Fixup

* Fixup rebase

* Undo nullable

* Fixup
2020-06-25 14:32:43 -07:00
Hao Kung be0b9e48b5
Update System.IdentityModel.Tokens.Jwt to 6.6 (#22846)
* Update System.IdentityModel.Tokens.Jwt to 6.6

* Update Versions.props

* Add newtonsoft refs

* Update OIDC instructions

* Fixup JwtBearerSample TFM

Co-authored-by: John Luo <johluo@microsoft.com>
2020-06-25 14:25:59 -07:00
Stephen Halter 71af57fdc0
Remove ConcurrentDictionary in HandshakeProtocol (#23315) 2020-06-25 12:31:38 -07:00
Justin Kotalik 10baccefb4
Merge pull request #23321 from dotnet-maestro-bot/merge/release/5.0-preview7-to-master
[automated] Merge branch 'release/5.0-preview7' => 'master'
2020-06-25 10:41:33 -07:00
Pranav K c42d1a3858
Annotate Components.Forms \ Components.Web \ Component.Server with nullable attributes (#23204)
* Annotate Components.Forms \ Components.Web with nullable attributes
Contributes to https://github.com/dotnet/aspnetcore/issues/5680

* Fixup

* Fixup rebase

* Undo nullable

* Fixup
2020-06-25 17:36:24 +00:00
Pranav K a93ff60904
SDK fixes (#23317)
* Fix up Blazor ILLink Descriptor files

1. Add the typegranularity file to TrimmerRootDescriptor.
2. Remove the application assembly descriptor file, since the application assembly is passed in as a RootAssembly already.

* Razor SDK fixups for blazor

* Only include dlls when generating type granular assemblies
* Write server-worker to the obj directory

Co-authored-by: Eric Erhardt <eric.erhardt@microsoft.com>
2020-06-25 08:52:53 -07:00
Pranav K 55b5f959ce
Move RenderRegistryTest (#23327) 2020-06-25 14:23:01 +00:00
Steve Sanderson 1998a06bdc
Blazor grid performance scenarios (#23301)
* Add complex table benchmark

* Add FastGrid scenario too

* Make the two grids consistent with each other

* Add scenario for PlainTable

* Empty commit to trigger re-rerun on CI. Clicking retry doesn't seem to be working.
2020-06-25 09:32:09 +01:00
Brennan 38f9b9abdb
[SignalR] Fix new flaky test (#23326) 2020-06-24 17:53:30 -07:00
Pranav K ac291877c7
Remove WebAssemblyHttpHandler ref-assembly package (#23245)
* Remove WebAssemblyHttpHandler ref-assembly package

Fixes https://github.com/dotnet/aspnetcore/issues/22283

* Fixup
2020-06-24 23:58:18 +00:00
Martin Costello c19f3d29ca
Only look-up Cache-Control once (#23329)
Only look-up the Cache-Control header once, rather than twice if non-empty.
2020-06-24 22:48:36 +00:00
William Godbe cd9da1c350
Fixup kestrel config tests after feedback (#23308) 2020-06-24 12:59:33 -07:00
Brennan dad1ca68d7
Make RequestServices work for cloned longpolling HttpContext (#23014) 2020-06-24 12:29:11 -07:00
Safia Abdalla 4465a8efc8
Disconnect circuit on `beforeunload` event (#23224) 2020-06-24 11:35:28 -07:00
Martin Costello 5155e11120
Two minor perf tweaks in CORS and Localization middleware (#23190)
* Use char instead of char[] for string.Split

Use the newer overload for string.Split() that accepts a char instead of creating a char array.

* Remove redundant bounds check

Remove redundant bounds check for count of exactly 1 as that has already been checked to be true by the previous check.
2020-06-24 07:17:33 -07:00
William Godbe e34469482c
Make Kestrel config case-insensitive for certificates (#23268)
* Make Kestrel config case-insensitive for certificates

* Move tests to ConfigurationReaderTests
2020-06-24 06:40:38 +00:00
Brennan cc15b1bb43
[SignalR] Implement IConnectionLifetimeFeature (#20604) 2020-06-23 22:14:12 -07:00
Pranav K 30472b113e
Merge branch 'master' into merge/release/5.0-preview7-to-master 2020-06-23 20:38:38 -07:00
Pranav K f6a6e4bd07
Replat blazor on net5 (#23078)
* Replat blazor on net5

* Make all e2e tests pass

* Fixup

* Update js files

* Fixups

* Fixup

* Fixup

* Skip globalization tests

* Undo workarounds

* PR feedback

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

System.ComponentModel.Annotations , System.Diagnostics.DiagnosticSource , System.Diagnostics.EventLog , Microsoft.Extensions.Logging.Configuration , Microsoft.Extensions.Logging.Console , Microsoft.Extensions.Logging.Debug , Microsoft.Extensions.Logging.EventLog , Microsoft.Extensions.Logging.EventSource , Microsoft.Extensions.Logging.TraceSource , Microsoft.Extensions.Options , Microsoft.Extensions.Options.ConfigurationExtensions , Microsoft.Extensions.Options.DataAnnotations , Microsoft.Extensions.Primitives , Microsoft.Extensions.Logging.Abstractions , Microsoft.Extensions.Logging , Microsoft.Extensions.Internal.Transport , Microsoft.Extensions.Http , Microsoft.Extensions.Caching.Abstractions , Microsoft.Extensions.Caching.Memory , Microsoft.Extensions.Configuration , Microsoft.Extensions.Configuration.Abstractions , Microsoft.Extensions.Configuration.Binder , Microsoft.Extensions.Configuration.CommandLine , Microsoft.Extensions.Configuration.EnvironmentVariables , Microsoft.Extensions.Configuration.FileExtensions , Microsoft.Extensions.Configuration.Ini , Microsoft.Extensions.Configuration.Json , Microsoft.Extensions.Configuration.UserSecrets , Microsoft.Extensions.DependencyInjection , Microsoft.Extensions.DependencyInjection.Abstractions , Microsoft.Extensions.DependencyModel , Microsoft.Extensions.FileProviders.Abstractions , Microsoft.Extensions.FileProviders.Composite , Microsoft.Extensions.FileProviders.Physical , Microsoft.Extensions.FileSystemGlobbing , Microsoft.Extensions.HostFactoryResolver.Sources , Microsoft.Extensions.Hosting , Microsoft.Extensions.Hosting.Abstractions , Microsoft.Extensions.Configuration.Xml , Microsoft.NETCore.App.Runtime.win-x64 , Microsoft.NETCore.Platforms , Microsoft.Win32.Registry , Microsoft.Win32.SystemEvents , Microsoft.NETCore.App.Internal , Microsoft.NETCore.App.Ref , System.Drawing.Common , System.ServiceProcess.ServiceController , System.Text.Encodings.Web , System.Text.Json , System.Threading.Channels , System.Windows.Extensions , System.Security.Principal.Windows , System.Security.Permissions , System.Security.Cryptography.Xml , System.IO.Pipelines , System.Net.Http.Json , System.Net.Http.WinHttpHandler , System.Net.WebSockets.WebSocketProtocol , System.Reflection.Metadata , System.Runtime.CompilerServices.Unsafe , System.Security.Cryptography.Cng , System.Security.Cryptography.Pkcs
 From Version 5.0.0-preview.7.20321.2 -> To Version 5.0.0-preview.7.20322.6

* Update js file

* Fix version

* Fixup

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
2020-06-23 18:19:55 -07:00
Stephan Troyer 7aa91ffd62
SpaProxy: Fix proxying of WebSocket protocol (#23250) 2020-06-23 16:20:00 -07:00
Pranav K f5709b4080
Add nullable annotations to Microsoft.AspNetCore.Mvc.Abstractions (#22993)
* Add nullable annotations to Microsoft.AspNetCore.Mvc.Abstractions
Contributes to https://github.com/dotnet/aspnetcore/issues/5680

* Changes per PR comments

* Changes per PR comments

* Fixup
2020-06-23 22:56:25 +00:00
Brennan a1c226e4f3
[SignalR] Move to generic host (#22602) 2020-06-23 10:46:03 -07:00
Pranav K baf7e6c4d6
Add support for optional FromBody parameters (#22634) (#23246)
* Add support for optional FromBody parameters (#22634)

* Add support for optional FromBody parameters

Fixes https://github.com/dotnet/aspnetcore/issues/6878

* Fixup nullable

* Changes per API review

* Fixup doc comment (#23229)
2020-06-23 08:06:14 -07:00
Brennan 6a4d79cfb8
Fix java pack on local builds (#23237) 2020-06-22 20:21:13 -07:00
Tanay Parikh 26cc3b43a2
Unquarantine Tests (#23098)
Found a bunch of tests running for 30+ days with 100% pass rate.
2020-06-22 17:54:52 -07:00
Ivan Zub 93e9e1f9e1
Fix urls of @microsoft/dotnet-js-interop package (#23239) 2020-06-22 16:42:21 -07:00
Filip Staffa 94941438d3
Add TagBuilder copy constructor (#10955) (#22729)
Co-authored-by: Filip Staffa <git@filipstaffa.net>
2020-06-22 15:43:25 -07:00
Pranav K 827751ffe1
Fixup doc comment (#23229) 2020-06-22 15:39:39 -07:00
James Newton-King ce80965454
HPackDecoder performance (#23083) 2020-06-23 09:20:06 +12:00
ccvca efeb8508dc
Fix: 'https://' is also supported as scheme. (#23194) 2020-06-22 13:26:30 -07:00
Pranav K f7d2fac8a2
Add support for optional FromBody parameters (#22634)
* Add support for optional FromBody parameters

Fixes https://github.com/dotnet/aspnetcore/issues/6878

* Fixup nullable

* Changes per API review
2020-06-22 19:11:55 +00:00
Sourabh Shirhatti c97a0020d8
Use implicit logging scope for Activity (#22376)
* Revert "Hoist activity fields to the logging scope (#11211)"

This reverts commit f7a2d3c26c.

* Remove tests with Activity

* Remove ActivityId from HostingLogScope

* Enable propogation in CreateDefaultBuilder

* Clean up

* s/logging/loggingBuilder

* Enable Activity propogation for generichost

* Replace with runtime/pull/37892
2020-06-22 10:12:22 -07:00
Steve Sanderson 36be16b640
Fix binding <select> to a null value (#23221) 2020-06-22 17:27:02 +01:00
Artak adbedd2cfb
Render aria-invalid if the state is invalid (#23131)
* Render aria-invalid if the state is invalid

Co-authored-by: Pranav K <prkrishn@hotmail.com>
2020-06-21 21:43:29 -07:00
Hao Kung 8541bf6c98
Flow endpoint and httpcontext always from authz middleware (#22672) 2020-06-19 18:14:47 -07:00
Chris Ross 4d7a79ad64
Change HttpSys default client cert mode to Allow Cert #14840 (#23162) 2020-06-19 16:34:56 -07:00
Pranav K 724c2e75a7
Add nullable annotations to Microsoft.AspNetCore.Components (#22944)
* Add nullable for Microsoft.AspNetCore.Components
Contributes to https://github.com/dotnet/aspnetcore/issues/5680

* Fixup
2020-06-19 18:38:37 +00:00
Safia Abdalla 52de5ee4df
Fix up rendering for select elements with options component (#22978)
* Fix up rendering for select  elements with options component
* Commit updated compiled JS
* Update test case with more scenarios
2020-06-19 08:43:05 -07:00
Filip Staffa a77e68f1c5
Kestrel Endpoints' "SslProtocols" settable via config (#22663) (#22910) 2020-06-19 08:09:56 -07:00
John Luo bb92c602d8
Fix Windows 7/8 Kestrel tests (#23069) 2020-06-19 00:24:21 -07:00
Pranav K f3b370c1ac
Annotate Authorization.Core, Authorization.Policy with nullable (#22990)
Contributes to https://github.com/dotnet/aspnetcore/issues/5680
2020-06-18 23:43:35 +00:00
Safia Abdalla a173be28fb
Add support for <BlazorWebAssemblyLazyLoad /> item group (#23071)
* Add support for <BlazorLazyLoad /> item group
* Respond to feedback from peer review
2020-06-18 16:05:34 -07:00
Doug Bunting ab7f3f2018
Enable `/warnAsError` (#23072)
* Enable `/warnAsError` in Windows builds
  - already enabled in non-Windows builds because override existed only in build.ps1
* Allow some warnings related to closed issues
  - common `<NoWarn>$(NoWarn);CS1591</NoWarn>` case unchanged
    - /Directory.Build.props ensures that warning remains a warning but doesn't hide it
* !fixup! Root build.sh _does_ disable warnings as errors
  - variable eng/common/tools.sh uses named `warn_as_error`
2020-06-18 15:59:34 -07:00
Stephen Halter 6abc3c759f
Fix Kestrel HTTP/2 debug assert failure (#23062) 2020-06-18 15:13:18 -07:00
Safia Abdalla f627352387
Fix authorization setup in Razor pages template (#23029) 2020-06-18 13:30:08 -07:00
Doug Bunting 214df1c8ef
Merge pull request #22902 from dotnet-maestro-bot/merge/release/3.1-to-master
[automated] Merge branch 'release/3.1' => 'master'
2020-06-18 12:24:36 -07:00
Pranav K a44c1ad78c
Fix null reference errors in tests (#23091)
Fixes https://github.com/dotnet/aspnetcore/issues/22992
2020-06-18 11:05:54 -07:00
Justin Kotalik cbb8c6d915
Update FormsTest.cs 2020-06-18 09:48:40 -07:00
John Luo c83fd8951a
Add sharedfx and targeting pack tests (#23045)
* Add test for assembly versions

* Add test for framework list

* Add some hardcoded lists for sharedfx and targeting pack content
2020-06-17 17:06:04 -07:00
John Luo 45e6571649
Downgrade or throw when HTTP/2 over TLS is configured on older Windows versions (#22859)
HTTP/2 over TLS is not compatible with Windows versions strictly older than Windows 10 or Windows Server 2016. Update kestrel to:
- Downgrade to HTTP/1.1 when Http1AndHttp2 is configured.
- Throw NotSupportedException when Http2 is configured.
- Allow HTTP/2 over TLS to be enabled if AppContext switch Microsoft.AspNetCore.Server.Kestrel.EnableWindows81Http2 is set. This allows users who have configured cipher suites on Windows 8.1 and Windows Server 2012 R2 to continue using HTTP/2 over TLS.
2020-06-17 16:50:48 -07:00
Safia Abdalla 7a82a48a20
Fix build issues in Blazor WASM template tests (#23052) 2020-06-17 15:31:00 -07:00
Justin Kotalik 855a73816d
Update Microsoft.AspNetCore.Server.HttpSys.FunctionalTests.csproj 2020-06-17 13:54:53 -07:00
Justin Kotalik c5b7eab345
Update Microsoft.AspNetCore.Server.HttpSys.csproj 2020-06-17 13:53:19 -07:00
Doug Bunting c4c6e25a06
Add missing doc files and cleanup nits (#22931)
* nit: Remove useless `$(HasReferenceAssembly)` settings
  - set in /Directory.Build.targets
    - `true` only in `$(IsAspNetCoreApp)` projects
* nit: Remove useless `$(CompileUsingReferenceAssemblies)` settings
  - no current versioning differences between ref/ and src/ assemblies when targeting default TFM
* Add more `$(GenerateDocumentationFile)` settings
  - increases the number of generated doc files, mostly without problems
- !fixup! correct typo in `DebugProxyHost` doc comments
    - was not generating a doc file before
  - remove previous (ineffective) src/Components/Directory.Build.targets setting
  - nit: remove a duplicate `$(GenerateDocumentationFile)` setting
* nit: Remove useless `$(IsPackable)` settings
  - only analyzers and implementation projects are packable by default
    - main use case for explicit setting is projects shipping only in shared framework
  - conditional setting in src/Mvc/Directory.Build.props just subset logic in /Directory.Build.targets
* nit: Remove useless `$(IsProjectReferenceProvider)` settings
  - only implementation projects are providers by default
* nit: Remove useless `$(IsTestAssetProject)` settings
  - set in src/Mvc/test/WebSites/Directory.Build.props
* !fixup! Looks like `InProcessNewShimWebSite` must compile w/o ref/ assemblies
  - restore `$(CompileUsingReferenceAssemblies)` in this one project
2020-06-17 13:04:45 -07:00
N. Taylor Mullen 538c462c05 Enable Helix tests for Microsoft.AspNetCore.Mvc.Razor.Extensions.* projects.
- Enabled Helix for:
    - `Microsoft.AspNetCore.Mvc.Razor.Extensions.Test`
    - `Microsoft.AspNetCore.Mvc.Razor.Extensions.Version1_X.Test`
    - `Microsoft.AspNetCore.Mvc.Razor.Extensions.Version2_X.Test`
- These tests depended on our MVC shim project's deps.json's to exist in the test bin directory during publish. Therefore added an additional target copy over those assets at publish time.
- There were some tests that were relying on source positions from a string to match a runtime generated source position. In Helix dll's are built on Windows (string's get compiled with \r\n) and then deployed to potentially non-Windows boxes resulting in mismatches of expectations. To address this I changed the test that had this dependency to dynamically generate the input string.
- Our common language test project used to rely on test files being on disk. At some point in the past those test files started being embedded in the assembly but we maintained directory checking logic to ensure various directories existed on disk (no longe required). Changed the logic to not enforce directories to be on disk (they aren't in Helix) and instead only rely on the embedded TestFiles.

dotnet/aspnetcore#22100
2020-06-17 11:49:49 -07:00
Safia Abdalla 952a19682d
Quarantine failing test (#23044) 2020-06-17 18:49:43 +00:00
dotnet-maestro[bot] 632aa8a95c
[master] Update dependencies from dotnet/runtime (#23040)
* Update dependencies from https://github.com/dotnet/runtime build 20200617.2

System.ComponentModel.Annotations , System.Diagnostics.DiagnosticSource , System.Diagnostics.EventLog , Microsoft.Extensions.Logging.Configuration , Microsoft.Extensions.Logging.Console , Microsoft.Extensions.Logging.Debug , Microsoft.Extensions.Logging.EventLog , Microsoft.Extensions.Logging.EventSource , Microsoft.Extensions.Logging.TraceSource , Microsoft.Extensions.Options , Microsoft.Extensions.Options.ConfigurationExtensions , Microsoft.Extensions.Options.DataAnnotations , Microsoft.Extensions.Primitives , Microsoft.Extensions.Logging.Abstractions , Microsoft.Extensions.Logging , Microsoft.Extensions.Internal.Transport , Microsoft.Extensions.Http , Microsoft.Extensions.Caching.Abstractions , Microsoft.Extensions.Caching.Memory , Microsoft.Extensions.Configuration , Microsoft.Extensions.Configuration.Abstractions , Microsoft.Extensions.Configuration.Binder , Microsoft.Extensions.Configuration.CommandLine , Microsoft.Extensions.Configuration.EnvironmentVariables , Microsoft.Extensions.Configuration.FileExtensions , Microsoft.Extensions.Configuration.Ini , Microsoft.Extensions.Configuration.Json , Microsoft.Extensions.Configuration.UserSecrets , Microsoft.Extensions.DependencyInjection , Microsoft.Extensions.DependencyInjection.Abstractions , Microsoft.Extensions.DependencyModel , Microsoft.Extensions.FileProviders.Abstractions , Microsoft.Extensions.FileProviders.Composite , Microsoft.Extensions.FileProviders.Physical , Microsoft.Extensions.FileSystemGlobbing , Microsoft.Extensions.HostFactoryResolver.Sources , Microsoft.Extensions.Hosting , Microsoft.Extensions.Hosting.Abstractions , Microsoft.Extensions.Configuration.Xml , Microsoft.NETCore.App.Runtime.win-x64 , Microsoft.NETCore.Platforms , Microsoft.Win32.Registry , Microsoft.Win32.SystemEvents , Microsoft.NETCore.App.Internal , Microsoft.NETCore.App.Ref , System.Drawing.Common , System.ServiceProcess.ServiceController , System.Text.Encodings.Web , System.Text.Json , System.Threading.Channels , System.Windows.Extensions , System.Security.Principal.Windows , System.Security.Permissions , System.Security.Cryptography.Xml , System.IO.Pipelines , System.Net.Http.Json , System.Net.Http.WinHttpHandler , System.Net.WebSockets.WebSocketProtocol , System.Reflection.Metadata , System.Runtime.CompilerServices.Unsafe , System.Security.Cryptography.Cng , System.Security.Cryptography.Pkcs
 From Version 5.0.0-preview.7.20315.3 -> To Version 5.0.0-preview.7.20317.2

* null

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
Co-authored-by: BrennanConroy <brecon@microsoft.com>
2020-06-17 18:46:34 +00:00
Justin Kotalik b8de65dbac
Update Microsoft.AspNetCore.Shared.Tests.csproj 2020-06-17 11:18:22 -07:00
Justin Kotalik bccaa41ca8
Update Http2Utilities.cs 2020-06-17 11:17:35 -07:00
ZeBobo5 b8d090b983
Fix #23038 (#23039) 2020-06-17 06:50:31 -07:00
David Melendez d1ae0e6e3e
adding community identity providers (#17051)
Adding Azure Table Storage and CosmosDB SQL providers to the list.
2020-06-17 06:23:48 -07:00
Ken Dale 28ed208022
Add SetIsOriginAllowedToAllowWildcardSubdomains_DoesNotAllowRootDomain test (#23001)
This test makes it clear root domains are not included in CORS subdomain wildcards
2020-06-17 06:22:20 -07:00
Dan Friedman f6fee9b4b8
Link to maintained identity provider (#21015) 2020-06-17 06:21:35 -07:00
Artak 2434047663
Quarantined tests which were not running (skipped on Helix) (#23023) 2020-06-17 04:22:17 +00:00
Adam Sitnik 580a6cce0f
BDN workaround for netcoreapp5.0->net5.0 moniker rebranding (#23000) 2020-06-17 13:43:40 +12:00
James Newton-King 29bbf06c77
Turn off gRPC interop test console color logging (#22923) 2020-06-17 12:38:32 +12:00
Pranav K 65e933ec70
Update PhoneNumberTokenProvider.cs (#22766)
* Update PhoneNumberTokenProvider.cs

Add license header.
Hyphenate two-factor authentication in documentation.
Add line breaks before return statements.
Use string interpolation instead of string concatenation.
2020-06-16 17:22:26 -07:00
Safia Abdalla 51f977db2f
Unquarantine tests that have passed for 30+ days (#23011) 2020-06-16 16:23:50 -07:00