Question

I was having a problem sending video data to a WCF restful service using post, my contract looks like this

 [OperationContract]
    [WebInvoke(Method = "POST",
                 ResponseFormat=WebMessageFormat.Json,
               BodyStyle = WebMessageBodyStyle.Wrapped,
               UriTemplate = "UploadMovie")]
    string UploadMovie(Stream stream);

This works ok when I'm sending some text data but does not work when I attempt to send Video data, I have some exception catching in place but it seems like the request is not even being processed, since I get no response and no exceptions get logged... anyone have any input on this?

Was it helpful?

Solution 3

The problem was the buffer size, i ended up splitting the video up into chunks and sending it like that, thanks everyone for their input

OTHER TIPS

you can use the svclog app to determine exactly what is happening. You just have enable wcf logging

http://wcfsecurity.codeplex.com/Wiki/View.aspx?title=How%20to%20enable%20WCF%20message%20logging

If you are instantiating all wcf in code, you can just add an app.config with the correct information to your code directory and this will work. Just remember to take it out when you're done. Most likely you have some exception that the WCF framework is catching. That happened to me on a message that seemingly vanished into thin air.

Check out this post on streaming in Restful WCF. It's reverse of what you want to do, but using the AdapterStream class will probably help.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top