Commit Graph

3858 Commits

Author SHA1 Message Date
Pranav K bc48de9c2f Merge branch 'release/2.1' into dev 2018-01-25 10:54:38 -08:00
Pranav K a74ef9dfd9 Error message for [ApiController] without attribute route needs to be better
Fixes #7277
2018-01-25 10:25:52 -08:00
Ryan Brandenburg f71cbd39b5 Update to Preview2 2018-01-25 09:40:20 -08:00
Artak Mkrtchyan f35e29e87b
Merge pull request #7288 from aspnet/artakm/reenabletests
Enabling antiforgery tests, which were disabled because of the issue #7040
2018-01-24 11:14:50 -08:00
Artak Mkrtchyan 4f3e0966d9 Enabling antiforgery tests, which were disabled because of the #7040 issue 2018-01-23 19:16:24 -08:00
Javier Calvarro Nelson 381ac2946c Merge branch 'release/2.1' into dev 2018-01-23 17:31:48 -08:00
Javier Calvarro Nelson 17a407bba2 [Fixes #7271] Support covariant casting of ViewDataDictionary<T>
On HtmlHelper<T> we now support contextualizing an instance of
HtmlHelper<TBase> with a ViewDataDictionary<TDerived> in
ViewContext.ViewData.

This can happen in some situations when the model for a RazorPage has
been changed using a page application model convention.

In these cases we just build a new ViewDataDictionary<TBase> and pass in
the TDerived model as an instance.
2018-01-23 17:31:03 -08:00
Pranav K f31ddac714 Merge branch 'release/2.1' into dev 2018-01-23 15:50:27 -08:00
Pranav K e2839053dd Branching for 2.1.0-preview1 2018-01-23 15:32:12 -08:00
Ryan Brandenburg ea14942525 React to Options change 2018-01-23 08:07:45 -08:00
Pranav K ebdb3c650a Smooth rough ApiBehavior edges
Fixes #7262
2018-01-22 09:53:21 -08:00
Ajay Bhargav Baaskaran 2c6ba372c1 Some cleanup around FileProviderRazorProject with tests 2018-01-21 21:38:25 -08:00
Javier Calvarro Nelson 1d6b02c1f5 [Fixes #7239] Add support for loading additional parts.
* Support loading parts through an assembly metadata attribute with a
  key of Microsoft.AspNetCore.Mvc.AdditionalReference and a value that
  describes the additional assembly to add to the list of parts and
  whether or not it should be added by default. The additional reference
  can only contain the file name of the assembly and it must be located
  side by side with the assembly where the additional reference is
  defined.
* Add an AdditionalAssemblyPart application parts to represent parts
  that are not part of the original application per se, like precompiled
  views.
* Update the ViewsFeatureProvider to search for razor views in the
  application part directly instead of trying to load the precompiled
  views assembly part.
2018-01-21 08:02:20 -08:00
Pranav K c6c77dd4d3 Introduce Mvc analyzers 2018-01-19 16:02:50 -08:00
Ryan Nowak 61d42825d7 Update deps 2018-01-19 13:33:35 -08:00
Ryan Nowak f2d6cfa821 Update checksums
These are generated based on an incorrect version of the file. This code
is now testing the right thing.
2018-01-18 10:54:15 -08:00
Pranav K f0ae0ce528 Add PageConvention overloads for areas
Fixes #7246
2018-01-18 08:21:21 -08:00
John Luo 6751e3b7ca Discover assembly parts for Microsoft.AspnetCore.All 2018-01-17 13:20:09 -08:00
Ryan Nowak 7835809ff2 Add Razor.Design to MVC package 2018-01-17 09:58:28 -08:00
Pranav K ab3134e373 Support conflict resolution when multiple precompiled views have the same path
Fixes #7223
2018-01-16 08:04:39 -08:00
Pranav K 946b64143e Allow override routes on Pages
Fixes #6605
2018-01-12 15:57:13 -08:00
Pranav K 094b61dfc6 Refactor PageRouteModel generation 2018-01-12 15:44:23 -08:00
Jass Bagga 66c13ae5e5
Use weak comparison for If-None-Match header (#7237) 2018-01-12 12:40:51 -08:00
Kiran Challa 91fb3eb41e Changed CookieTempDataProvider's cookie SameSite to Lax
[Fixes #7190] Can not retrieve cookie-based TempData after Google authentication with account selection in Google Chrome
2018-01-12 06:20:10 -08:00
Ryan Nowak d342ebf8c8 Use compatibility switch for auth filters 2018-01-11 17:42:32 -08:00
Kiran Challa c922b0b90d Improving logging - model binding
Related to issue #6498: When enabling "Trace" logging for MVC loggers, I should be buried in log messages
2018-01-11 14:51:53 -08:00
Ajay Bhargav Baaskaran f9b246e7ab Update dependencies 2018-01-11 14:14:12 -08:00
Ajay Bhargav Baaskaran b20e35e76a Set RelativePhysicalPath in FileProviderRazorProjectItem 2018-01-11 13:20:17 -08:00
Jass Bagga 9438a453b0
Do not serve response body for HEAD requests (#7230)
Addresses #7208
2018-01-11 12:19:43 -08:00
Kiran Challa 2aae8774f6 [Fixes 7139] Add format filter mapping for xml formatters 2018-01-10 15:18:37 -08:00
Kiran Challa 00c6b53b06 [Fixes #7115] Update property type check in SaveTempDataPropertyFilterBase to match TempDataSerializer requirements 2018-01-10 15:08:01 -08:00
Pranav K b196708a3e Merge tag '2.0.2' into dev 2018-01-10 10:02:54 -08:00
Ryan Nowak 95d743e2c6 Renable compatibility switch functional tests 2018-01-09 22:24:19 -08:00
Doug Bunting 58026eacbd Correct a few model binding typos
- worst cases were incorrect references in doc comments
- also a few doc comments ended with `..` or `/`
- otherwise, address nits and take VS suggestions
2018-01-09 12:49:40 -08:00
Ryan Nowak 913cefdea2 Fix a bug blocking recompilation 2018-01-09 12:25:11 -08:00
Ryan Nowak a6fe3a67a3 Add Razor compilation to MvcSandbox 2018-01-09 12:25:11 -08:00
Ryan Nowak a88adcbeab Update dependencies 2018-01-09 12:25:11 -08:00
Nick Mayne 6bd421d197 Fixing BackSlashExpander class name 2018-01-09 11:30:27 -08:00
Doug Bunting afc75a8296 Move `IHttpRequestStreamReaderFactory` from `.Internal` to `.Infrastructure`
- #7044
- move `IHttpResponseStreamWriterFactory` too
- add breaking change records e.g. for changes to `BodyModelBinder[Provider]` constructors
  - these changes relate to previously-"internal" constructors and one property

nits: take VS suggestions for changed files
2018-01-09 10:51:09 -08:00
Doug Bunting c9ac2e6c29 Add `DisplayMetadata.NullDisplayTextProvider` and similar properties
- #6730
- `DisplayFormatStringProvider`, `EditFormatStringProvider`

nits:
- use `<see langword="null"/>` more
- accept VS suggestions in changed files
2018-01-09 09:01:57 -08:00
Doug Bunting ecedbd5372 Allow `null` or empty `fullName` in one special case
- #6662
- users can now provide a `name` or `data-valmsg-for` attribute to avoid `ArgumentException`s
  - affects `<input>`, `<select>`, `<textarea>` elements and validation message `<div>`s
- remove `fullName` check in `DefaultHtmlGenerator.GetCurrentValues(...)` entirely

The new workaround is _not_ identical to changing `ViewData.TemplateInfo.HtmlFieldPrefix`
- does not change where expression values are found in `ModelState` or `ViewData`
- likely needs to be combined with additional workarounds i.e. for advanced use only

nits:
- clean up some excessive argument naming; add a few missing argument names
- take VS suggestions in changed classes e.g. inline a few variable declarations
- clean up some test data
2018-01-09 08:53:37 -08:00
Ryan Nowak 75e3ed952b Update functional tests 2018-01-08 19:55:01 -08:00
Ryan Nowak e0471d059b update dependencies 2018-01-08 17:37:19 -08:00
Ryan Nowak d58d0f917f Add support for recompilation 2018-01-08 15:26:20 -08:00
Hao Kung 73bd09dc1c Add CombineAuthorizeFilters option 2018-01-08 11:59:30 -08:00
Ajay Bhargav Baaskaran acd6f7b064 Generate full pdb when running in net461 2018-01-08 11:26:12 -08:00
ASP.NET CI 2e73bab2a4 Move option for JSON errors to MvcJsonOptions
This was in the wrong place - JSON formatters have their own options
type already.

Moved the option to MvcJsonOptions and updated the naming + defaults to
reflect our plan.

Also did a bunch of general cleanup on these tests, which were a bit
sloppy.
2018-01-07 21:48:58 -08:00
ASP.NET CI bfb5f23647 Update dependencies.props
[auto-updated: dependencies]
2018-01-06 15:19:56 -08:00
Doug Bunting bab520f4dd Use latest `Microsoft.AspNet.WebApi.Client` package
- #5822
- update `Microsoft.AspNet.WebApi.Client` package version
- remove remaining few `$(PackageTargetFallback)` settings
- remove .NET Standard-specific files
  - they duplicate what Microsoft.AspNet.WebApi.Client now provides
  - necessary only if cross-compiling a PCL version of the WebApiCompatShim
  - add type forwarding for the removed `public` types
- reenable .NET Framework WebApiCompatShim tests
- add breaking change record for `MediaTypeFormatterMatchRanking` value change
  - version of this type in the shim lacked the `MatchOnRequestWithMediaTypeMapping` value
2018-01-05 16:42:28 -08:00
Kiran Challa 9fd60ff864 Marked CookieTempDataProvider's cookie as non-essential
[Fixes #7160] Determine if the temp data cookie is considered essential
2018-01-05 15:41:01 -08:00