Commit Graph

3802 Commits

Author SHA1 Message Date
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
Doug Bunting 1fa1d7df3e Add missing `RenderPartial(...)` overload
- #7127
- also remove some redundant `null` checks
2018-01-05 11:27:54 -08:00
Kiran Challa 40d027fca3 File results - logging 2018-01-04 23:49:13 -08:00
Pavel Krymets 997544077a
Use common BDN runner and config (#7186) 2018-01-04 09:13:11 -08:00
ASP.NET CI 4abf2909ae Update dependencies.props
[auto-updated: dependencies]
2018-01-04 01:47:36 +00:00
Pranav K 0e21bab125 React to naming change in Razor 2018-01-03 12:38:16 -08:00
Ryan Nowak bf61ce2b8f Document compatiblity switch for input formatter exceptions 2018-01-03 11:23:05 -08:00
Pranav K 7d64990a69 Ensure RazorPages in an area are not route-able through root based paths when root directory and area root directory overlap
Fixes #7147
2018-01-03 09:37:30 -08:00
Ryan Nowak 64259fe51c Add skips for dotnet/standard#567
This issue causes problems with ValueTuple when used across assembly
boundaries between netstandard and net4X when net471 is installed. These
tests fail consistently in appveyor and will fail on any machine with
net471 installed.
2018-01-02 20:58:39 -08:00
Doug Bunting 5778f44bf7 Use `ExceptionDispatchInfo` in `MiddlewareFilterBuilder` if available
- #6596
- better-align this code with `ResourceInvoker.Rethrow()`

nits:
- take VS suggestions in `MiddlewareFilterBuilderTest`
- clean up names like `httpCtxt`
- remove unused `Pipeline2` class
2018-01-02 14:56:41 -08:00
Pranav K 51820e3e25 Use DebugType specified in DependencyContext to determine pdb type
Fixes #7006
2018-01-02 13:41:31 -08:00
Kiran Challa 276c1e4360 Improve logging - output formatter selection 2018-01-02 10:09:47 -08:00
Ryan Nowak 49bdcfb150 Updated Razor Pages areas for compatibility switches 2018-01-02 09:48:23 -08:00
ASP.NET CI 64a11e2093 Update dependencies.props
[auto-updated: dependencies]
2017-12-31 21:40:05 +00:00
Javier Calvarro Nelson 57c8b71b4d
[Fixes #6547] Re-introduce HttpMethodActionConstraint dictionary perf improvement 2017-12-29 18:56:22 -08:00
Ryan Nowak 82e32240a4 Update the Enum Invalid Value setting for compat
Updated the naming to follow guidelines, and set the default for 2.0
apps to false. Note that I inverted the naming, which means that I had
to invert the logic in a few places.
2017-12-29 12:09:29 -08:00
Ryan Nowak 514381f16f Add Razor.Design as a dependency of MVC
This reverts commit 6981c29394.

Also updated the deps to get the latest, which has some fixes we need to
start using this.
2017-12-29 11:21:34 -08:00
Ryan Nowak 747420e5aa
Compatibility switches (#7142)
* [Design] Compatibility switches

This introduces a pattern for versioning breaking behaviour changes in
minor releases of MVC.

The general plan is that application developers choose a release version
(2.0, 2.1, Latest) as their baseline which determines the effective
'defaults' for some options. Anything the developer sets explicitly is
an override and always wins.

Then we add a version setting to the template to point to the current
release.

This allows us to be progressive with fixing issues and improving areas
that don't work well, but offers the developer some choice about when to
adopt new behaviours. In effect, we separate new behaviours from the
libraries that develiver them. Apps can update the version, and then opt
in to new behaviours as a separate change.

* Be more american

* improve docs, add example

* Fix visibility

* Fix broken test

* Add test

* Docs!

* The rest of the tests

* fix example

* Adding docs

* PR feedback
2017-12-28 09:43:24 -08:00
Ryan Nowak 6981c29394 Remove Razor.Design (temporary) 2017-12-27 19:17:27 -08:00
Pranav K 350c4ec4f6
Introduce IAlwaysRunResultFilter \ IAsyncAlwaysRunResultFilter (#7120)
* Introduce IAlwaysRunResultFilter \ IAsyncAlwaysRunResultFilter

Fixes #7105
2017-12-22 10:52:52 -08:00
Ryan Nowak 455cf2e0c3 Add the Razor.Design dependency to MVC 2017-12-20 18:31:21 -08:00
Pranav K dfa085afaf Add support for areas to Razor Pages
Fixes #6926
2017-12-19 15:03:05 -08:00
Kiran Challa c8cabde1f1 Improve logging - individual filters 2017-12-18 13:16:06 -08:00
Ryan Brandenburg 2f8809dc16 Use latest Appveyor VS image 2017-12-18 11:51:33 -08:00
Kiran Challa 4c4a7b3c6c Improve logging - filter pipeline execution
Related to issue #6498: When enabling "Trace" logging for MVC loggers, I should be buried in log messages
2017-12-14 11:22:13 -08:00
Doug Bunting 5d9f04cf34 Run `[RequireHttps]` filter early in pipeline 2017-12-14 10:40:57 -08:00
ASP.NET CI 55fdbc24ed Update dependencies.props
[auto-updated: dependencies]
2017-12-13 21:24:30 +00:00
Kiran Challa 7e26af908e [Fixes #6514] Add default ctor overload to AuthorizeFilter 2017-12-12 14:07:02 -08:00
Kiran Challa 821daa5ad0 [Fixes #7085] ApplicationModelConventionExtensions should make a copy of collections when iterating them 2017-12-12 14:03:35 -08:00
ASP.NET CI e24c44f243 Update dependencies.props
[auto-updated: dependencies]
2017-12-10 13:27:14 -08:00
Kiran Challa d5bb73a98c [Fixes #6197] AddXmlSerializerFormatters with no namespace 2017-12-07 04:39:34 -08:00
Kiran Challa 05d02e7cab [Fixes #6533] Log when XML formatters fail to create a serializer 2017-12-06 11:52:05 -08:00
Kiran Challa db38da7edb Fix Xml formatters to taking in MvcOptions to take affect of options mutation
Related to issue [Fixes #6858] Changes to MvcOption's settings (SuppressInputFormatterBuffering & AllowBindingUndefinedValueToEnumType) are not taking affect
2017-12-06 11:44:35 -08:00
Kiran Challa e09ea40551 [Fixes #6591] TempData should support nullable types 2017-12-04 15:33:22 -08:00