Saturday, 17 August 2013

Using HttpCLient to Consume OneWay WCF service

Using HttpCLient to Consume OneWay WCF service

I have a WCF service that is OneWay Fire and Forget
[OperationContract(IsOneWay = true)]
[WebInvoke(Method = "POST",
BodyStyle = WebMessageBodyStyle.Bare
, UriTemplate = "/AddNew")]
void AddNew(string message)
I am using Http Client Libabry from Nuget private HttpClient client = new
HttpClient(); declared private var for the class.
client.PostAsync(uri, new
StringContent(postViewModel.PostContent)).Start();
When i look at Fiddler no post action is done , nor do i see any results
on db due to void AddNew(string message) being called. what am i doing
wrong?

No comments:

Post a Comment