Commit Graph

17677 Commits

Author SHA1 Message Date
N. Taylor Mullen 1f0641f5c0 Reset endpoint and route values during exception handling.
- We initially did this change as part of EndpointRouting but the impact of that change resulted in a variety of performance regressions. To mitigate the impact of resetting state for a request we now only reset the state when an exception has occurred in a way that does not require any additional state machines to be allocated.
- Added a test to validate that http context state gets reset on exception handling.

#12897
2019-08-13 13:27:36 -07:00
N. Taylor Mullen 4f6022323b Revert "Fix endpoint routing statefulness."
This reverts commit 9a6881b0e8.
2019-08-13 13:27:36 -07:00
N. Taylor Mullen 44431151c7 Revert "Addressed code review comments."
This reverts commit 479d5ed40a.
2019-08-13 13:27:36 -07:00
N. Taylor Mullen 18391dd2e4 Revert "Clear route values after middleware invocation."
This reverts commit c54a7209d7.
2019-08-13 13:27:36 -07:00
Steve Sanderson e8917fc92f [Blazor][Fixes #13056] Renderer use-after-disposal tweaks
* Improves Renderer handling use after disposal.
* Ensures RemoteRenderer skips resuming the render queue after ACK if it was since disposed
2019-08-13 21:51:39 +02:00
Pranav K 9bd027aa99
Make Partial on PageBase and PageModel work correctly (#13013)
* Make Partial on PageBase and PageModel work correctly

Fixes https://github.com/aspnet/AspNetCore/issues/10438
2019-08-13 12:49:10 -07:00
Pranav K c80f7d1dd9
Remove LangVersion from server-side Blazor project template (#13094)
Fixes https://github.com/aspnet/AspNetCore/issues/9168
2019-08-13 12:33:23 -07:00
Steve Sanderson 6b2d9f23f8
Prerender select elements with value; move HtmlRenderer into Mvc.ViewFeatures (#12996) 2019-08-13 09:34:28 +01:00
Javier Calvarro Nelson 826ed7504b
[ApiAuthorization] Update to latest oidc-client and IdentityServer4 versions
[ApiAuthorization] Updates dependency versions
* Updates to the latest version of Identity Server.
* Updates to the latest version of oidc-client.
* Removes unncessary code from the templates.
* Updates EF migrations.
* Removes unnecessary ref assembly.
2019-08-13 08:53:41 +02:00
Brennan eb966eb605
Complete upload streams on connection close (#13065) 2019-08-12 20:46:20 -07:00
Ryan Nowak 1f4341a248 Add 'firstTime' parameter to OnAfterRender
Fixes: #11610

I took the approach here of building this into `ComponentBase` instead
of `IHandleAfterRender` - *because* my reasoning is that `firstTime` is
an opinionated construct. There's nothing fundamental about `firstTime`
that requires tracking by the rendering, it's simply an opinion that
it's going to be useful for component authors, and reinforces a common
technique.

Feedback on this is welcome.
2019-08-12 18:35:39 -07:00
Ryan Nowak 29cf7ecb80 Remove Blazor VSIX
This is no longer shipped, because the templates installed by `dotnet
new -i` show up in VS now. Removing it now so we don't have to keep it
around in servicing forever.
2019-08-12 18:32:02 -07:00
Steve Sanderson a4ab9ffa05 Factor out auth and forms. Fixes #12950 (#12999)
* Add empty Authorization src and test projects

* Add references

* Move auth types into .Authorization project

* Move auth tests

* Fix Mvc.ViewFeatures

* Remove the reference from .Web to .Authorization, so it's truly optional

* Add empty Forms src and test projects

* Remove dependencies from Components.csproj

* Move forms sources and tests

* Reference .Forms from .Web (needed unless we also have .Forms.Web)

* Rebase on #12936

* Update reference assemblies

* CR: Add Authorization namespace

* Update ref sources

* Add missing using

* Add another missing using
2019-08-12 16:36:27 -07:00
Steve Sanderson c6f043cb98
Update Mono debug proxy code (#13053)
This is now equivalent to Mono's commit 612e064 and to the Mono binaries that we'll include in Preview 9
2019-08-12 17:10:30 +01:00
Brennan 7b7c13c0d5
Try to make test more reliable (#12989) 2019-08-11 20:23:18 -07:00
Ryan Nowak 5d4c4d648f Make WaitAssert report browser errors
It turns out we frequently have errors in the browser console in cases
where we're hitting a "timeout".
2019-08-11 10:49:14 -07:00
Ryan Nowak ab006e10b0 Harden ArrayBuilder
Since we're using the ArrayPool, it's really essential that we prevent
use-after-free bugs. I'm currently tracking one down.
2019-08-11 10:49:14 -07:00
Ryan Nowak 89bf58445f Use a ConcurrentDictionary
This is used from a bunch of static methods. Dictionary isn't thread
safe. Encountered this while debugging some other things.
2019-08-11 10:49:14 -07:00
Ryan Nowak 9b4ec6ec71 Add semaphore to selenium tests
This change prevents thread pool starvation when running a bunch of
selenium-based tests, by turning the blocking wait for a WebDriver to
start into an async wait.

This also seems to help with speed, and reliability since we're not
running too many browsers at once. I was experencing timeouts, and
seeing them in the debugger while running tests locally, this no longer
happens.
2019-08-11 10:49:14 -07:00
Ryan Nowak 18f5ec71ed Terminate circuit on error
Fixes: #11845

See: https://github.com/aspnet/AspNetCore/pull/12857 for detailed notes.
2019-08-11 10:49:14 -07:00
John Luo 88a3a74dbb
Multitarget packages to remove dependencies for source build (#12936) 2019-08-09 19:25:48 -07:00
Mikael Mengistu 8ef285620c
Remove references to OnReaderCompleted and OnWriterCompleted (#13018) 2019-08-09 19:04:33 -07:00
Pratik Sanglikar 09db3ebbae Enable Docker Support checkbox for Blazor Server apps and gRPC apps. (#13016)
* Enable the checkbox "Add Docker Support" for Blazor apps. 

Enable the checkbox "Add Docker Support" for Blazor apps.

* Enable "Enable Docker Support" checkbox for gRPC projects. 

Enable "Enable Docker Support" checkbox for gRPC projects.
2019-08-09 18:55:52 -07:00
Daniel Roth 920d8018e8
Update Blazor survey link for preview 9 (#13008) 2019-08-09 14:44:19 -07:00
Ryan Brandenburg 391806283a
Don't serve angular static files in dev mode (#12885)
Don't serve angular static files in dev mode
2019-08-09 14:30:46 -07:00
Ryan Brandenburg afcfeaf0ac
Improve template Accessibility (#12891)
Add aria-label to table to give title
2019-08-09 14:25:25 -07:00
Ryan Brandenburg 14f17fa7cd
Obsolete Microsoft.AspNetCore.SpaServices and Microsoft.AspNetCore.No… (#12892)
Obsolete Microsoft.AspNetCore.SpaServices and Microsoft.AspNetCore.NodeServices
2019-08-09 13:47:51 -07:00
Ryan Brandenburg 3ab8ebff42
Extend timeout and enforce usings (#12952)
Extend timeout and enforce usings
2019-08-09 13:38:09 -07:00
Doug Bunting b1fdf27f61 Clean up #12854 a bit
- remove incorrect comment
- do not completely overwrite `$(RestoreAdditionalProjectSources)` values
2019-08-09 12:07:54 -07:00
Stephen Halter 92977140ac
Timeout all top-level awaits in TestUnixDomainSocket (#12986) 2019-08-09 11:40:38 -07:00
Chris Ross 6e25a9fc53
Granular error handling for Negotiate #12566 (#12958) 2019-08-09 11:28:39 -07:00
Pranav K dda84bc7fc
Use TValue as the generic type parameter (#12953)
* Use TValue as the generic type parameter

Fixes https://github.com/aspnet/AspNetCore/issues/12926
2019-08-09 10:19:33 -07:00
Justin Kotalik 735807d6ff Skip flaky HTTPS devcert test on 2.2 (#12980) 2019-08-09 09:53:31 -07:00
Brennan ecd6c11c46
Remove unused SignalR benchmarks app (#12954) 2019-08-09 09:14:12 -07:00
Justin Kotalik 8dd3cd4129
Merge pull request #12877 from dotnet-maestro-bot/merge/release/3.0-preview8-to-release/3.0
[automated] Merge branch 'release/3.0-preview8' => 'release/3.0'
2019-08-09 08:37:19 -07:00
Javier Calvarro Nelson 5c71742e4a
[Identity] Add warnings when using Bootstrap3 and errors when using an unknown framework version (#12988)
* [Identity] Add warnings when using Bootstrap3 and errors when using an unknown framework version
2019-08-09 15:56:09 +02:00
Mikael Mengistu e4b4476b37
Add test for canceling start in transport (#12846) 2019-08-08 20:14:56 -07:00
Justin Kotalik a00bafd70f
Fix retries with port selection (#12984) 2019-08-08 16:28:34 -07:00
Steve Sanderson d716ca9d62
Remove .Web IVTs and refactor. Fixes #12713 (#12967)
* Remove IVTs from Microsoft.AspNetCore.Components.Web to .Blazor/.Server

* Eliminate RendererRegistry from .Web, as it's not needed for server-side Blazor

* Reintroduce RendererRegistry as a WebAssembly-specific concept. Refactor event data parsing.

* Remove redundant guard

* Corresponding test updates

* Update ref sources

* CR: Remove renderer ID fully from server-side Blazor code

* CR: Make WebEventData internal and shared-source

* Hub test updates

* Clean whitespace

* Update binaries

* Regenerate binaries AGAIN

* Update Jest test

* CR: Replace constructor with static parse

* Yet again attempt to refresh the .js binaries

* Fix ref assembly

* Fix test
2019-08-09 00:03:40 +01:00
Ryan Nowak fc2d3e588f Fix dynamic routes with no route values
Fixes: #12915

This was just missing a null check.

Also added unit tests that were missing for these types.
2019-08-08 14:38:59 -07:00
Brennan 5adeaddfe6
Test ValueTask hub methods (#12898) 2019-08-08 14:04:43 -07:00
Brennan bd01c67e88
Add test for supported scenario (#12931) 2019-08-08 14:04:16 -07:00
Justin Kotalik 0574a3fc94 Merge branch 'release/3.0-preview8' into release/3.0 2019-08-08 13:35:15 -07:00
Stephen Halter 55632872eb Timeout all top-level awaits in TestUnixDomainSocket 2019-08-08 13:21:58 -07:00
Justin Kotalik c6e1bcb66c
Fix Max Request Body Size test (#12981) 2019-08-08 13:17:36 -07:00
Artak 4ca819ec99
Update localized strings for templates (#12927) (#12982) 2019-08-08 12:55:09 -07:00
Pranav K d6d4bb2772
Ensure IFormFile binding for nested properties works (#12847)
* Ensure IFormFile binding for nested properties works

Fixes https://github.com/aspnet/AspNetCore/issues/9510
2019-08-08 12:28:54 -07:00
Steve Sanderson 3bd838f9d4 Making InteropReliabilityTests as flaky 2019-08-08 11:37:58 +01:00
Steve Sanderson ebd02cdb71 Fix building Components solution in VS 2019-08-08 11:37:58 +01:00
Ryan Brandenburg 22df034ae6 Allow retries of SSL exceptions 2019-08-07 10:41:49 -07:00
Javier Calvarro Nelson 1b477405ca
[Blazor][Fixes #12940] Make interop tests timeouts more conservative to fix flakiness.
Increases the implicit timeout for each operation from 500 milliseconds to 5 seconds.
2019-08-07 17:41:28 +02:00
Javier Calvarro Nelson 25c240bef5
[Blazor] Graceful disconnection
* Adds a new API endpoint to trigger graceful disconnection from blazor clients.
* Uses the sendBeacon API on the Blazor client to trigger graceful disconnections on the client when the document gets unloaded, which happens when closing the window, navigating away from the page or refreshing the page.
2019-08-07 17:40:02 +02:00
Steve Sanderson 92869c677f
Revalidating auth improvement. Fixes #12692 (#12909) 2019-08-07 15:15:26 +01:00
Ryan Nowak 15e4b605eb
Blazor API Review: RenderTree types (#12869)
* Add analzyer for pubternal

This is based on some existing code from EF. I'm having a discussion
with them right now on the best way to share this logic.

I also added support for parameters here which was missing. We might
want to make this code converge with `BannedApiAnalyzer` which is much
more thorough than this.

This is using our existing package for testing analyzers thats the
*official* way to do it in our repo. Filed #12868 to track that.

* Add S C A R Y warnings to render tree types

* PR feedback
2019-08-06 22:41:02 -07:00
Pranav K 7e59a26846
Ignore line-ending differences in test (#12921) 2019-08-06 15:01:26 -07:00
Steve Sanderson 08349aba69
Ensure render batches aren't started from inside each other (#12917) 2019-08-06 22:40:02 +01:00
dotnet-maestro[bot] 594916344d [release/3.0] Update dependencies from 4 repositories (#12854)
* Update dependencies from https://github.com/dotnet/arcade build 20190804.1
- Microsoft.DotNet.Arcade.Sdk - 1.0.0-beta.19404.1
- Microsoft.DotNet.GenAPI - 1.0.0-beta.19404.1
- Microsoft.DotNet.Helix.Sdk - 2.0.0-beta.19404.1

* React to RenderTreeBuilder namespace change

* Correct builds and tests needing additonal feeds
- use `$(RestoreAdditionalProjectSources)` properties instead of generated NuGet.config files
  - this is closer to the previous approach but avoids `$(RestoreSources)` for the common feeds
  - also remove few remaining `$(RestoreSources)` mentions from SiteExtension.targets
- no need to copy NuGet.config or add feeds in dotnet-watch tests
  - test projects restore within the repo (not in `$env:Temp`) and need no additional feeds

nits:
- $(NuGetConfigFile) hack in eng\Workarounds.props was getting in the way of previous approach and wasn't necessary

* Update dependencies from https://github.com/aspnet/Blazor build 20190805.1
- Microsoft.AspNetCore.Blazor.Mono - 3.0.0-preview9.19405.1

* Update dependencies from https://github.com/aspnet/AspNetCore-Tooling build 20190805.6
- Microsoft.NET.Sdk.Razor - 3.0.0-preview9.19405.6
- Microsoft.CodeAnalysis.Razor - 3.0.0-preview9.19405.6
- Microsoft.AspNetCore.Razor.Language - 3.0.0-preview9.19405.6
- Microsoft.AspNetCore.Mvc.Razor.Extensions - 3.0.0-preview9.19405.6

* Update dependencies from https://github.com/aspnet/EntityFrameworkCore build 20190805.13
- Microsoft.EntityFrameworkCore.Tools - 3.0.0-preview9.19405.13
- Microsoft.EntityFrameworkCore.SqlServer - 3.0.0-preview9.19405.13
- dotnet-ef - 3.0.0-preview9.19405.13
- Microsoft.EntityFrameworkCore - 3.0.0-preview9.19405.13
- Microsoft.EntityFrameworkCore.InMemory - 3.0.0-preview9.19405.13
- Microsoft.EntityFrameworkCore.Relational - 3.0.0-preview9.19405.13
- Microsoft.EntityFrameworkCore.Sqlite - 3.0.0-preview9.19405.13

Dependency coherency updates
- Microsoft.AspNetCore.Analyzer.Testing - 3.0.0-preview9.19405.2 (parent: Microsoft.EntityFrameworkCore)
- Microsoft.AspNetCore.BenchmarkRunner.Sources - 3.0.0-preview9.19405.2 (parent: Microsoft.EntityFrameworkCore)
- Microsoft.Extensions.ActivatorUtilities.Sources - 3.0.0-preview9.19405.2 (parent: Microsoft.EntityFrameworkCore)
- Microsoft.Extensions.Caching.Abstractions - 3.0.0-preview9.19405.2 (parent: Microsoft.EntityFrameworkCore)
- Microsoft.Extensions.Caching.Memory - 3.0.0-preview9.19405.2 (parent: Microsoft.EntityFrameworkCore)
- Microsoft.Extensions.Caching.SqlServer - 3.0.0-preview9.19405.2 (parent: Microsoft.EntityFrameworkCore)
- Microsoft.Extensions.Caching.StackExchangeRedis - 3.0.0-preview9.19405.2 (parent: Microsoft.EntityFrameworkCore)
- Microsoft.Extensions.CommandLineUtils.Sources - 3.0.0-preview9.19405.2 (parent: Microsoft.EntityFrameworkCore)
- Microsoft.Extensions.Configuration.Abstractions - 3.0.0-preview9.19405.2 (parent: Microsoft.EntityFrameworkCore)
- Microsoft.Extensions.Configuration.AzureKeyVault - 3.0.0-preview9.19405.2 (parent: Microsoft.EntityFrameworkCore)
- Microsoft.Extensions.Configuration.Binder - 3.0.0-preview9.19405.2 (parent: Microsoft.EntityFrameworkCore)
- Microsoft.Extensions.Configuration.CommandLine - 3.0.0-preview9.19405.2 (parent: Microsoft.EntityFrameworkCore)
- Microsoft.Extensions.Configuration.EnvironmentVariables - 3.0.0-preview9.19405.2 (parent: Microsoft.EntityFrameworkCore)
- Microsoft.Extensions.Configuration.FileExtensions - 3.0.0-preview9.19405.2 (parent: Microsoft.EntityFrameworkCore)
- Microsoft.Extensions.Configuration.Ini - 3.0.0-preview9.19405.2 (parent: Microsoft.EntityFrameworkCore)
- Microsoft.Extensions.Configuration.Json - 3.0.0-preview9.19405.2 (parent: Microsoft.EntityFrameworkCore)
- Microsoft.Extensions.Configuration.KeyPerFile - 3.0.0-preview9.19405.2 (parent: Microsoft.EntityFrameworkCore)
- Microsoft.Extensions.Configuration.UserSecrets - 3.0.0-preview9.19405.2 (parent: Microsoft.EntityFrameworkCore)
- Microsoft.Extensions.Configuration.Xml - 3.0.0-preview9.19405.2 (parent: Microsoft.EntityFrameworkCore)
- Microsoft.Extensions.Configuration - 3.0.0-preview9.19405.2 (parent: Microsoft.EntityFrameworkCore)
- Microsoft.Extensions.DependencyInjection.Abstractions - 3.0.0-preview9.19405.2 (parent: Microsoft.EntityFrameworkCore)
- Microsoft.Extensions.DependencyInjection - 3.0.0-preview9.19405.2 (parent: Microsoft.EntityFrameworkCore)
- Microsoft.Extensions.DiagnosticAdapter - 3.0.0-preview9.19405.2 (parent: Microsoft.EntityFrameworkCore)
- Microsoft.Extensions.Diagnostics.HealthChecks.Abstractions - 3.0.0-preview9.19405.2 (parent: Microsoft.EntityFrameworkCore)
- Microsoft.Extensions.Diagnostics.HealthChecks - 3.0.0-preview9.19405.2 (parent: Microsoft.EntityFrameworkCore)
- Microsoft.Extensions.FileProviders.Abstractions - 3.0.0-preview9.19405.2 (parent: Microsoft.EntityFrameworkCore)
- Microsoft.Extensions.FileProviders.Composite - 3.0.0-preview9.19405.2 (parent: Microsoft.EntityFrameworkCore)
- Microsoft.Extensions.FileProviders.Embedded - 3.0.0-preview9.19405.2 (parent: Microsoft.EntityFrameworkCore)
- Microsoft.Extensions.FileProviders.Physical - 3.0.0-preview9.19405.2 (parent: Microsoft.EntityFrameworkCore)
- Microsoft.Extensions.FileSystemGlobbing - 3.0.0-preview9.19405.2 (parent: Microsoft.EntityFrameworkCore)
- Microsoft.Extensions.HashCodeCombiner.Sources - 3.0.0-preview9.19405.2 (parent: Microsoft.EntityFrameworkCore)
- Microsoft.Extensions.Hosting.Abstractions - 3.0.0-preview9.19405.2 (parent: Microsoft.EntityFrameworkCore)
- Microsoft.Extensions.Hosting - 3.0.0-preview9.19405.2 (parent: Microsoft.EntityFrameworkCore)
- Microsoft.Extensions.HostFactoryResolver.Sources - 3.0.0-preview9.19405.2 (parent: Microsoft.EntityFrameworkCore)
- Microsoft.Extensions.Http - 3.0.0-preview9.19405.2 (parent: Microsoft.EntityFrameworkCore)
- Microsoft.Extensions.Localization.Abstractions - 3.0.0-preview9.19405.2 (parent: Microsoft.EntityFrameworkCore)
- Microsoft.Extensions.Localization - 3.0.0-preview9.19405.2 (parent: Microsoft.EntityFrameworkCore)
- Microsoft.Extensions.Logging.Abstractions - 3.0.0-preview9.19405.2 (parent: Microsoft.EntityFrameworkCore)
- Microsoft.Extensions.Logging.AzureAppServices - 3.0.0-preview9.19405.2 (parent: Microsoft.EntityFrameworkCore)
- Microsoft.Extensions.Logging.Configuration - 3.0.0-preview9.19405.2 (parent: Microsoft.EntityFrameworkCore)
- Microsoft.Extensions.Logging.Console - 3.0.0-preview9.19405.2 (parent: Microsoft.EntityFrameworkCore)
- Microsoft.Extensions.Logging.Debug - 3.0.0-preview9.19405.2 (parent: Microsoft.EntityFrameworkCore)
- Microsoft.Extensions.Logging.EventSource - 3.0.0-preview9.19405.2 (parent: Microsoft.EntityFrameworkCore)
- Microsoft.Extensions.Logging.EventLog - 3.0.0-preview9.19405.2 (parent: Microsoft.EntityFrameworkCore)
- Microsoft.Extensions.Logging.TraceSource - 3.0.0-preview9.19405.2 (parent: Microsoft.EntityFrameworkCore)
- Microsoft.Extensions.Logging.Testing - 3.0.0-preview9.19405.2 (parent: Microsoft.EntityFrameworkCore)
- Microsoft.Extensions.ObjectPool - 3.0.0-preview9.19405.2 (parent: Microsoft.EntityFrameworkCore)
- Microsoft.Extensions.Options.ConfigurationExtensions - 3.0.0-preview9.19405.2 (parent: Microsoft.EntityFrameworkCore)
- Microsoft.Extensions.Options.DataAnnotations - 3.0.0-preview9.19405.2 (parent: Microsoft.EntityFrameworkCore)
- Microsoft.Extensions.Options - 3.0.0-preview9.19405.2 (parent: Microsoft.EntityFrameworkCore)
- Microsoft.Extensions.ParameterDefaultValue.Sources - 3.0.0-preview9.19405.2 (parent: Microsoft.EntityFrameworkCore)
- Microsoft.Extensions.Primitives - 3.0.0-preview9.19405.2 (parent: Microsoft.EntityFrameworkCore)
- Microsoft.Extensions.TypeNameHelper.Sources - 3.0.0-preview9.19405.2 (parent: Microsoft.EntityFrameworkCore)
- Microsoft.Extensions.ValueStopwatch.Sources - 3.0.0-preview9.19405.2 (parent: Microsoft.EntityFrameworkCore)
- Microsoft.Extensions.WebEncoders - 3.0.0-preview9.19405.2 (parent: Microsoft.EntityFrameworkCore)
- Microsoft.Internal.Extensions.Refs - 3.0.0-preview9.19405.2 (parent: Microsoft.EntityFrameworkCore)
- Microsoft.JSInterop - 3.0.0-preview9.19405.2 (parent: Microsoft.EntityFrameworkCore)
- Mono.WebAssembly.Interop - 3.0.0-preview9.19405.2 (parent: Microsoft.EntityFrameworkCore)
- Microsoft.Extensions.Logging - 3.0.0-preview9.19405.2 (parent: Microsoft.EntityFrameworkCore)
- Internal.AspNetCore.Analyzers - 3.0.0-preview9.19405.2 (parent: Microsoft.EntityFrameworkCore)
- Microsoft.AspNetCore.Testing - 3.0.0-preview9.19405.2 (parent: Microsoft.EntityFrameworkCore)

* !fixup! close tag properly
2019-08-06 11:05:09 -07:00
Justin Kotalik 94856d049f
Use target architecture for building ANCM symbol packages. (#12816) 2019-08-06 10:57:06 -07:00
Ryan Nowak 2b0a1686c3
Improve SetParametersAsync docs (#12826)
* Improve SetParametersAsync docs

Fixes: #12820

* Clarify semantics of clashing cascading parameters

This change attempts to lock down the semantics of how cascading
parameters behave inside ParameterView.SetParameterProperties.

Previously a cascading value could be used to set a non-cascading
parameter, and vice-versa. We were just missing tests in general for how
cascading values are interpreted by the parameter set logic.
2019-08-06 07:37:49 -07:00
Javier Calvarro Nelson 31cfa2e305
[Blazor][Fixes #11964] Limit the amount of pending renders (#12763)
[Blazor][Fixes #11964] Limit the amount of pending renders
* Adds a default limit of 10 queued pending renders per application.
* Stops producing new render batches after that limit is hit.
* Resumes producing render batches as soon as the client acknowledges a batch.
2019-08-06 16:22:07 +02:00
John Luo 43350b57b9
Revert "Revert "Improve components infrastructure (#12145)" (#12679)" (#12744)
* Revert "Revert "Improve components infrastructure (#12145)" (#12679)"

This reverts commit e2d57e2806. The improvement to components infrastructure is now reinstated with the following changes:

* Check in release JS artifacts and use them as a fallback when it's not possible to build npmproj.
* Dont' build nodejs in source build.
2019-08-05 15:17:55 -07:00
Pranav K 397f924e8d
Ensure SystemTextJsonHelper always HTML encodes output. (#12808)
* Ensure JsonSerializer always HTML encodes output.

* Update JsonOptions.JsonSerializerOptions to use encoder scheme that does not encode non-ASCII
  characters by default. This makes the encoding comparable to Json.NET's defaults
* In SystemTextJsonHelper, ensure that the content is always HTML-encoded
* Unskip skipped test

Fixes https://github.com/aspnet/AspNetCore/issues/9946
Fixes https://github.com/aspnet/AspNetCore/issues/11459
2019-08-05 13:34:32 -07:00
Pranav K 709b390157
Add helper methods on ControllerBase to return ProblemDetails (#12298)
* Add helper methods on ControllerBase to return ProblemDetails

* Introduce ControllerBase.Problem and ValidationProblem overload
  that accepts optional parameters
* Consistently use ClientErrorData when generating ProblemDetails
* Clean-up InvalidModelStateResponseFactory initialization.

Fixes https://github.com/aspnet/AspNetCore/issues/8537
2019-08-05 11:28:28 -07:00
Justin Kotalik 8d68062cc4 Always load hostfxr.dll by absolute path (#12807) 2019-08-05 08:51:55 -07:00
Steve Sanderson 2ff6a5c0f8
Components router refactoring. Fixes #10493 #10445 (#12800) 2019-08-05 13:52:01 +01:00
Doug Bunting 0dc822a6ad
Merge branch 'release/3.0' into merge/release/3.0-preview8-to-release/3.0 2019-08-03 13:31:00 -07:00
Ryan Nowak 352df35864 Re-enable components E2E tests on the CI 2019-08-03 08:52:03 -07:00
Javier Calvarro Nelson 521cabc545
[Blazor][Fixes #12283] Prevent HtmlRenderer from calling OnAfterRender by default (#12684)
[Blazor] Prevents HtmlRenderer from calling OnAfterRender by default
2019-08-03 13:03:48 +02:00
Ryan Nowak d52d7e3284
Harden StartCircuit (#12825)
* Harden StartCircuit

Fixes: #12057

Adds some upfront argument validation as well as error handling for
circuit intialization failures.
2019-08-02 20:35:29 -07:00
Ryan Nowak 7f924dd599 fix outlying namespace 2019-08-02 17:23:46 -07:00
Ryan Nowak 3cc6e8373b Fail faster in Blazor E2E tests
This change adds a fail-fast mechanism to our E2E tests based on
the browser console. This will fail super hard if an unhandled exception
is thrown.

I think it would be interesting to also see if we could do the same
thing for 404s.

The goal of this change is to make it so that the E2E tests can fail
faster (3-4s) than the 30s timeout in the case that something
catastrophic happens. As a nice side benefit you get to see the
exception message.
2019-08-02 17:23:46 -07:00
Ryan Nowak 40e268f59e Skip failing tests 2019-08-02 17:23:46 -07:00
Ryan Nowak da49e0e0f6 Fix broken test
These parameters are declared incorrectly.
2019-08-02 17:23:46 -07:00
Steve Sanderson 8a1cf8386f
Stricter key clash detection. Fixes #12691 (#12837) 2019-08-02 22:16:47 +01:00
Brennan c15f1e145f
[SignalR] Change log levels (#12742) 2019-08-02 10:51:23 -07:00
N. Taylor Mullen d312d797fc Change non-public [Parameter] warning severities to error.
- In preview8 we warned users for non-public `[Parameter]`s and `[Parameter]` setters. For preview9 this is now an error because things will not work as they expect.
- Updated existing tests to reflect the new error expectation.

#12294
2019-08-02 10:25:26 -07:00
Artak 45f9a2a44e
Updated dependencies (#12836) 2019-08-02 09:57:10 -07:00
Justin Kotalik 02d28e1c54
Only use read Pipe when running on Http2. (#12737) 2019-08-02 08:02:59 -07:00
Doug Bunting 8dd1be9474 Fix XML escaping
- #12786
- escape `'<'` chars in attribute values to make the .targets file valid XML
- escape `'\''` chars nested within single-quoted values to make `msbuild` conditions valid
2019-08-01 22:04:52 -07:00
Ryan Nowak 9b888e9df5
Blazor API Review: IUriHelper (#12425)
* Rename IUriHelper -> NavigationManager

- Remove IUriHelper interface
- Rename to NavigationManager
- Remove all traces of old naming

There's no functional or design change in this commit - just removing
all traces of the old name. The next few iterations will try to improve
the design.

* Minor API tweaks to NavigationManager

Making Initialize protected causes problems because right now the
server-side code needs to deal with one of two different
implementations, hence an exchange type is used. I followed the same
pattern that was used for auth for symmetry but I have some *cool*
thoughts.

- We can remove this when we remove stateful prerendering
- I have another idea to banish this pattern to the land of wind and
ghosts

If this ends up sticking around longer than a week in the code, lets
discuss other ideas and try to improve the pattern.

* Use hub method for server-side navigation

* Get rid of async local

* Add hub method test

* Misc bikeshedding

* Update src/Components/Server/src/Circuits/DefaultCircuitFactory.cs

Co-Authored-By: campersau <buchholz.bastian@googlemail.com>

* PR feedback
2019-08-01 17:11:09 -07:00
Chris Ross 59f6b852c2
HPACK circular overflow #12190 (#12782) 2019-08-01 14:30:32 -07:00
Ryan Nowak 001b54f42e Add component for managing a DI scope
Fixes: #5496
Fixes: #10448

This change adds a *utility* base class that encourages you to do the
right thing when you need to interact with a disposable scoped or
transient service.

This solution ties the lifetime of a DI scope and a service to a
component instance. Note that this is not recursive - we expect users to
pass services like this around (or as cascading values) if the design
dictates it.
2019-08-01 12:03:34 -07:00
Chris Ross 0559d39746
Fix form pipe parser #12381 (#12749) 2019-08-01 11:28:35 -07:00
John Luo 9459b73972
Merge pull request #12752 from aspnet/jamesnk/grpc-dep-preview8
Update gRPC template dependency for preview 8 and link to macOS docs
2019-08-01 11:25:57 -07:00
Ryan Nowak 45f50905d5 Remove stateful prerendering
Fixes: #12245
Fixes: #12630

This change removes stateful pre-rendering from Server-Side Blazor. This
means that when you render a component during the initial HTTP request,
we we will no longer preserve the component instances and their
parameters. While this feature was useful, it cause serious scalability
concerns.

This means that it will now be required to register "entry-point"
components in startup similar to client-side Blazor.
2019-08-01 07:44:14 -07:00
Ryan Brandenburg 5c11687506 SPA template precedence (#12781)
Merging this as there are no actual code-changes here.
2019-07-31 16:43:40 -07:00
Ryan Nowak b42ebf119d Fix incrementalism of Blazor solution 2019-07-31 13:31:26 -07:00
James Newton-King 1434e239d6
Change OSX to macOS in error message (#12756) 2019-08-01 08:30:56 +12:00
Javier Calvarro Nelson 2969001a75
[Identity] Fix flaky test (#12771) 2019-07-31 21:58:10 +02:00
Pranav K 9e6924235e
Add logging to RemoteRenderer to time a round-trip (#12638) 2019-07-31 12:18:31 -07:00
Justin Kotalik aab75e8dda
Decrement activeStreamCount earlier s.t. client view matches the server. (#12704) 2019-07-31 07:45:36 -07:00
Javier Calvarro Nelson 7a0a286ce6
[Blazor][Fixes #12197] Dispose the circuit on graceful disconnections (#12449)
* Immediately releases the circuit when the client disconnects gracefully.
* This functionality is limited to websockets.
* We are able to release the circuit in the following situations:
  * The user closes the browser.
  * The user navigates away.
  * The user reloads the page.
2019-07-31 13:17:00 +02:00
James Newton-King ccfa7f13ea
Clean up 2019-07-31 13:58:18 +12:00
James Newton-King 10b9c338f2
Clean up 2019-07-31 13:57:16 +12:00
James Newton-King 4841d5f019
Update gRPC template dependency for preview 8 and link to macOS docs 2019-07-31 13:50:06 +12:00
Phil Henning b2e11d77e8 Insert seed localization for templates. (#11040)
* Insert seed localization for templates.

* Updated loc strings for Worker for some langs

* Update en string.json for Blazor project template

* Refresh strings for initial seeding
2019-07-30 16:00:08 -07:00
Justin Kotalik c809b669b9 Catch all exceptions from Exit shutdown (#12518) 2019-07-30 12:55:13 -07:00
Ryan Nowak 6045c08072 Blazor API Review: Built-in components
Fixes: #12548

Renaming properties to drop 'Content' as a suffix. We haven't been
consistent in using this, and we're removing it instead of adding it
elsewhere.
2019-07-30 09:35:49 -07:00
Ryan Nowak bef01f3e9a Blazor API Review: UIEventArgs types
Fixes: #12550

Removes UIEventArgs in favor of EventArgs as the base class.

Moving Type into all of our event args types - this is important because
many of the events types are used for multiple events.

The only think about this that isn't perfect is that we have keep
special casing change because of how binding works. I renamed the type
to drop the `UI` prefix. It's not possible to define a subclass in the
Web project because of the way covariance works (or doesn't work) in
.NET.
2019-07-29 22:40:28 -07:00
Ryan Nowak 3919dd55c6 Fix globalization for `@bind-value`
Fixes: #12631

These mappings were missing and adding them restores the correct
behaviour. Mixing up the usage of `@bind` vs `@bind-value` so we have
more coverage of this.
2019-07-29 22:39:56 -07:00