Publishing images within an Open Live Writer post fails
Closed this issue · 6 comments
See https://www.cloudscribe.com/forum/thread/is-ftp-access-possible-with-open-live-writer
I tested posting with an image in the post and got this result:
Exception is
{"Synchronous operations are disallowed. Call ReadAsync or set AllowSynchronousIO to true instead."} System.Exception {System.InvalidOperationException}
Seemingly caused by one of the breaking changes listed here https://docs.microsoft.com/en-us/dotnet/core/compatibility/2.2-3.0 specifically "HTTP: Synchronous IO disabled in all servers".
I don't understand why XDocument.LoadAsync(...) was failing when an image was posted up but working on a text-only page/post - perhaps something to do with the size of the payload?
I've improved the logging to write the exception message to the log rather than oops, and change the method of reading the posted xml. This has been tested successfully locally, and will need testing again once deployed to IIS/Linux web servers.
cs.MetaWebLog nuget version needs to be bumped, but other projects referencing it also need an increment, else this fix will not find its way out into the world via the VS template.
Includes
cs.SimpleContent.MetaWeblog
cs.Core.SimpleContent
and potentially other things that reference them.
Pushed what I think to be a minimal set of new nugets as:
cs.MetaWebLog v3.0.3
cs.Core.SimpleContent v5.0.3
cs.SimpleContent.MetaWeblog v5.0.3
Needs a test that I didn't miss anything.
I do see that
cloudscribe.Core.SimpleContent.CompiledViews.Bootstrap3
cloudscribe.Core.SimpleContent.CompiledViews.Bootstrap4
depend on cloudscribe.Core.SimpleContent
but I didn't bump those, since the template references cloudscribe.Core.SimpleContent directly.
@CrispinF If this tests OK, could you please delete this feature branch when closing ticket?
Tested OK in a production site in IIS.