Click here to Skip to main content
15,885,914 members
Home / Discussions / .NET (Core and Framework)
   

.NET (Core and Framework)

 
AnswerRe: Why does Task.Factory not do what it's supposed to do? Pin
Richard MacCutchan26-Nov-17 21:35
mveRichard MacCutchan26-Nov-17 21:35 
GeneralRe: Why does Task.Factory not do what it's supposed to do? Pin
Wiep Corbier26-Nov-17 21:44
Wiep Corbier26-Nov-17 21:44 
AnswerRe: Why does Task.Factory not do what it's supposed to do? Pin
Gerry Schmitz27-Nov-17 3:29
mveGerry Schmitz27-Nov-17 3:29 
GeneralRe: Why does Task.Factory not do what it's supposed to do? Pin
Wiep Corbier27-Nov-17 7:00
Wiep Corbier27-Nov-17 7:00 
GeneralRe: Why does Task.Factory not do what it's supposed to do? Pin
Gerry Schmitz27-Nov-17 7:52
mveGerry Schmitz27-Nov-17 7:52 
QuestionRead XLM data using Key in powershell Pin
Member 1338745922-Nov-17 21:54
Member 1338745922-Nov-17 21:54 
AnswerRe: Read XLM data using Key in powershell Pin
Richard MacCutchan22-Nov-17 22:53
mveRichard MacCutchan22-Nov-17 22:53 
Questionerror: The format of value 'application/json; charset=utf-8' is invalid. from webapi Pin
RAGHUNATH45616-Nov-17 4:31
RAGHUNATH45616-Nov-17 4:31 
I am using webapi in my mvc project and when ever I made a request from browser to api call I am getting the following error:

And i am using the .netFramework 4.0

Exception Details:

Server Error in '/' Application.

The format of value 'application/json; charset=utf-8' is invalid.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.FormatException: The format of value 'application/json; charset=utf-8' is invalid.


Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.


Stack Trace:

[FormatException: The format of value 'application/json; charset=utf-8' is invalid.]
   System.Net.Http.Headers.MediaTypeHeaderValue.CheckMediaTypeFormat(String mediaType, String parameterName) +119919
   System.Net.Http.Headers.MediaTypeHeaderValue..ctor(String mediaType) +23
   System.Net.Http.ObjectContent.BuildHeaderValue(String mediaType) +63
   System.Net.Http.ObjectContent`1..ctor(T value, MediaTypeFormatter formatter, String mediaType) +66
   System.Net.Http.HttpRequestMessageExtensions.CreateResponse(HttpRequestMessage request, HttpStatusCode statusCode, T value, HttpConfiguration configuration) +892
   System.Net.Http.HttpRequestMessageExtensions.CreateResponse(HttpRequestMessage request, HttpStatusCode statusCode, T value) +104
   System.Web.Http.Dispatcher.HttpControllerDispatcher.HandleException(HttpRequestMessage request, Exception exception, HttpConfiguration configuration) +191
   System.Web.Http.Dispatcher.HttpControllerDispatcher.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken) +284
   System.Net.Http.DelegatingHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken) +41
   System.Web.Http.HttpServer.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken) +347
   System.Net.Http.HttpMessageInvoker.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken) +55
   System.Web.Http.WebHost.HttpControllerHandler.BeginProcessRequest(HttpContextBase httpContextBase, AsyncCallback callback, Object state) +316
   System.Web.Http.WebHost.HttpControllerHandler.System.Web.IHttpAsyncHandler.BeginProcessRequest(HttpContext httpContext, AsyncCallback callback, Object state) +77
   System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +103
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +155


I searched in google but can't find the proper solution.

Please help me

AnswerRe: error: The format of value 'application/json; charset=utf-8' is invalid. from webapi Pin
Richard MacCutchan16-Nov-17 5:14
mveRichard MacCutchan16-Nov-17 5:14 
GeneralRe: error: The format of value 'application/json; charset=utf-8' is invalid. from webapi Pin
RAGHUNATH45616-Nov-17 22:10
RAGHUNATH45616-Nov-17 22:10 
GeneralRe: error: The format of value 'application/json; charset=utf-8' is invalid. from webapi Pin
Richard MacCutchan16-Nov-17 22:40
mveRichard MacCutchan16-Nov-17 22:40 
GeneralRe: error: The format of value 'application/json; charset=utf-8' is invalid. from webapi Pin
Dominic Burford12-Dec-17 2:47
professionalDominic Burford12-Dec-17 2:47 
GeneralRe: error: The format of value 'application/json; charset=utf-8' is invalid. from webapi Pin
tJackydx29-Nov-17 3:33
tJackydx29-Nov-17 3:33 
AnswerRe: error: The format of value 'application/json; charset=utf-8' is invalid. from webapi Pin
Dominic Burford12-Dec-17 2:46
professionalDominic Burford12-Dec-17 2:46 
QuestionProblem validating data input to a DataTable Pin
Ernesto R.D.8-Nov-17 17:54
Ernesto R.D.8-Nov-17 17:54 
AnswerRe: Problem validating data input to a DataTable Pin
Eddy Vluggen8-Nov-17 23:45
professionalEddy Vluggen8-Nov-17 23:45 
GeneralRe: Problem validating data input to a DataTable Pin
Ernesto R.D.9-Nov-17 0:57
Ernesto R.D.9-Nov-17 0:57 
GeneralRe: Problem validating data input to a DataTable Pin
Eddy Vluggen9-Nov-17 2:49
professionalEddy Vluggen9-Nov-17 2:49 
QuestionCircle Progress in Visual Studio 2008 Pin
Member 135090597-Nov-17 16:25
Member 135090597-Nov-17 16:25 
AnswerRe: Circle Progress in Visual Studio 2008 Pin
Pete O'Hanlon7-Nov-17 21:47
mvePete O'Hanlon7-Nov-17 21:47 
AnswerRe: Circle Progress in Visual Studio 2008 Pin
Gerry Schmitz8-Nov-17 4:01
mveGerry Schmitz8-Nov-17 4:01 
GeneralRe: Circle Progress in Visual Studio 2008 Pin
Member 135090598-Nov-17 13:48
Member 135090598-Nov-17 13:48 
QuestionCast issue with CaptureFileAsync() Pin
MA-Navinn26-Oct-17 2:54
MA-Navinn26-Oct-17 2:54 
AnswerRe: Cast issue with CaptureFileAsync() Pin
Richard MacCutchan26-Oct-17 3:30
mveRichard MacCutchan26-Oct-17 3:30 
AnswerRe: Cast issue with CaptureFileAsync() Pin
Richard Deeming26-Oct-17 3:53
mveRichard Deeming26-Oct-17 3:53 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.