0

I have a controller with access to Request object of type HttpRequestMessage.

In this controller I need the AccessTypes collection.

I know I can get it from HttpRequestBase object, but how do I get it from the HttpRequestMessage?

1 Answer 1

0

My solution was to get the HttpRequestBase and use it like this:

var context = new HttpContextWrapper(HttpContext.Current);
HttpRequestBase request = context.Request; 
string[] accessTypes = request.AccessTypes;

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.