Quantcast
Channel: ASP.NET Core
Viewing all articles
Browse latest Browse all 9386

Issue with HttpResponseMessage return in MVC6

$
0
0

Hi Folks,

I'm migrating the application from WebAPI 2 to MVC6. I have few methods which return the HTML to the view. When I tried migrating to MVC6, it happens to be JSON along with metadata. Even after providing the following code doesn't help.

Thanks in Advance :)

 response.Content.Headers.ContentType=newMediaTypeHeaderValue("text/html");return response;

Viewing all articles
Browse latest Browse all 9386

Trending Articles



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