Quantcast
Channel: ASPNETWebStack Issue Tracker Rss Feed
Viewing all articles
Browse latest Browse all 7215

Commented Issue: FormDataCollectionExtensions provides incomplete context [1287]

$
0
0
FormDataCollectionExtensions (CreateActionContextForModelBinding) uses an incomplete HttpControllerContext, with only the configuration set (it calls the unit test-only constructor). Consumers normally expect (as an invariant) that request context, request, controller descriptor and controller are all set; attempts to access these properties during model binding in this case will return null unexpectedly.
Comments: It looks like this problem can't be fixed; there's public surface area to model bind this data without providing a request. For example: public static object ReadAs(this FormDataCollection formData, Type type) The best we could do is create an internal constructor and note that it's not just used for unit testing.

Viewing all articles
Browse latest Browse all 7215

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>