Commit Graph

15610 Commits

Author SHA1 Message Date
Nate McMaster 21bdedbe4f
Merge release/2.1 into release/2.2 2018-12-21 12:38:10 -08:00
Ben Adams ef341c610f Use ref extensions as ref extensions (#6058) 2018-12-21 12:11:32 -08:00
dotnet-bot d13dd578f8 Merge in 'release/2.1' changes 2018-12-21 19:44:18 +00:00
Nate McMaster 3641761d18
Convert AADIntegration projects to ProjectRef (#6082) 2018-12-21 11:43:09 -08:00
Ajay Bhargav Baaskaran af2461d524 Merge branch 'release/2.1' into release/2.2 2018-12-21 11:38:25 -08:00
dotnet-bot 0ec3101fe1 Merge in 'release/2.2' changes 2018-12-21 19:03:24 +00:00
Justin Kotalik f1b125d69f
Restore IISIntegration Unit test project (#6068) 2018-12-21 11:02:18 -08:00
dotnet-bot 2ef7d55ef8 Merge in 'release/2.1' changes 2018-12-21 18:59:15 +00:00
Justin Kotalik 37291ea114
Fix IISIntegration folder structure (#6063) 2018-12-21 10:58:10 -08:00
Nate McMaster 354c636498
Update Windows installer projects to use ProjectReference (#6078)
Changes:
* Build installer projects in parallel.
* Use `ProjectReference` to ferry bits between installer projects.
* Don't build wixproj to a unified output directory. This was only done to simplify finding file paths to MSI's built by other projects, but ProjectRef solves that.
* Add a VS solution for working on wixproj and the associated C++ custom actions.
   * To make wixproj work in VS, I replaced default globs with listing .wxs and .wxl files in the wixproj file.
* Add a target to copy the installers to the artifacts directory according to the layout described in /docs/Artifacts.md
2018-12-21 09:44:31 -08:00
dotnet-bot 10953c65c7 Merge in 'release/2.1' changes 2018-12-21 08:12:24 +00:00
Justin Kotalik 80bb14c3ef
Change build components to C++ Win10 17134 SDK (#4603) 2018-12-21 00:11:06 -08:00
dotnet-bot f94a5f6fd0 Merge in 'release/2.1' changes 2018-12-21 07:52:15 +00:00
Justin Kotalik ce481c6c79
Make JavaScriptServices use ProjectReference (#5953) 2018-12-20 23:50:53 -08:00
Nate McMaster 2af766db49
Stop producing unused package archives (#6073)
The following package archives which are no longer used by partner teams. It is expected that these will be replaced by targeting packs.

* LZMA (was used by dotnet-cli)
* Package zips (ended up not getting used by anyone)
* Compat package zips (was used by Azure Web Apps)
2018-12-20 20:07:40 -08:00
alenros 92adad62e3 Cleanup doc comment grammar and some debugging leftovers (#6065) 2018-12-20 17:39:02 -08:00
Nate McMaster 92b40a4dbc
Restore accidental deletion of common.psm1 2018-12-20 17:34:06 -08:00
dotnet-bot 594e4c4c35 Merge in 'release/2.2' changes 2018-12-21 01:28:47 +00:00
Nate McMaster c3beb1f9b1
build.cmd/sh changes (#5958)
Update the build scripts to support building subfolders or subgroups of projects

* Add build scripts for ci
* Remove obsolete scripts
* Add flags like --test and --pack to control running just test or packaging
* Add flags like --managed and --native to control building sub-types of projects
* Remove KoreBuild bootstrapper flags
* Update to extensions 3.0.0-preview.18619.1 (needed to get a fix for aspnet/Extensions#815 to make this change work on MSBuild.exe)
2018-12-20 16:52:15 -08:00
Justin Kotalik d9cf76f63d Merge release/2.1 into 2.2 2018-12-20 16:51:06 -08:00
dotnet-bot 108fa3f911 Merge in 'release/2.1' changes 2018-12-21 00:28:36 +00:00
Ajay Bhargav Baaskaran 7f17d095d8
Convert Mvc to use Reference (#6047)
* Convert Mvc to use Reference

* Use ProjectReference for test assets
2018-12-20 16:27:32 -08:00
Pavel Krymets d73d6e8546
Fix GetDllDirectory on 2008 (#6066) 2018-12-20 16:02:04 -08:00
Pavel Krymets 45d1c054b2
Add IServerAddressesFeature support (#4685) 2018-12-20 15:29:49 -08:00
James Newton-King 5ab3c89be3
Add health checks routing extensions (#5127) 2018-12-21 11:18:44 +13:00
James Newton-King 28cf059a3d
Sort endpoint pattern with OrdinalIgnoreCase (#6059) 2018-12-21 10:47:37 +13:00
James Newton-King dbf1dca723
Fix HttpContext not being passed to constraints in link generation (#6045) 2018-12-21 10:19:03 +13:00
dotnet-bot 47325a6419 Merge in 'release/2.1' changes 2018-12-20 20:23:06 +00:00
Hao Kung efe9b95b14
Improve cdn test reliability (#6044) 2018-12-20 12:21:30 -08:00
James Newton-King 1ad77cf94e
Merge branch 'master' of https://github.com/aspnet/AspNetCore 2018-12-21 09:12:33 +13:00
noslaver 5475c6c6a3 removed IPEndPointParser (#6051) 2018-12-20 11:34:19 -08:00
James Newton-King 4b12d917ae
Merge branch 'release/2.2' 2018-12-21 07:57:52 +13:00
dotnet-bot 94a236e196 Merge in 'release/2.1' changes 2018-12-20 18:55:13 +00:00
Nate McMaster 686ce02cc8
Remove code for building an analyzers package that never shipped (#6053)
Microsoft.AspNetCore.Analyzers didn't ship in 2.1, and we don't have plans to every ship it in a 2.1.x release.
2018-12-20 10:53:42 -08:00
dotnet-bot 6772da9d90 Merge in 'release/2.2' changes 2018-12-20 18:35:02 +00:00
James Newton-King 4601a26ec2
Fix order in DFA matcher test (#5954) 2018-12-21 07:33:54 +13:00
Pavel Krymets 19c8980deb
Move SiteExtension sdk into AspNetCore (#6041) 2018-12-20 10:25:35 -08:00
James Newton-King 705bf63f1c
React to routing and update MVC dependencies (#6046) 2018-12-21 07:20:15 +13:00
Pavel Krymets 72830ea943
Set current directory by default (#4798) 2018-12-20 10:19:55 -08:00
Nate McMaster 163350e968
Remove Microsoft.Extensions.DiagnosticAdapter from the shared framework (#6042) 2018-12-19 16:39:50 -08:00
Nate McMaster c5a6284aa8
Remove JwtBearer and OIDC authentication from the shared framework
These are being pulled out of the shared framework and will ship as NuGet packages. These assemblies have a dependency on the IdentityModel APIs which do no yet fit the guidelines the shared framework.

cref aspnet/AspNetCore#3755
2018-12-19 14:53:12 -08:00
Chris Ross 03867f08ab
Use new generic host UseDefaultServiceProvider call (#5703) 2018-12-19 12:17:58 -08:00
Pavel Krymets 55b8818540
Move logging site extension (#4005) 2018-12-19 09:35:06 -08:00
Stephen Halter af1a6eca81 Add more timeouts to Http2TestBase (#5955) 2018-12-19 08:52:39 -08:00
dotnet-maestro-bot 7b77332441 [automated] Merge branch 'release/2.2' => 'master' (#5892) 2018-12-18 22:43:32 -05:00
dotnet-bot 66d35bd153 Merge in 'release/2.2' changes 2018-12-18 23:48:35 +00:00
Justin Kotalik de954ce702
Fixing IIS Tests (#5682) 2018-12-18 18:46:56 -05:00
Ajay Bhargav Baaskaran ffec555118 Added missed files 2018-12-18 15:35:38 -08:00
Ajay Bhargav Baaskaran b0b8986a19 Use shared source 2018-12-18 15:03:27 -08:00
Ajay Bhargav Baaskaran eeabafa68f Merge branch 'temp' into ajbaaska/merge-master 2018-12-18 14:44:25 -08:00
dotnet-bot d481817289 Merge in 'release/2.2' changes 2018-12-18 22:33:43 +00:00
James Newton-King 03cb4a6e14
Add missing dependencies to the MVC dependencies.props (#5714) 2018-12-19 11:32:23 +13:00
Ajay Bhargav Baaskaran cef4e1aceb Added correct test TFMs 2018-12-18 13:06:20 -08:00
Pavel Krymets e6e5d09369
Fix LoggedTest failures (#5525) 2018-12-18 12:59:14 -08:00
Ajay Bhargav Baaskaran 8ef37dfbca Merge branch 'release/2.2' 2018-12-18 12:56:29 -08:00
Ajay Bhargav Baaskaran 2a696f6a1c Merge branch 'release/2.2' 2018-12-18 12:50:01 -08:00
dotnet-bot 967f551968 Merge in 'release/2.2' changes 2018-12-18 20:38:50 +00:00
Stephen Halter 21ef9f3c39
Revert "Fix flakiness in RequestsCanBeAbortedMidRead (#4881)" (#5708)
This was never supposed be be merged into release/2.2 or master since both those branches include aspnet/KestrelHttpServer#2844.

This reverts commit 019ba081d3.
2018-12-18 12:37:25 -08:00
dotnet-bot fe0d8ca083 Merge in 'release/2.1' changes 2018-12-18 20:01:33 +00:00
John Luo 0cbc52ca15 Convert ServerTests to Reference and move to Server folder (#4686) 2018-12-18 14:59:47 -05:00
Nate McMaster 335c9be7b4
Update the artifacts directory organization and simplify publishing targets (#5701)
This simplifies the way that we publish files to our network drop share.

Changes:
* Instead of explicitly listing every file that needs to publish, use directories to classify packages and artifacts into different categories.
* Add documentation for the expected layout of artifacts/
* Remove the need for static analysis to determine which packages go to which project
* Add the MSBuild property "IsProductPackage" to .csproj files which ship as a package to NuGet.org.
2018-12-18 11:40:13 -08:00
dotnet-bot 9dda9a3e2a Merge in 'release/2.2' changes 2018-12-18 18:58:34 +00:00
Steve Sanderson ceb1c8e562
Refactor Components.Browser package (#5166)
* Add empty Microsoft.AspNetCore.Blazor project

* Reorganize Blazor-specific parts of .Components.Browser into Microsoft.AspNetCore.Blazor. Delete redundant Components-CSharp template (it now ships from Templating).

* Fix unit test

* Add missing assembly description

* Move WebAssemblyBlazorApplicationBuilder

* Rename BrowserHttpMessageHandler -> WebAssemblyHttpMessageHandler

* Delete obsolete BrowserServiceProvider. Rename BrowserRenderer -> WebAssemblyRenderer.

* Rename BrowserUriHelper -> WebAssemblyUriHelper

* Remove redundant ActivateMonoJSRuntime helper

* Fix namespace

* Remove redundant MicrosoftNETCoreAppPackageVersion override

* Update test namespaces
2018-12-18 12:32:57 +00:00
Ajay Bhargav Baaskaran 647fbbac7b Merge branch 'release/2.1' into ajbaaska/merge-22 2018-12-17 18:40:08 -08:00
Nate McMaster 0cd79cc4c1
Remove unused VS dependencies and old versions of .NET Core from dependencies (#5317)
As a result of removing Razor's VS projects and upgrading all projects to netcoreapp3.0, we no longer need dependency variable for .NET Core 1.x and 2.x and Visual Studio packages.

Changes:
* Remove 'StandardTestTfm'
* Remove variables for .NET Core 1.0, 1.1, 2.0, 2.1, and 2.2
* Remove VSIX variables
* Stop generating 'branding.props' - this hasn't been used in a while and is no longer needed
2018-12-17 16:28:33 -08:00
John Luo 62351067ff Merge remote-tracking branch 'origin/master' 2018-12-17 15:16:28 -08:00
John Luo b8db81898a Merge remote-tracking branch 'origin/master' 2018-12-17 15:16:21 -08:00
Doug Bunting f113a20dfd Remove remaining `CompatibilitySwitch<T>` properties
- #4866 3 of 3
- other than ignored parameters and properties, no vestige remains of alternate behaviours
- also remove `AllowAreas` use outside src/Mvc
- left the `IEnumerable<ICompatibilitySwitch>` implementations to avoid `breakingchanges.netcore.json` churn
  - made the implementations more consistent
- left one `ConfigureCompatibilityOptions<MvcOptions>` subclass: `MvcOptionsConfigureCompatibilityOptions`
- note `AllowShortCircuitingValidationWhenNoValidatorsArePresent` default now applies to `TryValidateModel(...)` etc.

nits:
- updated `CompatibilityVersion` doc comments
- "currently unused" -> "currently ignored" in doc comments from part 2
- took a few VS suggestions
- VS seems to have cleaned up some trailing whitespace in files I had opened but didn't manually change
2018-12-17 14:47:49 -08:00
Pavel Krymets db0c347c23
Change testassets location (#5416) 2018-12-17 14:45:40 -08:00
John Luo 98636fed6d Merge branch 'release/2.2' 2018-12-17 14:24:30 -08:00
Doug Bunting e717a8443e
Update last few projects to target `netcoreapp3.0` (#5128)
- #3754
- remove `#if`'s for multi-targeting where source is never multi-targeted
- left `StreamPipeReader`, `StreamPipeWriter` and their test classes alone because they're moving to CoreFx
2018-12-17 12:30:28 -08:00
dotnet-bot ff4db87283 Merge in 'release/2.1' changes 2018-12-17 20:11:45 +00:00
Ajay Bhargav Baaskaran b079041488
Convert Razor to use Reference (#4954) 2018-12-17 12:10:40 -08:00
James Newton-King 443b1449ff
Update Newtonsoft.Json to 12.0.1 and Newtonsoft.Json.Bson to 1.0.2 (#5122) 2018-12-18 08:55:37 +13:00
BrennanConroy d368da3df1 Fix IE11 split (#5056) 2018-12-17 10:47:01 -08:00
Artak Mkrtchyan 439a9598e8 Updated samples to referenced 3.4.0 version of Bootstrap 2018-12-17 09:55:54 -08:00
Artak Mkrtchyan 42afbd12d9 Updated Bootstrap v3 dependency 2018-12-17 09:55:54 -08:00
James Newton-King cc899e2be7
Move EndpointModel and IEndpointConventionBuilder to HTTP abstractions (#4274) 2018-12-17 18:38:49 +13:00
Doug Bunting 708dc5cb5a
Remove many `CompatibilitySwitch<T>` properties (#4628)
- #7156 2 of 3
- will leave the `IEnumerable<ICompatibilitySwitch>` implementations to avoid `breakingchanges.netcore.json` churn
- will leave one `ConfigureCompatibilityOptions<MvcOptions>` subclass: `MvcOptionsConfigureCompatibilityOptions`
- a few options remain as regular properties:
  - `ApiBehaviorOptions.SuppressMapClientErrors` (default `false`)
  - `MvcOptions.EnableEndpointRouting` (default `true`)
  - `MvcOptions.MaxValidationDepth` (default `32`)
  - `MvcJsonOptions.AllowInputFormatterExceptionMessages` (default `true`)

nits:
- move `IsEffectivePolicy(...)` check earlier in `AuthorizeFilter`
- correct a typo or two
2018-12-16 19:33:27 -08:00
Doug Bunting 826f950530 Delete src/MvcPrecompilation/**
- out-of-date and no longer shipped
- related to #3754
2018-12-16 18:29:51 -08:00
Chris Ross 6046ad27f6
Remove handle inheritance workaround Kestrel/#3040 (#5000) 2018-12-15 13:33:13 -08:00
dotnet-bot c3a269adc3 Merge in 'release/2.2' changes 2018-12-15 01:29:18 +00:00
John Luo da72ac62ba Merge remote-tracking branch 'origin/release/2.2' into release/2.2 2018-12-14 16:52:45 -08:00
dotnet-bot 918dc51a1f Merge in 'release/2.1' changes 2018-12-15 00:27:56 +00:00
Stephen Halter 019ba081d3
Fix flakiness in RequestsCanBeAbortedMidRead (#4881)
Addresses aspnet/AspNetCore-Internal#1521
2018-12-14 16:26:54 -08:00
dotnet-bot a6112bf0dd Merge in 'release/2.2' changes 2018-12-15 00:05:19 +00:00
Nate McMaster 3c09d644cc
Merge branch 'release/2.2' 2018-12-14 16:04:56 -08:00
Nate McMaster 9183145474
Fix package layout for ANCM packages (#5119) 2018-12-14 16:04:15 -08:00
Nate McMaster 02780bac26
Merge branch 'release/2.2' 2018-12-14 16:03:16 -08:00
John Luo f659f0acce Merge branch 'release/2.1' into release/2.2 2018-12-14 15:48:40 -08:00
dotnet-bot 97ee5cbcac Merge in 'release/2.1' changes 2018-12-14 22:50:26 +00:00
Justin Kotalik 68f0aff144 security to project ref (#4618) 2018-12-14 14:49:23 -08:00
Javier Calvarro Nelson 436b5461ad
[Components] Create a renderer to render components into HTML (#4463)
* Adds an HtmlRenderer to Microsoft.AspNetCore.Components
 * It renders the component into a list of strings.
 * It only handles synchronous rendering.
2018-12-14 21:28:05 +01:00
dotnet-bot 9b1be901d3 Merge in 'release/2.2' changes 2018-12-14 19:43:29 +00:00
Nate McMaster 6402a6a971
Fix aspnet/AspNetCore-Internal#1503 - ensure ANCM packages are code signed 2018-12-14 11:41:56 -08:00
Ryan Nowak a7f6154520 Workaround #4804
This is a workaround for a workaround that currently have in d16p1.

The Razor SDK maps all netcoreapp3.0 projects to MVC-2.1 at design time,
however this only really works if you have the Razor.Design package.
Since we have internal builds available that support MVC-3.0 we can just
manually hardcode the correct targeting of the project.
2018-12-14 11:15:32 -08:00
dotnet-bot 8b682dfe85 Merge in 'release/2.2' changes 2018-12-14 19:01:05 +00:00
James Newton-King 6dc28d8a4e
Update CORS middleware to use endpoint metadata (#4460) 2018-12-15 07:51:22 +13:00
Steve Sanderson 6187e628af
linking to some existing docs (#4592) 2018-12-14 18:50:57 +00:00
Steve Sanderson ec9676f51e
Make component parameter analyzer allow public getters. Imported from Blazor PR 1702. (#4594) 2018-12-14 18:50:45 +00:00
Nate McMaster feb641ddda
Merge branch 'release/2.1' into release/2.2 2018-12-14 09:44:15 -08:00
Steve Sanderson d30c407dd0
Support IServiceProviderFactory in WebAssemblyHostBuilder (imported from Blazor PR 1623) (#4785) 2018-12-14 17:37:14 +00:00
Chris Ross 54c1122582
Change HTTP projects to target netcoreapp3.0 #3754 (#4625) 2018-12-14 09:36:57 -08:00
Steve Sanderson 343208331d
Replace AssignToProperties with SetParameterProperties, which also clears unspecified parameter properties (imported from Blazor PR 1108) (#4797) 2018-12-14 17:07:07 +00:00
Steve Sanderson 3757908b14
Fallback for Components router (imported from Blazor PR 1534) (#4794) 2018-12-14 17:06:47 +00:00
Steve Sanderson e768a78c2b
Ensure ComponentBase async lifecycle methods return non-null task (imported from Blazor PR 1620) (#4790) 2018-12-14 17:06:30 +00:00
Steve Sanderson 8a9df6c873
HttpClientJsonExtensions better handling for failed requests (imported from Blazor PR 1660) (#4788) 2018-12-14 17:06:03 +00:00
Steve Sanderson 93127b39e8
Overload UriHelper to forceLoad the page (imported from Blazor PR 1154) (#4786) 2018-12-14 17:05:45 +00:00
Steve Sanderson 8fbb9fb0e6
Add support for binding decimal? double? float? long? int? bool? (imported from Blazor PR 1658) (#4600) 2018-12-14 17:05:22 +00:00
Steve Sanderson 1e404a5acf
fix for dispose (#4596) 2018-12-14 17:04:41 +00:00
Steve Sanderson 71bcac06ad
fixing type of property Detail based on standard. (#4595) 2018-12-14 17:04:26 +00:00
dotnet-bot 6133fa4dd6 Merge in 'release/2.1' changes 2018-12-14 16:37:44 +00:00
Nate McMaster 13ae0057fb
Replace .Sources package references with local code (#4801)
Replaces package references the following packages with local code:

Microsoft.AspNetCore.Certificates.Generation.Sources
Microsoft.Extensions.CopyOnWriteDictionary.Sources 
Microsoft.Extensions.ClosedGenericMatcher.Sources
Microsoft.Extensions.ObjectMethodExecutor.Sources
Microsoft.Extensions.PropertyActivator.Sources
Microsoft.Extensions.PropertyHelper.Sources
Microsoft.Extensions.RazorViews.Sources
Microsoft.Extensions.SecurityHelper.Sources
Microsoft.Extensions.StackTrace.Sources
Microsoft.Extensions.WebEncoders.Sources
2018-12-14 08:36:36 -08:00
Ryan Nowak 341636b05d Convert Razor to netcoreapp3.0 2018-12-14 08:17:27 -08:00
dotnet-bot 45dca6d8d4 Merge in 'release/2.2' changes 2018-12-14 09:22:46 +00:00
James Newton-King dd662ed2a7
Fix compiling Mvc.sln in 2.2 (#4955) 2018-12-14 22:21:44 +13:00
dotnet-bot 3b0d1253e1 Merge in 'release/2.2' changes 2018-12-14 08:57:43 +00:00
Nate McMaster 206db0558e
Update buildtools and add properties to skip IIS tests 2018-12-13 23:36:42 -08:00
Nate McMaster f0990ec531
Fix build issues with IIS integration projects
Changes:
* Ensure IIS managed and pkg projects build after the native projects
* Update projects to build test
* Update CI checks to build on macOS and Linux
* Use package baselines to manage ANCM packages
2018-12-13 22:53:31 -08:00
Nate McMaster 4998ad8622
Merge branch 'merge/release/2.1-to-release/2.2' into release/2.2 (#4619) 2018-12-13 22:24:21 -08:00
Justin Kotalik 6adfa32402
Merge branch 'release/2.1' into release/2.2 2018-12-13 22:12:19 -08:00
BrennanConroy 74dbb4ff4f
Register callback before start (#4581) 2018-12-13 21:30:48 -08:00
BrennanConroy 4950495dc4
Fix IE 11 handshake split (#4575) 2018-12-13 21:30:17 -08:00
Ajay Bhargav Baaskaran 59ada30959 Merge branch 'ajbaaska/merge-22-to-master' 2018-12-13 17:34:41 -08:00
Mikael Mengistu 42afc62acf
Update src/Middleware/CORS/test/FunctionalTests/CorsMiddlewareFunctionalTest.cs
Co-Authored-By: ajaybhargavb <ajaybhargavb@gmail.com>
2018-12-13 16:51:00 -08:00
Nate McMaster 538af1091c
Update src/Middleware/CORS/test/FunctionalTests/CorsMiddlewareFunctionalTest.cs
Co-Authored-By: ajaybhargavb <ajaybhargavb@gmail.com>
2018-12-13 16:39:37 -08:00
Nate McMaster 6e3e48d456
Update src/Middleware/CORS/test/FunctionalTests/CorsMiddlewareFunctionalTest.cs
Co-Authored-By: ajaybhargavb <ajaybhargavb@gmail.com>
2018-12-13 16:39:27 -08:00
Ben Adams b2731d652d .IndexOf(...) >= 0 to .Contains(...) (#4688) 2018-12-14 12:40:09 +13:00
Cédric Luthi 4a9a96cef7 Make the ResultStatusCodes property null-resettable 2018-12-13 14:09:21 -08:00
Cédric Luthi 74d900ea56 Add setter to HealthCheckOptions.ResultStatusCodes
All other properties (`Predicate`, `ResponseWriter` and `AllowCachingResponses`) have a setter but `ResultStatusCodes` doesn't.

Without a setter, reusing the same status to http status code mapping is impossible and leads to duplicate code that looks like this:

```csharp
private static void ConfigureHealthChecks(IApplicationBuilder app, HealthCheckServiceOptions options)
{
    app.UseHealthChecks("/health", new HealthCheckOptions
    {
        ResultStatusCodes =
        {
            [HealthStatus.Healthy] = StatusCodes.Status200OK,
            [HealthStatus.Degraded] = StatusCodes.Status400BadRequest,
            [HealthStatus.Unhealthy] = StatusCodes.Status503ServiceUnavailable
        }
    });
    foreach (var name in options.Registrations.Select(e => e.Name))
    {
        app.UseHealthChecks($"/health/{name}", new HealthCheckOptions
        {
            Predicate = registration => registration.Name == name,
            ResultStatusCodes =
            {
                [HealthStatus.Healthy] = StatusCodes.Status200OK,
                [HealthStatus.Degraded] = StatusCodes.Status400BadRequest,
                [HealthStatus.Unhealthy] = StatusCodes.Status503ServiceUnavailable
            }
        });
    }
}
```

With a setter, this code could be rewritten in a *don't repeat yourself* (DRY) way:

```csharp
private static void ConfigureHealthChecks(IApplicationBuilder app, HealthCheckServiceOptions options)
{
    var resultStatusCodes = new Dictionary<HealthStatus, int>
    {
        [HealthStatus.Healthy] = StatusCodes.Status200OK,
        [HealthStatus.Degraded] = StatusCodes.Status400BadRequest,
        [HealthStatus.Unhealthy] = StatusCodes.Status503ServiceUnavailable
    };
    app.UseHealthChecks("/health", new HealthCheckOptions
    {
        ResultStatusCodes = resultStatusCodes
    });
    foreach (var name in options.Registrations.Select(e => e.Name))
    {
        app.UseHealthChecks($"/health/{name}", new HealthCheckOptions
        {
            Predicate = registration => registration.Name == name,
            ResultStatusCodes = resultStatusCodes
        });
    }
}
```
2018-12-13 14:09:21 -08:00
Ajay Bhargav Baaskaran 0ecc6bc0b5 Merge branch 'release/2.2' into ajbaaska/merge-22-to-master 2018-12-13 12:06:48 -08:00
dotnet-bot 345fee0149 Merge in 'release/2.1' changes 2018-12-13 19:40:20 +00:00
John Luo a026e7a4e7
Convert MetaPackages to Reference and move to DefauldBuilder folder (#4687)
* Convert ServerTests to Reference and move to Server folder

* Fix NU1105
2018-12-13 11:39:15 -08:00
Kahbazi a8ae16e0cb Change JwtBearerOptions.Audience comment (#4646) 2018-12-13 11:08:12 +03:30
John Luo 6d2f2483d2
Remove obsolete session apis (#4609)
* Remove obsolete session apis

* Add breaking changes json updates
2018-12-12 17:35:40 -08:00
dotnet-bot f5b36aa8f2 Merge in 'release/2.1' changes 2018-12-13 01:15:45 +00:00
Chris Ross a3c99028b2
Fix HttpSys Caching_SendFileWithFullContentLength_Cached test (#4630) 2018-12-12 17:14:46 -08:00
dotnet-bot f1bfecfa03 Merge in 'release/2.2' changes 2018-12-12 22:37:18 +00:00
Mikael Mengistu 9e76bec6e1
Fix CORS Functional Tests (#4610) 2018-12-12 14:36:14 -08:00
dotnet-bot e8c63f6cf9 Merge in 'release/2.1' changes 2018-12-12 22:00:56 +00:00
Justin Kotalik 429719b91d
Make IISIntegration use Reference instead of PackageReference (and reactionary work) (#4311) 2018-12-12 16:59:44 -05:00
Chris Ross 49d5525352
Change Hosting projects to target netcoreapp3.0 #3754 (#4611) 2018-12-12 13:34:57 -08:00
James Newton-King ac1b5c58b0
Fix NU1105 errors in HttpAbstractions.sln (#4608) 2018-12-13 10:15:01 +13:00
dotnet-bot 6de24d6d2c Merge in 'release/2.2' changes 2018-12-12 21:00:13 +00:00
Ajay Bhargav Baaskaran ad3835c3e2
Removed unnecessary projects (#4586) (#4612) 2018-12-12 12:59:04 -08:00
Chris Ross a08f4b5a83
ResponseCompression DisposeAsync BasicMiddleware/#247 (#4604) 2018-12-12 11:32:36 -08:00
dotnet-bot 3a21d78ce6 Merge in 'release/2.1' changes 2018-12-12 18:42:13 +00:00
Ajay Bhargav Baaskaran 98f2973880
Removed unnecessary projects (#4586) 2018-12-12 10:41:06 -08:00
Justin Kotalik 226f2c0c2c
Adds MinimumReadThreshold to StreamPipeReader. (#4372) 2018-12-12 13:09:15 -05:00
Chris Ross 12966c63a6
Change DataProtection projects to target netcoreapp3.0 #3754 (#4473) 2018-12-12 10:04:36 -08:00
Chris Ross 6d442c1e3d
Upgrade Kestrel to target netcoreapp3.0 #3754 (#4405) 2018-12-12 08:16:00 -08:00
Nate McMaster 87629bbad9
Update Middleware.sln and Kestrel.sln to workaround NU1105 error 2018-12-11 18:19:36 -08:00
Nate McMaster d12827e609
Merge branch 'release/2.2' 2018-12-11 18:04:58 -08:00
Kahbazi 19276ce01c Remove nameof from log events 2018-12-12 07:19:32 +05:30
Mikael Mengistu ff385f71c5
Check connectionState in stop so we don't null ref (#4557) 2018-12-11 16:22:06 -08:00
dotnet-bot d11a6c823f Merge in 'release/2.2' changes 2018-12-12 00:14:21 +00:00
dotnet-maestro-bot 38785d0be9 [automated] Merge branch 'release/2.1' => 'release/2.2' (#4577)
* Workaround problems when opening solution files in Visual Studio (#4569)

Changes:

* Condense Routing.sln into HttpAbstractions.sln
* Workaround NU1105 by adding all ProjectReferences to the .sln
* Workaround exceptions in the ReferencesHostBridge by moving Reference items to a temporary item group
* Add a 'startvs.cmd' script for launching VS with the right env variables
* Remove RangeHelper test project
* Move RangeHelper tests into StaticFiles.Tests and add target for NPM restore

* Convert Session to use Reference and move to Middleware folder (#4576)

* Add RoutingSample.Web to HttpAbstractions.sln
2018-12-11 16:13:20 -08:00
Nate McMaster 0f9ad16b09
Add 2.1.7 package archive baselines 2018-12-11 15:58:50 -08:00
Chris Ross 97cdbfb1a1
Change middleware projects to target netcoreapp3.0 #3754 (#4472) 2018-12-11 15:41:36 -08:00
dotnet-bot 156f1e823b Merge in 'release/2.1' changes 2018-12-11 22:59:22 +00:00
Nate McMaster 719ff08409
Add RoutingSample.Web to HttpAbstractions.sln 2018-12-11 14:58:05 -08:00
dotnet-bot 8876e90846 Merge in 'release/2.1' changes 2018-12-11 22:57:48 +00:00
John Luo 3acdfb3d26
Convert Session to use Reference and move to Middleware folder (#4576) 2018-12-11 14:56:42 -08:00
dotnet-bot 8825a726c1 Merge in 'release/2.1' changes 2018-12-11 22:06:26 +00:00
Nate McMaster 5151e7b1ed
Workaround problems when opening solution files in Visual Studio (#4569)
Changes:

* Condense Routing.sln into HttpAbstractions.sln
* Workaround NU1105 by adding all ProjectReferences to the .sln
* Workaround exceptions in the ReferencesHostBridge by moving Reference items to a temporary item group
* Add a 'startvs.cmd' script for launching VS with the right env variables
* Remove RangeHelper test project
* Move RangeHelper tests into StaticFiles.Tests and add target for NPM restore
2018-12-11 14:05:21 -08:00
Chris Ross 7fdd930f50
Change IIS projects to target netcoreapp3.0 (#4371)
* Change IIS projects to target netcoreapp3.0 #3754
2018-12-11 13:46:46 -08:00
Chris Ross 99901fbad5
Move Identity.Core and Identity.Stores to NetCoreApp3.0 #3754 (#4523) 2018-12-11 10:23:01 -08:00
Steve Sanderson 24840e3465
Razor Components template (#4333) 2018-12-11 11:40:42 +00:00
James Newton-King 0c9eda1f4a
Update templates to use endpoint routing (#4500) 2018-12-11 18:24:14 +13:00
James Newton-King c6fa808a91
Change consumes behavior to ignore requests with no content type (#4459) 2018-12-11 17:55:20 +13:00
Nate McMaster dc718f6602
Merge branch 'merge/release/2.2-to-master' 2018-12-10 18:18:52 -08:00
Nate McMaster 790ae47055
Merge branch 'release/2.2' 2018-12-10 17:41:14 -08:00
John Luo 97d918e03a
Do 0-byte reads on MacOS (#4560)
Underlying corefx issue has been fixed
2018-12-10 17:25:18 -08:00
Ryan Nowak 61d33bed27 Fix failing routing tests 2018-12-10 17:17:58 -08:00
dotnet-bot 985d49c566 Merge in 'release/2.2' changes 2018-12-11 00:44:52 +00:00
Nate McMaster 2c4d586809
Merge 'release/2.1' into release/2.2
Co-authored-by: Justin Kotalik <jukotali@microsoft.com>
2018-12-10 15:56:42 -08:00
Artak Mkrtchyan 00fb0d6c14 Updated some depdencies 2018-12-10 15:36:07 -08:00
John Luo 644d8470f7
Crossgen linux-arm shared framework (#4009)
Also disambiguate between different corssgen executables
2018-12-10 10:56:39 -08:00
Adrian D. Alvarez 838bb11c1e Adjust font-weight in diagnostics error page to make it easier to read (#4534) 2018-12-10 08:35:37 -08:00
Tornike Kharaishvili d73d95f1d4 CookieSecurePolicy documentation update (#3670) (#4542) 2018-12-09 20:29:40 -08:00
Pranav K 926034ac4e
Re-enable extensibility points for ExpressionHelper.GetExpressionText, ExpressionMetadataProvider.FromStringExpression (#4494)
* Re-enable extensibility points for ExpressionHelper.GetExpressionText, ExpressionMetadataProvider.FromStringExpression

Fixes https://github.com/aspnet/Mvc/issues/8724
2018-12-08 13:54:05 +05:30
Pranav K 027bf336da
Add event names for logs (#6818) (#4495)
* Add event names for logs (#6818)
2018-12-08 13:00:16 +05:30
dotnet-bot 6169f4dd59 Merge in 'release/2.1' changes 2018-12-07 23:46:01 +00:00
Mikael Mengistu 4c5debd6ea
Skip Autobahn test (#4488) 2018-12-07 15:44:59 -08:00
Nate McMaster c612eb8730
Merge branch 'release/2.2' 2018-12-07 14:50:17 -08:00
dotnet-bot 4b9a884a35 Merge in 'release/2.1' changes 2018-12-07 22:31:49 +00:00
Justin Kotalik 5f843f223e
[2.1] Make Antiforgery, ResponseCaching, StaticFiles, and Cors use project ref (#4484) 2018-12-07 14:30:50 -08:00
dotnet-bot 5e9b60a573 Merge in 'release/2.2' changes 2018-12-07 21:49:04 +00:00
Nate McMaster 5017afa0ad
Merge branch 'release/2.1' to release/2.2 2018-12-07 12:45:42 -08:00
dotnet-bot 212f701d31 Merge in 'release/2.2' changes 2018-12-07 20:22:15 +00:00
dotnet-bot ab8039e2dc Merge in 'release/2.1' changes 2018-12-07 20:21:15 +00:00
dotnet-maestro-bot c331a7be14 Rewrite HttpSys response caching tests #1475 (#4486) (#4511) 2018-12-07 12:21:12 -08:00
Nate McMaster df3e4b98a2
Backport infrastructure cleanup to share sources and project references (#4513) 2018-12-07 12:20:13 -08:00
Nate McMaster 85e2147ff0
Merge branch 'release/2.2' 2018-12-07 11:11:44 -08:00
Chris Ross f1aacdbaa8
Remove Microsoft.Owin.Security.Interop and Microsoft.AspNet.Identity.AspNetCoreCompat (#4479) 2018-12-07 09:59:36 -08:00
dotnet-bot 84b41b6f52 Merge in 'release/2.1' changes 2018-12-07 17:22:37 +00:00
Chris Ross ae11d5d62e
Rewrite HttpSys response caching tests #1475 (#4486) 2018-12-07 09:21:33 -08:00
Joni 60d9615f00 Add space after period to the routing log message 2018-12-07 08:16:03 -08:00
Pranav K 8a0fa732b0 Make RequiredAttributeAdapter public
Fixes https://github.com/aspnet/Mvc/issues/8744
2018-12-07 17:49:10 +05:30
dotnet-bot 44f04c8b4d Merge in 'release/2.2' changes 2018-12-07 01:43:13 +00:00