Commit Graph

37576 Commits

Author SHA1 Message Date
Steve Sanderson 5315446054 Avoid UI flickering during transition from prerendered to live content 2019-02-22 16:25:44 +00:00
Pranav K 6a57218e14 Remove more references to JSRuntime.Current 2019-02-21 23:11:45 -08:00
Ryan Brandenburg 511538a19e
Revert bad merge in React app (#7769) 2019-02-21 21:46:27 -08:00
Nate McMaster 8a0adf1cfc
Ensure build manifest has a consistent URI, despite what AzDO says (#7829) 2019-02-21 16:44:26 -08:00
Javier Calvarro Nelson 2d9cba86fd [Components] Prerrendering startup experience (#7770)
[Components] Prerrendering startup experience
* Introduces an IComponentPrerrenderer to handle Prerrendering
  * MVC registers a basic static prerrrenderer.
  * Components registers a more feature complete prerrender that will
    handle reconnection to the original circuit after prerrendering in
    the future to allow for prerrendered interactive components.
* Removes UseRazorComponents
  * Removes the SPA fallback in favor of a catch all route in
    Index.cshtml
  * Moves the framework files to be served by the default StaticFiles
    middleware in the pipeline by way of plugging specific providers
    through options.
  * Lifts UseSignalR(r => r.MapHub<ComponentHub>()) into startup and
    replaces it with a shorthand for MapHub using endpoint routing.
  * Adds extension methods to map components to selectors for a given
    hub.
* Updates the razor component templates to include prerendering and use a razor page as the entry 
   point.
2019-02-21 16:26:44 -08:00
Javier Calvarro Nelson ea97934127 [Templating]Api authorization spa integration (#7721)
[Templating] Adds authentication support for the SPA templates
* Adds a new -auth option to the Angular and React templates with None and Individual values.
* When using authentication it configures the server to use the ApiAuthorization support built for 3.0
* For angular it adds an ApiAuthorization Angular module that handles the authentication flows through 
   a Login and a Logout components and exposes an Http client interceptor, a routing guard and a Login 
   menu component for the main Angular application to integrate authentication into the app.
* For react it adds a Login and Logout components to handle the authentication flows, an 
  AuthorizeRoute component to protect access to other routes and a Login menu component to 
  integrate authentication into the application.
2019-02-21 16:23:55 -08:00
John Luo 2fd9e40b58 Merge branch 'release/3.0-preview3' 2019-02-21 16:01:22 -08:00
Artak Mkrtchyan 26006e5b10 Updated the survey link for 0.9 release 2019-02-21 15:40:16 -08:00
BrennanConroy 6a06bf8532
Skip RunsWithIterationEnvVariable (#7814) 2019-02-21 15:31:40 -08:00
John Luo 4c0b114b12
Add gRPC templates (#7561) 2019-02-21 15:12:13 -08:00
Pavel Krymets 9355c7c1a5
Add reference assemblies support (#7764) 2019-02-21 14:33:35 -08:00
Ryan Nowak ebb527d347 [wip] Update Razor SDK and resolve issues
I'm still chasing one more issue.

(cherry picked from commit 616a4a36f5)
2019-02-21 11:42:23 -08:00
Nate McMaster 4451a80447
Merge branch 'release/3.0-preview3' 2019-02-21 10:30:11 -08:00
Nate McMaster 7a87e8c6a7
Re-enable building runtime packs
Also, sort debug output in SharedFx tests for improved readability
2019-02-21 09:38:11 -08:00
JulijaRamoskiene e5f4400257 FormFeature -Added exception for invalid content-disposition header (#7525) 2019-02-21 09:38:06 -08:00
Nate McMaster fbaa3e8b77
Always kill processes and remove direct reference to component governance task (#7793) 2019-02-21 09:29:42 -08:00
Nate McMaster 6252351da7
Targeting pack and shared framework fixups (#7794)
* Fix package type to match spec ('DotnetPlatform')
* Fix missing metadata in MSI installer
* Fix incorrect target order which caused duplicate assemblies in netcore.app and aspnetcore.app
2019-02-21 09:28:58 -08:00
Ryan Nowak 616a4a36f5 [wip] Update Razor SDK and resolve issues
I'm still chasing one more issue.
2019-02-21 09:14:17 -08:00
Pranav K 51e2bea403
Throw if CORS policy is configured to allow credentials and any origin (#7751)
* Throw if CORS policy is configured to allow credentials and any origin

Fixes https://github.com/aspnet/AspNetCore/issues/3106
2019-02-21 09:06:00 -08:00
Pranav K 5418698f39 Disable CORS functional tests from running in parallel
Fixes https://github.com/aspnet/AspNetCore-Internal/issues/1845
2019-02-21 06:20:11 -08:00
Doug Bunting 6d8c8f8c64 Update package branding to 3.0.0-preview4 (#7748) 2019-02-20 18:28:41 -08:00
Pranav K cc60fa9a18 Ensure templates are packed in the Blazor VSIX 2019-02-20 16:19:45 -08:00
Pranav K 60cf07f4d8 Update Blazor to 0.9 2019-02-20 16:19:45 -08:00
Ryan Brandenburg 5a7bfbbc01
Use Bootstrap 3.4.1 and 4.3.1 (#7719)
Use Bootstrap 3.4.1. and 4.3.1
2019-02-20 15:55:49 -08:00
Mikael Mengistu f33cc20dbf
Add support for Async On Delegates (#7700) 2019-02-20 15:44:54 -08:00
Nate McMaster e1d506e961
Fix codesign-xplat.yml to use the right API for setting custom build steps 2019-02-20 14:42:07 -08:00
Stephen Halter 001b6ea08a
Use .NET Core SequenceReader (#7003)
* Use .NET Core SequenceReader

Remove BufferReader and use SequenceReader<T> which now ships in CoreFX.

This is related to https://github.com/aspnet/KestrelHttpServer/pull/3068 which builds on the functionality added to the reader.

* Use var
2019-02-20 14:39:45 -08:00
Nate McMaster df9d0240b5 Add dependency to MicroBuild.Core 0.3.0 2019-02-20 21:41:41 +00:00
BrennanConroy e455c2c22b
Add negotiation response support (#7675) 2019-02-20 12:38:43 -08:00
Nate McMaster 6fea3a6e95
Show error message when activate.sh/ps1 is invoked directly instead of sourced (#7731)
Helps users avoid a common mistake which is otherwise not obvious.
2019-02-20 11:20:34 -08:00
Nate McMaster 9a2db43848
Follow-up to VS2019 conversion (#7753)
* Set VS version in file to 16.0.0.0
* Fix for restore failure on Microsoft.AspNetCore.App.Runtime.csproj
2019-02-20 11:02:38 -08:00
Nate McMaster 85ae18c723
Make Visual Studio 2019 a prerequisite to building this repo (#7005)
Changes:

* Make Visual Studio 2019 a prerequisite for building this repo
* Update .sln files
* Update Windows SDK to 17134
* Update developer docs
* Disable ANCM tests
* Update to .NET Core SDK 3.0 Preview 2
* Use Microsoft.NET.Sdk.Razor as a package consistently accross the repo
* React to changes in metadata from Microsoft.NETCore.App
* React to changes in .NET Core SDK
* Attempt to workaround CodeCheck.ps1 failure which doesn't repro locally or on different agents. Possibly due to differences in the version of the PowerShell task?
* Remove dead YML file
* Rename usages of win7-{x64,x86} to win-{x64,x86}
* Update KoreBuild to 3.0.0-build-20190219.1
2019-02-20 09:53:53 -08:00
Nate McMaster 3a785e0045
Temporarily disable Ubuntu and Debian ARM queues for distributed testing (#7747)
Helix tests is failing for everyone because these queues are not functioning. Tests timeout after several hours of waiting for agents.

Tracking https://github.com/dotnet/core-eng/issues/5261 to re-enable these agents.
2019-02-20 08:55:19 -08:00
Steve Sanderson 895e1c69e0
Components/Blazor template updates (#7709)
* In Blazor hosted template, only UseBlazorDebugging in development environment. Fixes #7275

* Enable HTTPS in the Razor Components template. Fixes #6928

* Reduce Razor Components template to one project. Fixes #6883

* Minor phrasing tweak

* In Razor Components template, change .cshtml to .razor, except _ViewImports.cshtml

* Put back LangVersion

* Update RazorComponentsTemplateTest
2019-02-20 13:16:05 +00:00
Steve Sanderson 7a2dfd3200
Components: Forms and validation (#7614) 2019-02-20 09:56:32 +00:00
Chris Ross 4e44025a52
Replace IHostingEnvironment with IWebHostEnvironment (#7725) 2019-02-19 21:11:52 -08:00
Matthias Laroche 7af971838e Set Content-Length to 0, when returning an empty body
When returning 416 RangeNotSatisfiable in FileResultExecutorBase, set the Content-Length based on the length of the body instead of the length of the original file.
Bugfix for  :
https://github.com/aspnet/AspNetCore/issues/4943
2019-02-19 17:54:11 -08:00
Matthias Laroche 134f28f71d Update FileResult tests to detect a bug for the status 416 RangeNotSatisfiable
Update FileResult tests to detect a bug for the status 416 RangeNotSatisfiable :
https://github.com/aspnet/AspNetCore/issues/4943
When the body is empty, the Content-Length header should be 0 to match the body length.
2019-02-19 17:54:11 -08:00
Nate McMaster a9c358bbbd
Build MSI installers for targeting pack (#7726)
Part of #6501 

This adds a new Windows installer for the targeting pack. It places *.dll and *.xml (docs) in `[DOTNETHOME]\packs\Microsoft.AspNetCore.App.Ref\$(version)\ref\netcoreapp3.0`.

Outputs:
* aspnetcore-targeting-pack-$(version).zip
* aspnetcore-targeting-pack-$(version)-win-x64.exe (defaults to C:\Program Files\dotnet)
* aspnetcore-targeting-pack-$(version)-win-x86.exe (defaults to C:\Program Files (x86)\dotnet)

These all include the same files. These are meant to be bundled in the .NET Core SDK installer, but can be launched directly too.
2019-02-19 16:28:08 -08:00
Doug Bunting 8d6d300bfc
Improve service reference filenames and class names (#7447)
- #4927
- fully-sanitize class names and filenames
  - use aspnet/AspNetCore-Tooling's `CSharpIdentifier` class
- default metadata in sequence [URI or project&document name ->] `%(DocumentPath)` -> `%(OutputPath)` -> `%(ClassName)`
  - if user sets metadata explicitly, the override affects defaults later in the sequence
- separate some nested validations and defaulting steps
  - provide default `%(DocumentName}` even if `%(DocumentPath}` is set explicitly
  - validate URI is absolute even if `%(DocumentPath}` is set explicitly

other:
- don't write out an empty Open API / Swagger file

nits:
- do not use default `%(DocumentName}` in default `%(DocumentPath)` for `<ServiceProjectReference>` items
- do not use empty URI path or query string in default `%(DocumentPath)` for `<ServiceUriReference>` items
2019-02-19 16:05:54 -08:00
Ryan Nowak c725089e8b Add missing conversions on EventCallbackFactory 2019-02-19 15:48:16 -08:00
BrennanConroy f37d30833d
Ignore unexpected stream items and completions from client (#7511) 2019-02-19 15:25:50 -08:00
Doug Bunting 14b7184c09
Improve documentation of `BinderType` and `BindingSource` properties (#7218)
- add regression test for #4939
- add `[BindProperty]` doc comments
- add `<remarks>` to `BinderType` properties that recommend setting `BindingSource` in some cases

smaller issues:
- catch invalid `BinderType` values up front
- complete `BindingSource.ModelBinding` implementation: `IValueProvider` filtering was faulty

nits:
- accept VS suggestions e.g. remove unused variables
- "model binder" -> `<see cref="IModelBinder" /> implementation` in some doc comments
2019-02-19 15:22:04 -08:00
Doug Bunting 3e0c75187c
Place limits on model binding collection size and recursion depth (#7214)
- #7052
- add MvcOptions.MaxModelBindingCollectionSize` and `MvcOptions.MaxModelBindingRecursionDepth`

nits:
- update syntax of a few `Resources.Designer.cs` files (I ran `/t:resx` on Mvc.sln)
- take VS suggestions in a few test classes
2019-02-19 15:17:56 -08:00
Ryan Brandenburg 69abefa06f
[Design] Harden template package installer and fix name (#7624)
Harden template package installer and fix name
2019-02-19 14:41:59 -08:00
Mikael Mengistu d1fac57734
Ensure SignalR client messages are processed in order (#7697) 2019-02-19 11:48:22 -08:00
Nate McMaster ded53315d8
Update CODEOWNERS 2019-02-19 09:32:31 -08:00
TimTim dffe9abf6b Fix connection ID (#7681) 2019-02-18 17:13:53 -08:00
Ben Adams 3e47fa7c69 Inline BufferWriter .ctor (#7674) 2019-02-17 21:30:29 -08:00
Ryan Nowak 98fe8a8328 Improvements to bind and event handling
The changes here make event dispatching (including bind) more
user-friendly by avoiding the need for manual calls to StateHasChnaged.

We also introduce a new type `EventCallback` (and `EventCallback<T>`).
This is a new primitive that is like a super-powered version of a
delegate. When writing a component that accepts delegates as parameters,
consider using `EventCallback` for the following reasons:
- Allows consumer to pass a variety of different delegate signatures
- Does proper event dispatching and error handling

Using `EventCallback` will eliminate most of the remaining cases where a
manual `StateHasChanged` is required when components are passing content
and delegates to each other.

`EventCallback` is inherently async for the reason that this is really
the only way to provide correct error handling.

-----

The fix for this will be two-phase by first creating a set of APIs that
can be targeted by the compiler that has the desired behaviour and then
updating the compiler to target this new infrastructure.
2019-02-17 15:58:08 -08:00