Commit Graph

224 Commits

Author SHA1 Message Date
Nate McMaster f5aae26b44
Update projects and packages to target netcoreapp3.0 (aspnet/Mvc#8734) 2018-11-16 16:28:35 -08:00
Pranav K be220e8bc2 Remove test verifying orders 2018-11-09 09:45:17 -08:00
Pranav K 8d66f104f7 Make types in Microsoft.AspNetCore.Mvc.Internal namespace internal 2018-11-08 14:00:16 -08:00
Patrick Westerhoff ddbe0fef26 Allow custom handling of antiforgery failures
To enable custom handling of antiforgery validation failures, use an
`AntiforgeryValidationFailedResult` which is just a `BadRequestResult`
but allows to be identified explicitly inside always-running result
filters using the `IAntiforgeryValidationFailedResult` marker interface.
2018-10-19 13:47:08 -07:00
James Newton-King 7854d65c11
Support page parameter in attribute route (#8530) 2018-10-04 14:39:40 +13:00
Pranav K 61386d5f67
Reference Microsoft.NET.Sdk.Razor in projects with Razor files 2018-09-20 13:21:45 -07:00
Pranav K d09c3c9e28
Polish ProblemDetails
* Add ability to set extended members on ProblemDetails
* Skip empty valued properties when serializing ProblemDetails

Fixes #8296
Fixes #8317
2018-08-28 16:21:39 -07:00
Javier Calvarro Nelson dfb579d45c [Fixes #8021] Copy the request headers before sending the request on the RedirectHandler
If another handler modifies the request headers the modified headers get
applied on subsequent requests, which is not correct. This change copies
the headers before sending the request and uses the original headers for
the redirect request instead of the potentially modified ones.
2018-08-23 16:09:05 -07:00
Pranav K 8eea0ad44c Update tests to latest compat switch 2018-08-23 08:09:02 -07:00
James Newton-King 03da30f3bf
Replace remaining references to global routing (#8312) 2018-08-23 10:23:29 +12:00
James Newton-King cbe1526763
React to routing changes (#8303) 2018-08-22 17:15:09 +12:00
Pranav K 5bd818bd64
Introduce ProblemDetailsFilter
Fixes https://github.com/aspnet/Mvc/issues/6786
2018-08-21 17:29:12 -07:00
James Newton-King 046af405b6
Rename global routing to endpoint routing (#8179) 2018-08-01 15:05:49 +12:00
Ryan Nowak fbae57cde1 React to the removal of EndpointConstraint 2018-07-28 19:03:16 -07:00
James Newton-King c08504b08a
MVC startup experience (#8131) 2018-07-25 14:30:51 +12:00
Ryan Nowak 196e3f109f React to Routing branding
This is a reaction PR for the branding changes in progress in Routing.

This can be merged after the changes to in to Routing.
2018-07-22 19:47:15 -07:00
Ryan Nowak 5c488bf09c make feature branch build 2018-07-20 12:57:43 -07:00
James Newton-King 36d90c9bc2
Run request service constraint test with dispatching (#8112) 2018-07-19 16:43:51 +12:00
James Newton-King a67d9363e2
Consumes endpoint constraint (#8057) 2018-07-12 16:35:33 +12:00
James Newton-King 183ecd85d6
Fix MVC integration with UseEndpoint (#8047) 2018-07-11 11:47:33 +12:00
Pranav K 335500ab0e Use ModelMetadata from actual types for validation
Fixes https://github.com/aspnet/Mvc/issues/7952
2018-07-02 11:23:16 -07:00
Pranav K 7f2a64e32b
Razor runtime compilation produces errors if running on a shared runtime that's rolled forward
Do not provide compilation references from runtime MVC assemblies. This avoids cases where the app is compiled
against an older MVC but running against a newer one (e.g. shared fx roll forward) resulting in compiling against multiple
versions of MVC assemblies

Fixes #7969
2018-06-29 13:55:22 -07:00
Kiran Challa 418aac57f4 [Fixes #7609] ApiBehaviorApplicationModelProvider overwrites existing BindingInfo in entirety when inferring binding sources 2018-05-24 14:28:42 -07:00
Pranav K 5d5222cdd8 Introduce BindPropertiesAttribute
* Allow controller and Razor Page models to be annotated with BindPropertiesAttribute
* Disallow BindPropertyAttribute from being declared on types.
* Do not allow arbitrary binding attributes to be applied to Razor Page models.

Fixes #7686
2018-04-20 14:32:14 -07:00
Pranav K d995b0418a Allow BindPropertyAttribute to be specified on controller classes
Fixes #7350
2018-04-13 13:58:44 -07:00
Pranav K ec31ff0c28
Throw if multiple Body bound parameters are discovered
Fixes #6963
2018-04-09 11:20:34 -07:00
Pranav K c7559e1ff4
Merge pull request #7590 from aspnet/release/2.1
Release/2.1
2018-04-02 09:49:14 -07:00
Pranav K c515cece8e Use ModelMetadataProvider to infer BindingSource on application model 2018-04-02 09:48:49 -07:00
Pranav K 133dd964ab Introduce ViewDataAttribute
Allow properties on controllers, Razor Page and Razor Page models annotatted with [ViewDataAttribute]
to populate ViewDataDictionary

Fixes https://github.com/aspnet/Mvc/issues/6525
2018-03-30 14:19:52 -07:00
Kiran Challa 0c084fa28a [Fixes #7518] NullReferenceException thrown when Controller method uses Guid parameter default value 2018-03-27 05:22:20 -07:00
Ryan Nowak 1ff5bdca79 Set model prefix for [ApiController]
Infers the 'empty' model prefix for complex types that are read from the value
providers. This gives us better defaults when using the parameter object
pattern with respect to swagger/API explorer.
2018-03-23 14:49:54 -07:00
Javier Calvarro Nelson 908e7a863b Improvements to the MVC testing package
* Clean up unnecessary workarounds on the build project.
* Remove the need to specify the content root relative to the solution
  and use a solution based on an assembly level attribute on the test
  assembly created at build time.
* Remove non parameterless constructors.
* Add support for creating specialized factories from the base factory
  and keep track of "child" factories for disposal.
* Add support for creating clients that handle cookies and redirects
  automatically.
2018-03-19 12:19:45 -07:00
Pranav K ae2d82c748 Remove FiltersWebSite 2018-03-16 16:54:10 -07:00
Pranav K 62fdf3a472 Fix issues with RazorCompileOnBuild=true being default 2018-03-09 14:39:18 -08:00
Ryan Brandenburg 9b4b373014 Remove IErrorDescriptionFactory 2018-03-07 13:09:13 -08:00
Pranav K ebdb3c650a Smooth rough ApiBehavior edges
Fixes #7262
2018-01-22 09:53:21 -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
Kiran Challa 2aae8774f6 [Fixes 7139] Add format filter mapping for xml formatters 2018-01-10 15:18:37 -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
Pranav K 350c4ec4f6
Introduce IAlwaysRunResultFilter \ IAsyncAlwaysRunResultFilter (#7120)
* Introduce IAlwaysRunResultFilter \ IAsyncAlwaysRunResultFilter

Fixes #7105
2017-12-22 10:52:52 -08:00
Kiran Challa e09ea40551 [Fixes #6591] TempData should support nullable types 2017-12-04 15:33:22 -08:00
Pranav K b6144142fe Update samples and tests to target netcoreapp2.1 2017-11-13 14:58:40 -08:00
Nate McMaster 2e4bc548f5
Pin tool and package versions to make builds more repeatable (#7013) 2017-10-31 19:18:14 -07:00
Pranav K 8946a68923 Infer binding sources for ApiController parameters
Fixes #6847
2017-10-16 15:20:43 -07:00
Kristian Hellang bfbc04f758 Use AddHttpContextAccessor method added in aspnet/HttpAbstractions#947 2017-10-03 08:52:59 -07:00
Pranav K 7f214492b8 Introduce a filter to send bad request results with details when ModelState is invalid (#6849)
* Introduce a filter to send bad request results with details when ModelState is invalid

Fixes #6789
2017-09-21 11:09:32 -07:00
Javier Calvarro Nelson 85f3c841f1 Revert "Revert "Improvements to the testing package.""
This reverts commit 7b28334c41.
2017-09-19 21:45:05 -07:00
Ryan Brandenburg 7b28334c41 Revert "Improvements to the testing package."
This reverts commit 96bd2769d0.
2017-09-19 18:02:53 -07:00
Javier Calvarro Nelson 96bd2769d0 Improvements to the testing package.
* Detect a ConfigureDefaultBuilder static method on Program.cs of the test site
and use it to initialize the IWebHostBuilder instance that we configure for testing.
* Make use of the new service configuration extensibility points in Hosting to override
services for testing.
* Get rid of MvcWebApplicationBuilder and move MVC specific methods into extension methods.
2017-09-18 18:12:01 -07:00
Kiran Challa 23b7d8f62a Added RequestFormLimits filter.
[Fixes #5128] Overriding Request Form max upload limit
2017-09-18 13:48:15 -07:00