Commit Graph

17769 Commits

Author SHA1 Message Date
Steve Sanderson 158d3f1c23
Unflake ComponentLifecycleMethodThrowsExceptionTerminatesTheCircuit test (#13824) 2019-09-09 13:30:44 +01:00
Steve Sanderson 1527e49eb3
Make InputDateInteractsWithEditContext_NullableDateTimeOffset more reliable (#13648) 2019-09-09 13:30:18 +01:00
Justin Kotalik 1db76280ae
Don't call complete outside of main request loop (#13728) 2019-09-06 23:01:19 -07:00
Javier Calvarro Nelson c3fa16970d
[ApiAuth] Update partner dependencies to their final versions (#13260)
* Update oidc-client dependency to 1.9.4
* Update to the Identity Server 4 RTM version
* Updated entity framework migrations
2019-09-07 02:39:47 +02:00
Justin Kotalik 8a8a0a5b82
Don't capture instance in Select for DataProtection. (#13743)
* Don't capture instance in project on Select

* Avoid capturing this by putting _logger in a local
2019-09-06 15:02:11 -07:00
John Luo 3e4c2a4c4f
Ship Site Extensions package (#13693) 2019-09-06 13:49:43 -07:00
Steve Sanderson 91a6fcc93d
Improve reliability of globalization E2E tests (#13678) 2019-09-06 16:20:14 +01:00
Ryan Brandenburg 7349b19e1e
components-reconnect-refused to components-reconnect-rejected (#13659)
components-reconnect-refused to components-reconnect-rejected
2019-09-04 11:07:19 -07:00
Kevin Pilch c9505a2911 Remove test workaround for fixed issue.
Fixes #11206
2019-09-04 10:29:47 -07:00
Daniel Roth 834e316f7a Correct the spelling of 'EnableEndpointRouting' (#13655)
Fixes #11467
2019-09-04 08:11:41 -07:00
Chris Ross 1095971a80
Skip broken shutdown test (#13652) 2019-09-03 12:40:50 -07:00
Pranav K 54710e4671
Do not infer Required attributes based on context for non-nullable generic types (#13551)
Fixes https://github.com/aspnet/AspNetCore/issues/13512
2019-09-03 11:13:16 -07:00
John Luo 437f149880
Build analyzers and bundled dotnet tools in source build (#13569)
* Add external package available in source buid
2019-09-03 10:39:23 -07:00
Stephen Halter 5d0b314e7d
Deflake ConcurrentPipeWriterTests.PassthroughIfAllFlushesAreAw… (#13563) 2019-08-30 10:35:36 -07:00
Justin Kotalik 78b46768d7 Lazyily initialize Https port in HttpsRedirectionMiddleware 2019-08-29 16:46:26 -07:00
Pranav K c3af33a023
Update manually generated reference for RenderTreeFrame (#13522)
Fixes https://github.com/aspnet/AspNetCore/issues/13504
2019-08-29 09:20:15 -07:00
Javier Calvarro Nelson 14136e7acd
[SPA] Enable support for publish single file (#13518)
* Updates the angular template to exclude the client-side files from the single file publish output
* Updates the react template to exclude the client-side files from the single file publish output
* Updates the react-redux template to exclude the client-side files from the single file publish output
2019-08-29 10:06:46 +02:00
Ryan Brandenburg 0d24bc27eb
Microsoft.dotnet-openapi is a shipping package (#13481)
Microsoft.dotnet-openapi is a shipping package
2019-08-28 11:43:41 -07:00
Ben Adams 649bcc8f61 Http2MessageBody.TryRead TryStart/TryStop (#13464) 2019-08-27 16:21:32 -07:00
Daniel Roth b9d1e067ee
Fixup Razor Class Library template namespace and component content (#13419) 2019-08-27 16:00:39 -07:00
Chris Ross b991e4b9c2
Fix AzureAd options validation (#13480)
* Skip getting AzureAdOptions for not AzureADUi Cookies scheme #13311 (#13327)

* Also check Azure Jwt options for #13311
2019-08-27 15:59:08 -07:00
Brennan ecae6838b8
Ignore MaxRequestBodySize for upgraded requests (#13477) 2019-08-27 13:53:09 -07:00
Kevin Pilch 3e253f6a40 Add XML docs to pubternal types 2019-08-27 13:45:33 -07:00
Doug Bunting 8ea3edadaf
Add tests of client code generation components (#13444)
- #4914
- test service ref MSBuild tasks
  - add `MockBuildEngine` class to support tests where a task logs
- correct an incredibly minor product issue about logging errors for `@(OpenApiProjectReference)` items
  - set `%(SourceProject)` metadata and use it when logging
- add test project that builds and can be tested in the future
2019-08-26 20:42:13 -07:00
Justin Kotalik 2d8cd179a1
Skip default port tests (#12983) 2019-08-26 14:07:31 -07:00
Brennan efa30e25f2
Move AfterBuild Target to more accurate project (#13281) 2019-08-26 09:42:17 -07:00
Doug Bunting d7b604810d Clean up reference conflict warnings in Microsoft.dotnet-openapi project 2019-08-26 09:05:11 -07:00
Doug Bunting b496781792
Remove last couple of (test-only) System.Data.SqlClient dependencies (#13426) 2019-08-26 09:04:10 -07:00
Doug Bunting a6597967e4
Merge branch 'release/3.0' into merge/release/3.0-preview9-to-release/3.0 2019-08-24 15:46:10 -07:00
Chris Ross 66de493473 Mark bytes as consumed #13372 (#13394) 2019-08-24 12:03:03 -07:00
Doug Bunting cb298f16e9
Merge branch 'release/2.2' => 'release/3.0' (#13100) 2019-08-24 11:06:25 -07:00
Doug Bunting 208b50afca
Merge branch 'release/3.0-preview9' => 'release/3.0' (#13283) 2019-08-24 11:02:55 -07:00
Hao Kung 4425876c89 [3.0] Also target netstandard2.1 for Identity.EFCore (#13402)
* Also target netstandard2.1 for Identity.EFCore

* Remove source build line
2019-08-24 08:22:28 -07:00
Javier Calvarro Nelson 61dc5fbe28 [ApiAuthorization] Disables pop-up logout by default
* There is an issue in Edge that prevents it from working.
* Can be enabled by setting 'popUpDisabled = false' in 'authorize.service.ts'
2019-08-23 20:00:53 -07:00
Doug Bunting 8417429b9b
Fix a typo and address remaining service reference TODO items (#13364)
- #4923
- typo caused problems when cleaning files
- add `%(OpenApiProjectReference.GlobalPropertiesToRemove)` metadata
  - stop removing `$(Configuration)` or `$(Platform)` global properties
- address timing issues cropping up occasionally in builds using service ref features
  - avoid `AfterTargets="Build"`; referencing projects sometimes continue while post-build work is done
    - instead use `BeforeTargets="Build"` since that's a no-op target wrapping up a build
- set only properties in buildMultiTargeting\Microsoft.Extensions.ApiDescription.Server.targets
  - items not evaluated early enough to reference in all cases
- rename Microsoft.Extensions.ApiDescription.Client tasks
- remove net461 task assembly
2019-08-23 15:59:58 -07:00
Doug Bunting e89a0519b9 Use Microsoft.Extensions.CommandLineUtils and Microsoft.Extensions.Tools.Internal in service ref programs
- add '--quiet' option
- add '--debug' option (when building Debug configuration)
- support `--` in `dotnet-getdocument`; users may want to explictly add options for GetDocument.Insider
- remove '--no-color' option
- use `IReporter` extension methods instead of static `Reporter` class
- reduce `static` use to ease testing (coming soon) and share the `IConsole` and `IReporter`
  - add `ProgramBase`
- allow mix of known and unknown command-line arguments
  - maintain existing behaviour using switch added in aspnet/Extensions#2210

nits:
- add a couple more `CommandLineApplicationExtensions` methods
- take VS suggestions
2019-08-23 15:54:55 -07:00
Steve Sanderson b16a26d50b Blazor fixes (#13377)
* Remove incorrect comment from template. Fixes #13331
* Fix reload button. Fixes #13370
* Fix navigation after reconnection. Fixes #13371
* Auth template fixes. Fixes #13374 and #13375
2019-08-23 15:48:24 -07:00
Brennan 6d311041f0
Properly wait for workaround (#13286) 2019-08-23 11:15:40 -07:00
John Luo 3b5a9e51d2 Set Blazor Client projects to use preview 9 label 2019-08-23 10:16:56 -07:00
Ryan Brandenburg cfcffd8251 OpenAPI ServiceReference Tool (#12810)
Add ServiceReference tool
2019-08-22 11:16:16 -07:00
Pranav K 7bb56a8dba
Do not throw if RouteComparison compares two identical references
Fixes https://github.com/aspnet/AspNetCore/issues/13313
2019-08-21 13:18:41 -07:00
Kevin Pilch 733218c652
Merge pull request #13226 from aspnet/rynowak/interop-reliability
Improve reliability of reliability tests
2019-08-20 14:00:29 -07:00
Hao Kung 55b271227d Fix privacy link (#13262) 2019-08-20 09:03:06 -07:00
Pranav K 2061713b47 Use min.js files 2019-08-19 18:57:46 -07:00
Brennan Conroy 4fb2dda133 Fix AllProtocols with duplicates 2019-08-19 16:27:16 -07:00
Ryan Nowak be2a71855b Improve reliability of reliability tests
Fixes: #13086

- Fixed some wrong logging (wrong EventIds)
- Added a base class for ignitor tests
- Centralized code for capturing data in ignitor
- Make `WaitForXyz` methods return the thing they found
- Make `WaitForXyz` methods report logs on timeout
- Fix synchronization problems with some tests
- Split invalid event tests into their own class for code reuse

The main thing here is that some of the JS interop reliability tests had
causality/synchronization problems. They were either not waiting for a
render batch, or they were not *triggering* a render batch.

In addition to that, I did a general consolidation of the infrastructure
for these tests to make sure that they are all using the same set of
practices. I found and fixed cases where tests were using timeouts that
were too small (inconsistency) or where they were using non-threadsafe
data structures (these tests always involve concurrency).
2019-08-19 15:31:43 -07:00
Stephen Halter ff5c200345
Wait until after UseHttps() to read HttpProtocols (#13202)
- This makes it so ListenOptions.HttpProtocols can be set after
  ListenOptions.UseHttps() is called and still function.
2019-08-19 10:58:49 -07:00
Ryan Nowak 8035ef0a27 Add AdditionalAssemblies to Router
Adds the ability to specify multiple assemblies to the Router
component.

Prior to preview 8, the router would search all dependencies of
`AppAssembly` for routable components. We made an intentional change to
stop that. However, we haven't yet give users a way to specify multiple
assemblies if their components are split across assemblies.
2019-08-19 09:07:12 -07:00
Javier Calvarro Nelson 5678f84d60
[Blazor] Adds a version to the Circuit ID purpose (#13250)
* It prevents older payloads from being unprotected should we ever change the format.
* Follows recommended practices when using data protection.
2019-08-19 17:58:56 +02:00
Justin Kotalik 8a777e50fb Merge branch 'release/2.2' into release/3.0 2019-08-19 08:15:07 -07:00
Javier Calvarro Nelson 74b801506b
[Blazor] Enables the client to initiate blazor server-side renders (#13147)
* [Blazor] Allows multiple components as entry points
* Removes all overloads that register a component statically with aborts
  selector.
* Updates render component to have a RenderMode parameter that indicates
  how the component must render. Valid values are Static, Server, and
  ServerPrerendered.
* When using Server or ServerPrerendered we emit marker comments into
  the page that are later used by blazor.server.js to bootrstrap a
  blazor server-side application.
2019-08-17 20:44:59 +02:00
dotnet-maestro[bot] 8283e6ac2b
[release/3.0] Update dependencies from aspnet/EntityFrameworkCore (#13210)
* Update dependencies from https://github.com/aspnet/EntityFrameworkCore build 20190816.12

- Microsoft.EntityFrameworkCore.Tools - 3.0.0-preview9.19416.12
- Microsoft.EntityFrameworkCore.SqlServer - 3.0.0-preview9.19416.12
- dotnet-ef - 3.0.0-preview9.19416.12
- Microsoft.EntityFrameworkCore - 3.0.0-preview9.19416.12
- Microsoft.EntityFrameworkCore.InMemory - 3.0.0-preview9.19416.12
- Microsoft.EntityFrameworkCore.Relational - 3.0.0-preview9.19416.12
- Microsoft.EntityFrameworkCore.Sqlite - 3.0.0-preview9.19416.12

Dependency coherency updates

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

* React to breaking changes
2019-08-17 17:44:06 +00:00
Pranav K 8857746e4b
Merge pull request #13112 from aspnet/darc-release/3.0-9048d89c-e829-4684-8acd-94ef228abee6
[release/3.0] Update dependencies from 2 repositories
2019-08-16 20:09:08 -07:00
Brennan 4d0c03fe28
Fix build race (#13197) 2019-08-16 19:42:43 -07:00
John Luo fc0c26cbec Remove site-extension workarounds (#13044) 2019-08-16 19:24:06 -07:00
Doug Bunting 04b1adbc2e
Move service reference projects into Tools directory (#13185)
- start of #4914 and #4896
- make infrastructure more accessible to these projects
- update list of projects
  - run `.\eng\scripts\GenerateProjectList.ps1`
2019-08-16 19:05:37 -07:00
Pranav K 5bc79e8449
Ignore overriden properties in component parameters (#13198)
* Ignore overriden properties in component parameters

* Modify MemberAssignment to return shadowed properties, but not inherited properties
* Modify ComponentProperties to throw if a Parameter property is non-public

Fixes https://github.com/aspnet/AspNetCore/issues/13162
2019-08-16 17:53:55 -07:00
Doug Bunting c0d5248fb4 Refine service reference warnings and errors
- #12792
- client:
  - add error if OpenAPI file does not exist
  - separate unsupported TFM case from targets being called when disabled
- server:
  - generalize multi-targeting handling in Microsoft.Extensions.ApiDescription.Server
    - add `$(_OpenApiGenerateDocumentsTFM)`, the TFM used when invoking inner build
    - default `$(OpenApiGenerateDocuments)` to 'true' only when a supported TFM exists
  - add separate error for non-existent cache file in `OpenApiGetDocuments` target
  - add error in `GetDocumentInsider` if no documents are found
    - make `<Warning />` in the targets file an `<Error />`
    - add more text to existing `ServiceNotFound` error
- both:
  - write errors to `stderr`
  - clean up top-level output for `Exception`s
    - stop writing the `Message` twice

* Correct "Open API" mentions; should be "OpenAPI"
  - change package tags and comments

* Add service reference projects to MvcNoDeps.slnf

nits:
- add "service reference" tag in Microsoft.Extensions.ApiDescription.* packages
- add "document generation" tag in Microsoft.Extensions.ApiDescription.Server package
- `.Trim()` TFM properties because `<TargetFrameworks>;netcoreapp3.0;;</TargetFrameworks>` is allowed
- don't use bold black for verbose messages
- reorder MSBuild property settings for readability
2019-08-16 16:55:56 -07:00
Pranav K 895dfb40fc
Fixup template 2019-08-16 15:34:58 -07:00
Ryan Nowak aafb0813e6 Rename DOM types and change namespace
Fixes: #12553

This change renames all of our browser/DOM specific types from
`UIFooEventArgs` to `FooEventArgs` and puts the in the `.Web` namespace.

In addition to this, we're moving `EventHandlers` and `BindAttributes`
to the same. This has the impact of scoping the mappings those classes
provide based on the `.Web` namespace.

This means that we now expect `.Web` to be present as a using in
basically all contexts for a browser-based Blazor app. Updated
templates, samples and tests. I'll also need to update about a million
tests in the compiler codebase.

I've logged https://github.com/aspnet/AspNetCore.Docs/issues/13832 to
track the docs and release notes part of this work.
2019-08-16 14:34:34 -07:00
Ryan Nowak 3b51b55176 Create CircuitSecret
Fixes: #13012

This change introduces a circuit id 'secret' as the concept that's used when
doing handshaking between the client and the server, and makes CircuitId
(visible to user-code) a separate concept (not a secret, can't be used
to open a connection).

The scope of this grew once I realized that we probably shouldn't be
logging Circuit Secret in so many places, we should be logging CircuitId
as the piece of data we use for correlation, and try to keep the secret
out of logs except where really necessary (and with trace level).

I ended up creating a new type to represent the combination of the
circuit id and secret and prevent
accidental misuse, and then chased down all of the build errors.

As an extra detail, the circuit id is part of the data-protected payload
that's used as the secret. This way we can always get the id back from
the secret without any external storage.
2019-08-16 08:19:38 -07:00
Pranav K 203caa020f
React to more changes 2019-08-16 07:16:14 -07:00
Pranav K 029e455e7b
Remove ref:suppressField 2019-08-15 23:00:46 -07:00
Ryan Nowak 7f054152db Move public rendering types to .RenderTree
Fixes: #12552

We're not documenting these types for public use in this release. We
already have an analyzer implemented to chase you away from taking a
dependency.
2019-08-15 20:14:59 -07:00
Justin Kotalik 3e08d453fe fix xunit namespace 2019-08-15 17:05:17 -07:00
Justin Kotalik b79e9aac36 refs 2019-08-15 17:03:19 -07:00
Justin Kotalik 829f893f29 React to extensions changes 2019-08-15 17:03:19 -07:00
Pranav K 98c8988baa React to JSRuntime changes 2019-08-15 17:02:56 -07:00
N. Taylor Mullen f890c9104c Improves further on Blazor reconnection experience.
- Expanded `ReconnectDisplay` to have a `rejected` method on it. This is the method that indicates we will never be able to reconnect to the server. By default we provide a nice little message letting users know that reconnection is no longer possible and that a refresh must take place.
- Added a logger to the `DefaultReconnectionDisplay` since part of its job is handling `Retry` clicks which indirectly call `reconnect()`. Therefore, it needed the ability to log information to the console to inform users why certain reconnects were not possible.
- Updated the `UserSpecifiedDisplay` to have a `refused` understanding. Added a new CSS class to represent the `refused` state as well.
- Updated existing tests to abide by the new `ReconnectDisplay` structure
- Added a new test to validate that the `refused``ReconnectDisplay` method results in proper behavior.

#12442
2019-08-15 14:17:35 -07:00
Pranav K b2a0b02e35
Update runtime compilation to target CSharpLang v8.0 by default (#13110)
Fixes https://github.com/aspnet/AspNetCore/issues/9129
2019-08-15 09:18:41 -07:00
Justin Kotalik 417cba2d50 Microsoft.AspNetCore.App =>Ref in the platform manifest (#13129) 2019-08-15 08:48:06 -07:00
Justin Kotalik f70eef0db1
I don't know how to write debug asserts (#13134) 2019-08-15 08:27:39 -07:00
N. Taylor Mullen 10452bf783 Improve Blazor reconnection experience.
- Updated text of reconnect dialog to be more clear.
- Added user feedback to the `Retry` event button click. The current flow is `Attempting to reconnect` -> `Failed to reconnect ... [Retry]` -> Click Retry -> `Attempting to reconnect`.
- Found that in cases where the server went away entirely the reconnect event would through unexpectedly preventing the reconnect display from handling a failed reconnect. Added a separate error flow to understand when the server went away/could not start a SignalR connection to.
- Could not find a great way to add tests for this scenario.

Addresses #12442
2019-08-14 16:27:00 -07:00
Ryan Nowak 13fc89ce49 Dispose DI scope with async support in circuit host
Fixes part of #12918

This fixes the part of this issue that we're going to be able to do in
3.0 safely.
2019-08-14 15:24:02 -07:00
N. Taylor Mullen e5a950de97 Re-enable reconnection failed invocation validation test.
- Relaxed the `maxRetries` and `retryIntervalMilliseconds` parameters to enable the test to complete quicker. Couldn't reproduce a failure even as the test is originally on my own Mac.

#12578
2019-08-14 14:47:33 -07:00
Ajay Bhargav Baaskaran c605d6cf63
Don't release SemaphoreSlim when it is canceled (#12818)
* Don't release SemaphoreSlim when it is cancelled

* fixed tests

* Rebased

* Updated ref

* mark test as flaky
2019-08-14 12:40:44 -07:00
Ryan Nowak 1f7d59d8f1 Remove IComponentContext
Fixes part of: #12553

We don't believe that this is needed anymore. We no longer call
OnAfterRender when you're prerendering, so the main use case of this
type is gone.
2019-08-14 12:06:05 -07:00
Pranav K a285e966e3
Mark InteropReliabilityTests flaky again (#13130) 2019-08-14 11:15:17 -07:00
John Luo ed360e171a fix npm flake (#13106) 2019-08-14 07:48:34 -07:00
Javier Calvarro Nelson 74c09470c6
[Blazor][Fixes #12056] Avoid producing warnings for bad inputs.
* Does not produce warnings when receiving invalid event arguments.
* Does not produce warnings when receiving an invalid event handler id.
* Does not produce warnings when receiving an ack for an unknown batch.
2019-08-14 13:01:53 +02:00
Mikael Mengistu e7a1dc620b
Update SignalR Sample (#13078) 2019-08-13 15:12:31 -07:00
Justin Kotalik 2217be2826 Skip/disable tests in 2.2 for IIS (#12985)
* Skip/disable tests in 2.2 for IIS

* Update ServicesTests.cs
2019-08-13 14:00:33 -07:00
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