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@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list

Reply via email to