Home Why WCF's autogenerated proxies have sync method?
Reply: 1

Why WCF's autogenerated proxies have sync method?

Ish Thomas
1#
Ish Thomas Published in 2018-02-13 15:36:08Z

I implemented async WCF service MyServiceAsync. In the client when I add Service Reference it still generates the sync (normal) version of this function. It doesn't even return the Task and the name is MyService. Am I missing something?

I had sync version before, I recently changed to async. Are those leftovers from my previous service or does VS auto generate both sync and async?

And the follow up question, if so.. can I prevent from generating sync version?

Thanks

Paulo Morgado
2#
Paulo Morgado Reply to 2018-02-13 21:49:17Z

They way or technology the server is implemented in has no influence in the client. Or the contract (WSDL in this case).

I assume you're exposing the service over HTTP. The fact that you have an async implementation does not change the HTTP protocol.

You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.334239 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO