Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

CANNOT get access to HttpRequestMessageExtensions

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???

like image 676
Andrew B Schultz Avatar asked Nov 03 '22 13:11

Andrew B Schultz


1 Answers

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'.

like image 182
Andrew B Schultz Avatar answered Nov 13 '22 02:11

Andrew B Schultz