My WCF service contract has to methods like these:
[OperationContract]
string GetFile(int id);
[OperationContract]
void UploadFile(int id, string text);
GetFile returns a text of a file and UploadFile sends some file's content to a server.
There is a strange behavior, when file's size is about few MB (4.37 MB in my case): GetFile works fine and client gets long text without any problem, but UploadFile cannot send the same file to a server. Client freezes while executing this method and it seems not to be going to finish the operation. I was waiting for some minutes, but there were no result and I stopped client forcibly.
So, my question is is there any difference between directions of such transferring? I know about WCF streaming, which should be used for sending large files to server, and I'm going to to change my code using it. I wonder why the problem occures only when a file is transferred to a server while a server returns data of the same size correctly?
Update. UploadFile shouldn't be a OneWay operation, because I need to know if it has been successful. Execution doesn't rich the server. I set breakpoint on the server side and it doesn't fire.