Where is Request.Unvalidated on asp.net-core?

若如初见. 提交于 2021-01-27 12:52:56

问题


I have noticed that in classic ASP.NET MVC there is an Unvalidated property on Request which allows Access to raw values provided by the current request.

I cannot identify this property on ASP.NET MVC Core. Is there still a way to Access that information?


回答1:


ASP.NET Core doesn't have the same request validation feature as it was in ASP.NET. Here are team responses in GH issue:

RequestValidation was always rather porous, and eventually we came to the realisation that validate should be an app concern, because what's validate for one application isn't valid for another,

and

We have no plans to ever build a request validation middleware like what existed in System.Web.

Also useful: SO Enable asp.net core request validation. If shortly, Model validation should be used instead.



来源:https://stackoverflow.com/questions/45547341/where-is-request-unvalidated-on-asp-net-core

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!