How to solve System.InvalidOperationException: For request in operation Test to be a stream the operation must have a single parameter whose type is Stream
Posted by: hongmeigs WebLog,
on 03 Mar 2010 |
View original | Bookmarked: 0 time(s)
You are getting this error because the default WCF stream formatter does not support this. You are probably trying to upload some file stream and transfer some other parameters, such as file name, etc within the same method. For example,
void Test(string fileName, Stream fileContent);
If this is not a REST endpoint, you can work around this issue by using MessageContract wrapping the multiple parameters into one class.
If this is a REST endpoint, this programming...