5

This is driving me crazy - I can't find any documentation anywhere stating any special things I might be missing to have access to this class.

This says there's no extension method called GetQueryNameValuePairs for HttpRequestMessage:

var token = request.GetQueryNameValuePairs().SingleOrDefault(x => x.Key == OAuthConstants.AuthorzationParam).Value; 

Here are my usings:

using System; using System.Linq; using System.Net; using System.Net.Http; using System.Web.Http; using GoodBreaksClasses; using GoodBreaksTypes; using Newtonsoft.Json; using OAuth2.Mvc; using System.Web.Http.ValueProviders; using System.Net.Http.Formatting; 

Some of these I don't need, but I was trying to find the library that would work for me; I know System.Web.Http should be enough ...

Has anyone seen this before???

2 Answers 2

3

finally figured this out. Had to update WebApi, the version I had was too old. This is the update I did: Updating 'Microsoft.AspNet.WebApi' from version '4.0.20505.0' to '4.0.20710.0'.

Sign up to request clarification or add additional context in comments.

Comments

-1

From Nuget Packages install

Microsoft Asp.Net WebApi 2.2 Client Libraries Microsoft Asp.Net WebApi 2.2 Core Libraries 

After install you may create response like

public HttpResponseMessage Call(HttpRequestMessage RequestMessage) { return RequestMessage.CreateResponse(HttpStatusCode.OK, "Your Data Here"); } 

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.