[Mono-list] WCF/JSON POST get error 415, expected content-type application/xml not application/json
Iain Mcleod
mcleodia at gmail.com
Sun Apr 18 17:36:42 EDT 2010
Also, I may as well add this stack trace, obtained when I switched my
services across to use WebMessageFormat.Xml with
WebMessageBodyStyle.Wrapped. It happens every time I make a request.
Regards
Iain
----------------------
Exception There is already message property for Web body format at
System.ServiceModel.Dispatcher.WebHttpDispatchOpera
tionSelector.SelectOperation (System.ServiceModel.Channels.Message& message,
System.Boolean& uriMatched) [0x00000] in <f
ilename unknown>:0
at
System.ServiceModel.Dispatcher.WebHttpDispatchOperationSelector.SelectOperation
(System.ServiceModel.Channels.Messa
ge& message) [0x00000] in <filename unknown>:0
at System.ServiceModel.Dispatcher.OperationInvokerHandler.GetOperation
(System.ServiceModel.Channels.Message input, Sy
stem.ServiceModel.Dispatcher.DispatchRuntime dispatchRuntime) [0x00000] in
<filename unknown>:0
at System.ServiceModel.Dispatcher.OperationInvokerHandler.ProcessRequest
(System.ServiceModel.Dispatcher.MessageProces
singContext mrc) [0x00000] in <filename unknown>:0
at
System.ServiceModel.Dispatcher.BaseRequestProcessorHandler.ProcessRequestChain
(System.ServiceModel.Dispatcher.Mess
ageProcessingContext mrc) [0x00000] in <filename unknown>:0
at
System.ServiceModel.Dispatcher.BaseRequestProcessorHandler.ProcessRequestChain
(System.ServiceModel.Dispatcher.Mess
ageProcessingContext mrc) [0x00000] in <filename unknown>:0
at
System.ServiceModel.Dispatcher.BaseRequestProcessorHandler.ProcessRequestChain
(System.ServiceModel.Dispatcher.Mess
ageProcessingContext mrc) [0x00000] in <filename unknown>:0
at System.ServiceModel.Dispatcher.HandlersChain.ProcessRequestChain
(System.ServiceModel.Dispatcher.MessageProcessingC
ontext mrc) [0x00000] in <filename unknown>:0
at System.ServiceModel.Dispatcher.BaseRequestProcessor.ProcessRequest
(System.ServiceModel.Dispatcher.MessageProcessin
gContext mrc) [0x00000] in <filename unknown>:0
System.NullReferenceException: Object reference not set to an instance of an
object
at System.ServiceModel.Dispatcher.MessageProcessingContext.Reply (Boolean
useTimeout) [0x00000] in <filename unknown>:
0
at System.ServiceModel.Dispatcher.ErrorProcessingHandler.ProcessRequest
(System.ServiceModel.Dispatcher.MessageProcess
ingContext mrc) [0x00000] in <filename unknown>:0
at
System.ServiceModel.Dispatcher.BaseRequestProcessorHandler.ProcessRequestChain
(System.ServiceModel.Dispatcher.Mess
ageProcessingContext mrc) [0x00000] in <filename unknown>:0
at System.ServiceModel.Dispatcher.HandlersChain.ProcessRequestChain
(System.ServiceModel.Dispatcher.MessageProcessingC
ontext mrc) [0x00000] in <filename unknown>:0
at System.ServiceModel.Dispatcher.BaseRequestProcessor.ProcessRequest
(System.ServiceModel.Dispatcher.MessageProcessin
gContext mrc) [0x00000] in <filename unknown>:0
at
System.ServiceModel.Dispatcher.InputOrReplyRequestProcessor.ProcessReply
(System.ServiceModel.Channels.RequestConte
xt rc) [0x00000] in <filename unknown>:0
at System.ServiceModel.Dispatcher.ListenerLoopManager.ProcessRequest
(IReplyChannel reply, System.ServiceModel.Channel
s.RequestContext rc) [0x00000] in <filename unknown>:0
--
View this message in context: http://n4.nabble.com/WCF-JSON-POST-get-error-415-expected-content-type-application-xml-not-application-json-tp2013204p2015191.html
Sent from the Mono - General mailing list archive at Nabble.com.
More information about the Mono-list
mailing list