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
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
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
Nate McMaster
67f48064ce
Skip additional flaky tests. See aspnet/Mvc#7122
2017-12-11 15:38:30 -08:00
Nate McMaster
2789507808
Disable flaky test ProcessAsync_WorksForNestedCacheTagHelpers
2017-12-11 11:49:13 -08:00
N. Taylor Mullen
7cea779b7a
Update JsonHelper to escape HTML.
...
- This functionality can be disabled by setting the `Switch.Microsoft.AspNetCore.Mvc.AllowJsonHtml` switch in an app.config.
- Updated tests to react to this new behavior.
- Exposed a new `PublicSerializerSettings` property on `JsonOutputFormatter` so we can accurately copy settings from the used output formatter in `JsonHelper`.
2017-12-07 16:12:43 -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
Kiran Challa
629f87181a
[ Fixes #6858 ] Changes to MvcOption's settings (SuppressInputFormatterBuffering & AllowBindingUndefinedValueToEnumType) are not taking affect
2017-12-04 14:25:41 -08:00
Jass Bagga
0bb3f18049
Add support for BadRequest in RazorPages ( #7097 )
...
Addresses #7095
2017-12-01 12:03:24 -08:00
Doug Bunting
6b2a702ff4
Handle line ending differences in a few tests
...
- #6205
- combine `TagHelpers_SupportsPathNavigation()` and `TagHelpers_SupportsRelativeNavigation()` into one
nit: remove a few unnecessary `.Trim()` calls
2017-11-30 21:18:42 -08:00
Pranav K
e6c716444d
Add a <partial /> tag helper
...
Fixes #5916
2017-11-30 17:08:47 -08:00
Jeremy Skinner
711a618310
Adds test for proposal in #7014
2017-11-22 07:50:37 -08:00
avertes
ee5535203e
Fixed rfc3339 formats to work with all localizations ( #7066 )
...
* Amend rfc3339 formats to work with all localizations
Changed time separator ":" to "\:" to prevent it from being substituted with a localized separtor. For example in it-IT locale, datetime-local was formatted as 2017-11-19T22.52.29.223 instead of correct format 2017-11-19T22:52:29.223
2017-11-21 15:10:18 -08:00
Pranav K
9dc9381ae4
Re-order execution in CacheTagHelper to avoid setting the result too early
...
Re-enable skipped tests
Fixes #7042
2017-11-20 10:03:47 -08:00
Jass Bagga
5fffd464cd
Support input type "week" ( #7045 )
2017-11-16 16:00:15 -08:00
Pranav K
b6144142fe
Update samples and tests to target netcoreapp2.1
2017-11-13 14:58:40 -08:00
Pranav K
a01e23250f
Preparing to update to 2.2 SDK
2017-11-09 16:25:51 -08:00
Jass Bagga
bb07119b4a
Handle "month" input type ( #7022 )
...
Addresses #6615
2017-11-09 10:25:36 -08:00
Chris Ross (ASP.NET)
bcaee8df4e
Disable broken Anti-forgery tests
2017-11-09 09:46:59 -08:00
Chris Ross (ASP.NET)
a7c9e8ab25
Test: Do not set response headers after the response has started
2017-11-09 08:57:20 -08:00
Steve Sanderson
d9825d1547
Better JSON deserialization errors. Implements #4607 , #4862
2017-11-06 23:02:13 +00:00
Pranav K
ab4c519dd5
Infer multipart/form-data for FromFile parameters
2017-11-02 09:36:31 -07:00
Nate McMaster
2e4bc548f5
Pin tool and package versions to make builds more repeatable ( #7013 )
2017-10-31 19:18:14 -07:00
Ryan Nowak
861d78fb78
Refactor content negotiation code into a service ( #6998 )
...
* Refactor content negotiation code into a service
This is a refactor in anticipation of using this logic in some other
places
2017-10-31 16:32:37 -07:00
Pranav K
41efa409a4
Remove TestOptionsManager
2017-10-30 17:49:15 -07:00
Pranav K
de2aef61ba
Make controllers with ApiControllerAttribute visible in ApiExplorer
2017-10-27 12:04:12 -07:00
Javier Calvarro Nelson
0989e60f73
[ Fixes #6943 ] Unit Testing Page Model Throws Null Ref On ModelState check
2017-10-26 14:37:42 -07:00
Justin Kotalik
ce66e95304
React to JsonPatch exception message changes. ( #6976 )
2017-10-20 09:56:27 -07:00
Pranav K
8946a68923
Infer binding sources for ApiController parameters
...
Fixes #6847
2017-10-16 15:20:43 -07:00
Jass Bagga
b992ef0ced
Add tests to ApplicationModelTest ( #6932 )
...
Addresses #756
2017-10-10 11:24:03 -07:00
Ryan Nowak
7ba167fcd8
Add 'default response' to API Response Type
...
Also some cleanup and unit tests.
2017-10-09 19:48:52 -07:00
Nate McMaster
3bfb023679
Update how PackageReference versions are set
...
Changes:
- Remove floating versions
- Disable myget feeds during a Universe build
- Use package-specific MSBuild variables. Pattern = `packageId.Pascalize() + "PackageVersion"`, with a few exceptions.
2017-10-09 11:11:24 -07:00
Nate McMaster
3f02482617
Minor test code changes to resolve xUnit2013 build error
2017-10-05 16:04:20 -07:00
Sébastien Ros
c4400d22d4
Port fix for URL helper redirect ( #6916 )
...
Fixes #6910
2017-10-05 11:24:36 -07:00
Sébastien Ros
d0a8b5f78f
Port fix for URL helper redirect ( #6917 )
...
Fixes #6910
2017-10-05 11:24:18 -07:00
Mike Harder
9fbb2f1141
Simplify collection initialization ( #6897 )
...
- Addresses VS message "IDE0028 Collection initialization can be simplified"
2017-10-04 14:12:43 -07:00
Pranav K
950db6587c
Require attribute routing with [ApiController]
...
Fixes #6870
2017-10-04 13:13:20 -07:00
Kristian Hellang
bfbc04f758
Use AddHttpContextAccessor method added in aspnet/HttpAbstractions#947
2017-10-03 08:52:59 -07:00
Ryan Nowak
e3ce1f52d4
Added Conflict result helper to ControllerBase
...
- Added ConflictObjectResult and ConflictResult types.
- Conflict(), Conflict(object error), Conflict(ModelState modelState)
added to ControllerBase.cs.
Fixes #6172
2017-10-02 15:05:57 -07:00
Steve Sanderson
afdda7cbee
Update fsproj for FSharpWebSite. Fixes #6554
2017-10-02 14:35:28 +01:00
Jass Bagga
2fcfc6be7c
Add EnableRangeProcessing ( #6895 )
...
Addresses #6780
2017-09-29 18:39:45 -07:00
Nate McMaster
fb142f0b24
Import dependencies.props last to ensure TargetFramework is set first
2017-09-29 17:02:30 -07:00
Jass Bagga
bd8b4d86df
Port fix for #6875 : Only set Content-Length when serving body ( #6888 )
...
Addresses #6887
2017-09-25 16:01:15 -07:00
Jass Bagga
eeac99985a
Only set Content-Length when serving body ( #6886 )
...
Addresses #6875
2017-09-25 15:07:12 -07:00
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
127d23a022
Parse LanguageVersion correctly
...
Fixes https://github.com/aspnet/Mvc/issues/6611
2017-09-19 13:38:40 -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
Doug Bunting
fd9cb08790
Add Switch.Microsoft.AspNetCore.Mvc.UseDateTimeTypeForDateTimeOffset quirks mode
...
- patch recipients can use switch to undo the #6648 fix
2017-09-18 15:13:43 -07:00
Doug Bunting
6041c6b966
Auto-select `type="text"` for `DateTimeOffset` values
...
- cherry-picked from 7e4a8fe in dev
- #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-18 15:13:33 -07:00
Pranav K
9f5e4eb483
Allow "page" route parameter to be used in Mvc controllers
...
Fixes #6660
2017-09-18 15:02:13 -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
Jass Bagga
b3aa691549
Add EnableRangeProcessingSwitch for FileContentResult and Fil… ( #6839 )
...
Addresses #6792
2017-09-18 10:57:49 -07:00
Pranav K
c13cef6a74
Injecting IViewLocalizer into Razor Page causing IndexOutOfRangeException
...
Fixes #6694
2017-09-15 15:58:32 -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
Pranav K
3e8da43279
Pinning versions for 2.0.0
2017-08-17 15:00:47 -07:00
Nate McMaster
3a710c3d64
Upgrade to xunit 2.3.0-beta4
2017-08-17 10:45:03 -07:00