Kiran Challa
83c3ac62fb
Updated formatters to wrap exceptions in InputFormatException for invalid input
2017-09-22 14:33:17 -07:00
Ryan Nowak
38712609bb
Design extensibility for executors
...
We have all of these executors but they aren't really
documented/supported for extensibility today. This change introduces a
pattern for action result executors so we can make them extensible.
2017-09-22 10:32:55 -07:00
Pranav K
5d1603c37f
Replace ProblemDetailsAttribute with ApiControllerAttribute
2017-09-22 10:26:13 -07:00
Kristian Hellang
97fab8711a
Add UnprocessableEntityResult, UnprocessableEntityObjectResult and ControllerBase.UnprocessableEntity methods ( #6851 )
...
* Added UnprocessableEntityResult
* Added UnprocessableEntityObjectResult
* Added UnprocessableEntity overloads to ControllerBase
Fixes https://github.com/aspnet/Mvc/issues/6795
2017-09-22 09:27:29 -07:00
Pranav K
197ef139d6
Provide a way within the Page/PageModel to run code before any handler runs
...
Fixes #6606
2017-09-22 09:25:22 -07:00
Steve Sanderson
236ef5d1d1
Support validation and BindBehavior on top-level action parameters and bound properties. Fixes #6790
2017-09-22 10:13:48 +01:00
Kiran Challa
a96fb68690
Fixed FileExtensionsAttributeAdapter to trim(whitespaces, dot character) and lowercase the extensions
2017-09-21 14:52:24 -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
Hao Kung
95c10050c9
Stop using obsolete version of AddScheme in test
2017-09-20 12:48:46 -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
Pranav K
f0a5af2ba7
Revisit the unwrapping code in ControllerActionInvoker
...
Fixes #6679
2017-09-19 09:49:37 -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
72eb546329
Added attribute adapter for DataAnnotation's FileExtensionsAttribute
2017-09-18 16:20:26 -07:00
Kiran Challa
47287c508e
Added new extension methods to configure all MVC localization services
...
[Fixes #5436 ] Must call `AddViewLocalization()` to use `IStringLocalizer<T>` in an application
2017-09-18 14:28:55 -07:00
Kiran Challa
23b7d8f62a
Added RequestFormLimits filter.
...
[Fixes #5128 ] Overriding Request Form max upload limit
2017-09-18 13:48:15 -07:00
Ryan Nowak
c09575dbd0
Fix #4914 patternize filter overrides
...
Adding some convenience methods to the context class and updating our
code to use them.
2017-09-18 12:12:44 -07:00
Pranav K
776c2604f8
Introduce opinionated API defaults.
...
* Introduce ProblemDescriptionAttribute to enhance some 4xx messages and produce better API description.
* Introduce IErrorDescriptionProvider to modify the shape of error response.
Fixes #6785 , Fixes #6786
2017-09-14 17:07:34 -07:00
Pranav K
037c1ec47d
Make @inherit + Razor Pages + _ViewImports work
...
Fixes #6769
2017-09-14 12:34:00 -07:00
Kiran Challa
35601f95b3
Added a model binder for handling Enum types. [ Fixes #6329 ] Why don't we check for Enum.IsDefined on action parameters of enum type
2017-09-14 08:25:05 -07:00
Ryan Nowak
db2d9ee56f
Additional fixes for #4604
2017-09-13 23:39:00 -07:00
Charlie Daly
9db92dc6a7
JsonResultExecuter logs type of result.
...
- MvcJsonLoggerExtensions.JsonResultExecuting logs result type instead of value
- Nulls handled more elegantly.
- Two tests added to JsonResultExecutorTests.cs.
- #4604
2017-09-13 23:39:00 -07:00
Nick Chapsas
db397d812b
TagHelperOutput extension methods for class value manipulation ( #6565 )
...
* Added TagHelperOutput extension methods for class value manipulation
2017-09-13 11:58:10 -07:00
Kiran Challa
4f18d99d02
Added RedirectToAction overload with no arguments
2017-09-12 17:17:48 -07:00
Kiran Challa
06f6de6c11
Changed RequestSizeLimitAttribute to create an authorization filter rather than a resource filter.
...
[Fixes #6777 ] RequestSizeLimit is ignored
2017-09-12 17:03:24 -07:00
Pranav K
de38922601
Allow BindPropertyAttribute to be applied on PageModel
...
Fixes #6653
2017-09-12 10:34:19 -07:00
Pranav K
63397653fa
Make DefaultApiDescriptionProvider understand ActionResult<T>
...
Fixes #6784
2017-09-11 14:20:38 -07:00
Pranav K
6bf165f22f
Update default Razor search paths to include ~/[PagesRoot]/Shared
...
Fixes #6604
2017-09-11 14:11:39 -07:00
Kiran Challa
3beb310866
Avoid saving TempData in case of unhandled exceptions. [ Fixes #6598 ] BUG? Accessing TempData prevent response to have content on error.
2017-09-07 13:13:27 -07:00
Pranav K
717f1e6f7d
Normalize paths in RazorViewEngine prior to invoking page factory
...
Fixes #6672
2017-09-07 11:36:31 -07:00
Pranav K
a7cc243942
Introduce ProblemDescription
2017-09-06 18:46:35 -07:00
Pranav K
151cf44607
Introduce ActionResult<T>
2017-09-06 18:46:06 -07:00
Pranav K
bac68ba3c2
Injecting IViewLocalizer into Razor Page causing IndexOutOfRangeException
...
Fixes #6694
2017-09-06 13:54:38 -07:00
Doug Bunting
7e4a8fe479
Auto-select `type="text"` for `DateTimeOffset` values
...
- #6648
- a different take on #4871
- `DateTime` can also round-trip `DateTimeKind.UTC` with `[DataType("datetimeoffset")]` or `[UIHint("datetimeoffset")]`
- since they're now handled differently by default, add more `DateTime` tests
- expand tests involving `Html5DateRenderingMode.CurrentCulture`
nits: make VS-suggested changes to files updated in this PR
2017-09-05 16:05:13 -07:00
Doug Bunting
8645ada6b5
Remove no-op behaviour for no-content `<label></label>` elements
...
- #6638
2017-08-31 09:21:44 -07:00
bchavez
16c267d95e
House Cleaning - Spelling and grammar 🚿
2017-08-30 14:58:44 -07:00
Nate McMaster
b811e69d00
Use PackageLineup to manage PackageReference versions
...
- Move the Mvc.Performance project from test/ to benchmarks/.
- Remove the Version attribute on PackageReference.
- Add a reference to two PackageLineup's.
- Add snippet to README explaining the additional requirement to run build.cmd /t:restore.
- Add a target to check that packages have been pinned.
2017-08-30 12:14:11 -07:00
Pranav K
b82200851f
Do not re-discover runtime compiled RazorPage files for precompiled Razor Pages.
...
Fixes #6718
2017-08-29 16:15:07 -07:00
Kiran Challa
b2f9ad1b67
Changed CookieTempDataProvider's CookieSecurePolicy from SameAsRequest to None
2017-08-29 14:55:52 -07:00
Kiran Challa
cfc05104e4
Updated to use WebEncoders utility's Base64Url encode/decode functionality
2017-08-29 08:37:28 -07:00
Ryan Nowak
ca6c76c358
Add a test where [Ignore..] gets overridden
...
Fixing a small gap in our AF functional tests.
2017-08-25 13:55:27 -07:00
Pranav K
7b2a4ff465
Allow "page" route parameter to be used in Mvc controllers
...
Fixes #6660
2017-08-24 15:44:37 -07:00
Pranav K
900a5c7c4c
Add support for ResponseCache in Razor Pages
...
Fixes #6437
2017-08-18 16:25:40 -07:00
Nate McMaster
3a710c3d64
Upgrade to xunit 2.3.0-beta4
2017-08-17 10:45:03 -07:00
Nate McMaster
b43b244830
Use Directory.Build.props/targets
2017-08-16 12:30:13 -07:00
Pranav K
5fee1cac83
Merge pull request #6655 from aspnet/rel/2.0.0
...
Refactor CORS support out of MVC Core
2017-08-14 16:50:14 -07:00
Javier Calvarro Nelson
f2a8c1cea7
Refactor CORS support out of MVC Core
2017-08-14 11:40:56 -07:00
Pranav K
eb5c23ea8e
Parse LanguageVersion correctly
...
Fixes https://github.com/aspnet/Razor/issues/1591
2017-08-08 17:25:28 -07:00
Pranav K
8ab361ae42
Merge pull request #6582 from aspnet/rel/2.0.0
...
Add global filters with the right scope
2017-07-21 14:02:29 -07:00
Pranav K
2ef26486dd
Add global filters with the right scope
...
Previously global filters were added to the page application model with Action scope. This
would have resulted in incorrect ordering of filters during execution. We'll instead add
global filters separately with the right scope. #6579 will be used to express global filters
as part of the application model.
2017-07-21 14:02:07 -07:00