SoapCore icon indicating copy to clipboard operation
SoapCore copied to clipboard

SoapCore WCF program doesn't work with async with CancellationToken

Open alexandruchirita4192 opened this issue 3 years ago • 3 comments
trafficstars

Hi,

The problem is that CancellationToken is not ignored for any serializer and there's no way to ignore the cancellation token in WSDL:

  • for SoapSerializer.XmlSerializer serializer we get exception trying to serialize CancellationToken: image
  • for SoapSerializer.DataContractSerializer serializer we get CancellationToken serialized in WSDL but that shouldn't be shown: image

I have the following problem exposed as best as possible at the link below and solved by myself with a workaround by removing the CancellationToken entirely: https://stackoverflow.com/questions/72783426/soapcore-wcf-c-sharp-program-using-xmlserializer-doesnt-create-the-wsdl-with-as

Using CancellationToken in async methods is a best practice to be able to stop requests in process, stop consuming resources in servers, and so on.

Thank you!

alexandruchirita4192 avatar Jul 06 '22 06:07 alexandruchirita4192

This issue is stale because it has been open for 30 days with no activity.

github-actions[bot] avatar Aug 06 '22 03:08 github-actions[bot]

There is no support for this scenario right now. You are welcome to submit a PR if you feel like giving it a shot yourself

andersjonsson avatar Aug 16 '22 13:08 andersjonsson

This issue is stale because it has been open for 30 days with no activity.

github-actions[bot] avatar Sep 16 '22 04:09 github-actions[bot]

This issue was closed because it has been inactive for 14 days since being marked as stale.

github-actions[bot] avatar Sep 30 '22 04:09 github-actions[bot]