Quantcast
Channel: Active questions tagged rest - Stack Overflow
Viewing all articles
Browse latest Browse all 3637

cannot implicitly convert type 'system.net.http.httpresponsemessage' to 'system.web.httpresponse'

$
0
0

I am creating a web service in visual studio 2015 using MySQL databases. I want implement only a GET method using HTTP. Now when I am doing it I cam accross and error. Which is

cannot implicitly convert type 'system.net.http.httpresponsemessage' to 'system.web.httpresponse'

The point where it comes is below

public HttpResponse Get()    {        try        {            return  Request.CreateResponse(HttpStatusCode.Found, mEntities.meters_info_dev.ToList());        }        catch (Exception)        {            return Request.CreateErrorResponse(HttpStatusCode.NotFound, "No Data found");        }    }

Below is the image

enter image description here

I couldn't find the solution for it. Any help would be highly appreciated


Viewing all articles
Browse latest Browse all 3637

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>