I'm experiencing a strange and periodically issue where webservice posts throw an exception which is this one:
{"Message":"An error has occurred.","ExceptionMessage":"A null 'MediaTypeFormatter' is not valid.\r\nParameter
name: formatters","ExceptionType":"System.ArgumentException","StackTrace":" at System.Net.Http.Formatting
.MediaTypeFormatterCollection.VerifyAndSetFormatters(IEnumerable1 formatters)\r\n at System.Net.Http
.HttpContentExtensions.ReadAsAsync[T](HttpContent content, Type type, IEnumerable1 formatters, IFormatterLogger
formatterLogger, CancellationToken cancellationToken)\r\n at System.Web.Http.ModelBinding.FormatterParameterBinding
.ReadContentAsync(HttpRequestMessage request, Type type, IEnumerable1 formatters, IFormatterLogger formatterLogger
, CancellationToken cancellationToken)\r\n at System.Web.Http.ModelBinding.FormatterParameterBinding
.ReadContentAsync(HttpRequestMessage request, Type type, IEnumerable1 formatters, IFormatterLogger formatterLogger
)\r\n at System.Web.Http.ModelBinding.FormatterParameterBinding.
d2.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n at System.Runtime
.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at System.Runtime
.CompilerServices.TaskAwaiter`1.GetResult()\r\n at System.Web.Http.Dispatcher.HttpControllerDispatcher
.1.MoveNext()"}
This is thrown a few different places around the solution - and the only workaround at the moment is to manually recycle the application pool for the site in the IIS console.
The site is hosted on Windows Server 2012 R2 with IIS 8.5.9600.16.384 and using a standalone SQL server 2014 also running on Server 2012 R2.
The site can run for days (for example 3-5) without throwing these errors and then suddenly break down once or twice a day. It doesn't seem to be related to a specific browser or a specific time of the day or even a specific user logged in.
The eventlog on the server also do not show any information that seems to tell why the posts suddenly fail.
The webservice posts happen within the umbraco (v.7.3.4) site context but the exception happens before the desired post has reached it's endpoint (that is: no logging on the endpoint is possible - cause the call is never done).
Please note that the umbraco installation has multiple sites in the tree and everyone is affected when the problem is present. The websites however is fully browseable and it is also possible to publish/unpublish pages with umbraco admin. The problem is related to the webservice-posts.
An example is the built-in feature of adding a domain to a node in the umbraco tree. When hitting the save button the exception occurs if the problem is present.
I've spent (what seems like half a life almost) some time searching for others having the same issue - but to no avail yet.
Hope someone has an answer or some sort of "try-this" which could help me pinpoint and solve this issue.
While I've not seen this specific error before I will give you a "try this": please update to 7.3.8! 7.3.4, 5 and 6 have a serious bug in them that causes severe errors and your site to become completely unresponsive at certain times. We've fixed those issues and 7.3.8 is now the recommended version.
Thanks for the recommendation. The problem has existed for at least a year now (which is a bit scary when I just type it now...) - the problem also existed with previous versions of umbraco... (eg. 7.x).
I'll keep an open mind for upgrading - but that's not my first choice right now due to the complexity of the issue.
Umbraco/dotnet mediatypeformatter exception - periodically
Hi
I'm experiencing a strange and periodically issue where webservice posts throw an exception which is this one:
{"Message":"An error has occurred.","ExceptionMessage":"A null 'MediaTypeFormatter' is not valid.\r\nParameter name: formatters","ExceptionType":"System.ArgumentException","StackTrace":" at System.Net.Http.Formatting .MediaTypeFormatterCollection.VerifyAndSetFormatters(IEnumerable
1 formatters)\r\n at System.Net.Http .HttpContentExtensions.ReadAsAsync[T](HttpContent content, Type type, IEnumerable
1 formatters, IFormatterLogger formatterLogger, CancellationToken cancellationToken)\r\n at System.Web.Http.ModelBinding.FormatterParameterBinding .ReadContentAsync(HttpRequestMessage request, Type type, IEnumerable1 formatters, IFormatterLogger formatterLogger , CancellationToken cancellationToken)\r\n at System.Web.Http.ModelBinding.FormatterParameterBinding .ReadContentAsync(HttpRequestMessage request, Type type, IEnumerable
1 formatters, IFormatterLogger formatterLogger )\r\n at System.Web.Http.ModelBinding.FormatterParameterBinding.This is thrown a few different places around the solution - and the only workaround at the moment is to manually recycle the application pool for the site in the IIS console.
The site is hosted on Windows Server 2012 R2 with IIS 8.5.9600.16.384 and using a standalone SQL server 2014 also running on Server 2012 R2.
The site can run for days (for example 3-5) without throwing these errors and then suddenly break down once or twice a day. It doesn't seem to be related to a specific browser or a specific time of the day or even a specific user logged in.
The eventlog on the server also do not show any information that seems to tell why the posts suddenly fail.
The webservice posts happen within the umbraco (v.7.3.4) site context but the exception happens before the desired post has reached it's endpoint (that is: no logging on the endpoint is possible - cause the call is never done).
Please note that the umbraco installation has multiple sites in the tree and everyone is affected when the problem is present. The websites however is fully browseable and it is also possible to publish/unpublish pages with umbraco admin. The problem is related to the webservice-posts.
An example is the built-in feature of adding a domain to a node in the umbraco tree. When hitting the save button the exception occurs if the problem is present.
I've spent (what seems like half a life almost) some time searching for others having the same issue - but to no avail yet.
Hope someone has an answer or some sort of "try-this" which could help me pinpoint and solve this issue.
Kind regards Thomas
While I've not seen this specific error before I will give you a "try this": please update to 7.3.8! 7.3.4, 5 and 6 have a serious bug in them that causes severe errors and your site to become completely unresponsive at certain times. We've fixed those issues and 7.3.8 is now the recommended version.
Thanks for the recommendation. The problem has existed for at least a year now (which is a bit scary when I just type it now...) - the problem also existed with previous versions of umbraco... (eg. 7.x).
I'll keep an open mind for upgrading - but that's not my first choice right now due to the complexity of the issue.
But thanks anyway.
is working on a reply...