Commit Graph

19 Commits

Author SHA1 Message Date
Doug Bunting dfae19ee7c
Merge branch 'release/2.2' -> 'master' 2019-04-19 18:53:15 -07:00
Ryan Nowak 6074daacae Fixes: #9468 2019-04-18 12:47:42 -07:00
Ryan Nowak 7021df89e4 Remove dynamic from page endpoints 2019-04-16 19:36:32 -07:00
Ryan Nowak 6f305373ca Allow fallback to controller to use MatcherPolicy 2019-04-16 19:36:32 -07:00
Nate McMaster d004cf0f14
Merge branch 'release/2.1' into release/2.2 2019-04-15 16:42:07 -07:00
Pranav K 836964a653 Don't log action and page handler arguments above Trace level (#9227) 2019-04-15 13:29:07 -07:00
Javier Calvarro Nelson 3265c54518
[MVC][Fixes #7576]HtmlHelperOptions.ClientValidationEnabled = false is ignored in Razor Pages (#9289)
* Replaced IOptions<HtmlHelperOptions> with IOptions<MvcViewOptions> on the PageActionInvokerProvider.
2019-04-12 11:56:24 +02:00
Pranav K b93bc433db
Make AuthorizeFilter work in endpoint routing (#9099)
* Make AuthorizeFilter work in endpoint routing

Fixes https://github.com/aspnet/AspNetCore/issues/8387
2019-04-08 06:03:34 -07:00
Pranav K 1b868323e8
Add a System.Text.Json based TempDataSerializer (#8874)
* Add a System.Text.Json based TempDataSerializer

* Update DefaultTempDataSerializer
* Add common tests for DefaultTempDataSerializer & BsonTempDataSerializer
* Remove uses of NewtonsoftJson in tests solely required for temp-data support

Fixes https://github.com/aspnet/AspNetCore/issues/7255
2019-04-02 10:34:50 -07:00
Ryan Nowak 284e968101 Add AddControllers and AddRazorPages
These are *new style* for configuring MVC in services. We're adding these to make
things feel a bit more tailored to those particular scenarios.

----

The main reason for this is that we've had repeated community asks for an
*API-optimized* way of configuring MVC. I don't think that using AddMvcCore
is a suitable building block, because it has too many options that you want.

I've think I've identified the reasonable set of features that should be part
of the default experience for APIs. All of these things are already pay-for-play
and are activated by the presence of attributes. The only additional cost is
loading of assemblies and a few additional inspections of the attributes
(cached).

----

Additionally the AddControllers experience is composible. You can add views
to it, or add pages and get the whole thing.

AddRazorPages is basically an alias for what AddMvc does today. We don't
currently have a way to add pages without controllers (the opposite is true).
Based on feedback we could specialize this more.

----

Branding and perception are important, and we've users ask for more flexibility
in what gets added. The plan is to update the templates to use this experience
in preview4, and see what kind of feedback we get.
2019-03-29 18:51:10 -07:00
Ryan Nowak 658b37d2bd
Make UseEndpoints a thing (#8765)
* Make endpoint middleware explicit

This change makes the endpoint middleware explicit again, and updates
all of the templates.

The other change here is make UseEndpoints be the place where you
register endpoints. This is vital because it puts your code visually at
the point of the pipeline where it executes.

Lastly, I removed support for UseMvc with endpoint routing. This is
causing issues for some security features, and we're moving in the
direction of trying to make the middleware heavy implementation required
in 3.0. There are some issues we won't be able to fix in MVC if we can't
unambiguously know if UseMvc was used or the middleware.
2019-03-28 15:41:11 -07:00
Ryan Nowak a1ec03e1e6 Add fallback routing for controllers and pages 2019-03-06 09:48:07 -08:00
Pranav K 39e52578d3
Make page load async when using endpoint routing (#7938)
* Make page load async

Fixes #8016
2019-03-04 14:45:59 -08:00
James Newton-King a6b00f0d0d
Add xml docs to RazorPagesEndpointRouteBuilderExtensions (#7992) 2019-02-28 08:22:44 +13:00
Pavel Krymets 9355c7c1a5
Add reference assemblies support (#7764) 2019-02-21 14:33:35 -08:00
Chris Ross 4e44025a52
Replace IHostingEnvironment with IWebHostEnvironment (#7725) 2019-02-19 21:11:52 -08:00
Ajay Bhargav Baaskaran 7a26d27e8b Merge branch 'release/2.2' 2019-02-14 16:08:51 -08:00
Ajay Bhargav Baaskaran 0c2ee920a1 Merge branch 'release/2.1' into release/2.2 2019-02-13 14:52:38 -08:00
Ajay Bhargav Baaskaran 4cceccd568
Make Mvc repo folder layout consistent (#7518) 2019-02-13 10:53:39 -08:00