Open volker-knoess opened 1 month ago
I encountered the same problem. You can read more about it here https://github.com/dotnet/runtime/issues/12711
You need to allow AllowSynchronousIO as a workaround:
builder.Services.Configure<KestrelServerOptions>(options => { options.AllowSynchronousIO = true; });
Description
The HTTP Endpoint run into an error when an XML is send with the Content-Type application/xml
Steps to Reproduce
Build a simple workflow with Elsa Studio with HTTP Endpoint and HTTP Response. Set the Parsed Content to variable type object or string (storage workflow or memory should not matter). Use Postman or something similar to send an XML (e.g. with the Content-Type application/xml.
Reproduction Rate: every time
Video/Screenshots: Error in Elsa Studio
Additional Configuration: Nothing specific, Elsa v3.1.3 from Nuget
Expected Behavior
No System.InvalidOperationException, XML content should be in the variable as string or a better in a more specific object (e.g. XDocument)
Actual Behavior
See under 5.
Screenshots
The problem seems for me quite easy to reproduce but let me know if further information is needed.
Environment
Log Output
Copied from the console.
Troubleshooting Attempts
Tried to copy the HttpEndpoint over to my code, it's compiling and the activity is coming in Elsa studio but in this case the activity is not activated and a 404 is coming. It seems it takes only the Elsa HttpEndpoint and not my copy. Is it possible to create also your own HttpEnpoints?
I tried also to read the body with a custom Activity, but also without success, it results in an empty string.
Additional Context
The error comes only with Content-Type application/xml other types seems to work same content with text/plain works fine.
Related Issues
I don't thinks so the other seems to address different things.