Click here to Skip to main content
15,918,193 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am calling WCF Service from my client application. I am using Duplex communication. My issue is that once I call the WCF service, same time it is going to execute next line code which is myText string... And I don't want to do that. How do I restrict that?


Client Code :

Proxy.GetProcessedFileData();
String myText= "This is the text after receiving response"
// Other functionality....


Service Code :

XML
<OperationContract(IsOneWay:=True)> _
Sub GetProcessedFileData()
Posted

Hi,

Read this : http://msdn.microsoft.com/en-us/library/ms733035(v=vs.110).aspx[^]

You have mentioned IsOneWay so your client will not expect any response from server and after the call its start moving forward.

So set it to IsOneWay false then your client will wait for response.
 
Share this answer
 
I have tried that but it's not working... Service will throw an exception if we set value to false.

I have below good example for reference but again in that it happens the same thing.

http://www.dotnetcurry.com/showarticle.aspx?ID=721[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900