1
What is the difference between Httprequestcontext and Httprequest? And how to convert Httprequestcontext to Httprequest?
1
What is the difference between Httprequestcontext and Httprequest? And how to convert Httprequestcontext to Httprequest?
1
As far as I know, HttpRequestContext
is an object that is "inside" the HttpRequest
.
The HttpRequest
(System.Web.HttpRequest
) returns the current request, where we can read the QueryString
for example.
The HttpRequestContext
(System.Web.Routing.RequestContext
) is the request within the current route, a route MVC
for example. So much so that if a request is not made through a route, to a direct page for example, the HttpRequestContext
is empty.
Convert a HttpRequestContext
shouldn’t be a problem, because he’s always a requisition, so HttpRequest
must be completed with the requisition data.
Note that HttpRequestContext
inherits from RequestContextBase
, which in turn inherits from RequestContext
, this can help.
Browser other questions tagged asp.net
You are not signed in. Login or sign up in order to post.