[Mono-list] webHttpBinding WebInvoke POST issue
Atsushi Eno
atsushieno at veritas-vos-liberabit.com
Mon Jun 13 03:20:40 EDT 2011
Hello,
NotSupportedException is not NotImplementedException, so it is likely
intended to actually throw that error. It is still possible that the WCF
internal goes wrong path and reaches that WriteMessage() part, but
without actual code to examine I cannot guess for sure.
Atsushi Eno
(2011/06/13 7:40), Nadeem Backus wrote:
> Dear All,
>
> I have implemented a service operation which recieves a file
> (multipart) via HTTP POST (as a stream) from an asyncronous uploader
> (SWFupload), this has been done using the webHttpBinding in
> system.servicemodel.web. The service is running as a console host on
> an unbuntu 10.10 system with mono 2.10, it fails in this environment
> yet works in .net 4.0 in windows. I am getting the following exception
> when a post is attempted:
>
>
> Unhandled Exception: System.NotSupportedException: Operation is not
> supported.
> at
> System.ServiceModel.Dispatcher.WebMessageFormatter+RawMessage.OnWriteBodyContents
> (System.Xml.XmlDictionaryWriter writer) [0x00000] in <filename unknown>:0
> at System.ServiceModel.Channels.Message.WriteBodyContents
> (System.Xml.XmlDictionaryWriter writer) [0x00000] in <filename unknown>:0
> at System.ServiceModel.Channels.Message.OnCreateBufferedCopy (Int32
> maxBufferSize) [0x00000] in <filename unknown>:0
> at System.ServiceModel.Channels.Message.CreateBufferedCopy (Int32
> maxBufferSize) [0x00000] in <filename unknown>:0
> at System.ServiceModel.Logger.LogMessage (MessageLogSourceKind
> sourceKind, System.ServiceModel.Channels.Message& msg, Int32
> maxMessageSize) [0x00000] in <filename unknown>:0
> at
> System.ServiceModel.Channels.Http.HttpReplyChannel.TryReceiveRequest
> (TimeSpan timeout, System.ServiceModel.Channels.RequestContext&
> context) [0x00000] in <filename unknown>:0
> at
> System.ServiceModel.Channels.ReplyChannelBase.<BeginTryReceiveRequest>m__20
> (TimeSpan tout, System.ServiceModel.Channels.RequestContext& ctx)
> [0x00000] in <filename unknown>:0
>
>
> The Operation Contract code is this:
>
> [OperationContract]
> [WebInvoke(Method = "POST", BodyStyle =
> WebMessageBodyStyle.Bare, UriTemplate = "/UploadImage")]
> Stream UploadImage(Stream data);
>
>
> Having looked though the library source code I see that RawMessage has
> been implemented (I am unsure to what extend it has been completed) ,
> but OnWriteBodyContents is throwing a not supported exception. How
> else can I get access to the posted stream data?
>
> Any help will be greatly appreciated, thank you in advance :-)
>
> Nadeem
>
>
> _______________________________________________
> Mono-list maillist - Mono-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-list
More information about the Mono-list
mailing list