SoapCore
SoapCore copied to clipboard
SoapCore WCF program doesn't work with async with CancellationToken
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.XmlSerializerserializer we get exception trying to serializeCancellationToken:
- for
SoapSerializer.DataContractSerializerserializer we getCancellationTokenserialized in WSDL but that shouldn't be shown:
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!
This issue is stale because it has been open for 30 days with no activity.
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
This issue is stale because it has been open for 30 days with no activity.
This issue was closed because it has been inactive for 14 days since being marked as stale.