I'm new to ASP.NET Web API and want to make HttpResponseMessage
instance from a utility class I made. Then I made very simple class.
But following compile error occurred.
CS0246: The type or namespace name 'HttpResponseMessage' could not be found (are you missing a using directive or an assembly reference?)
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net.Http;
using System.Web;
namespace myapplication.App_Code.Utils
{
public class HttpUtility
{
// compile error here
public HttpResponseMessage GetHttpResponseMessage ()
{
return new HttpResponseMessage();
}
}
}
HttpResponseMessage
is available from Controller Class which was made automatically by ASP.NET but not my Utility class.
What am I missing?