Question

Photo of Brendan Yost

0

Method not found: 'Void Newtonsoft.Json.JsonConverterAttribute...

Hello -

We installed Rock and had it working beautifully.  We were going through training and everything was going perfect.

Inexplicably, both our internal and public sites have started returning the error below. 

We reinstalled, same error.  We spun up a new server and installed Rock there, and we continue to receive the same error.  The install script works beautifully, but as soon as we hit the "flip the switch" button, we get this error.

I spend most of my time working in LAMP.  Any help anyone can provide would be appreciated more than I can express.


Server Error in '/' Application.


Method not found: 'Void Newtonsoft.Json.JsonConverterAttribute..ctor(System.Type, System.Object[])'.

Description:An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details:System.MissingMethodException: Method not found: 'Void Newtonsoft.Json.JsonConverterAttribute..ctor(System.Type, System.Object[])'.

Source Error:

Line 184: // Configure Rock Rest API Line 185: stopwatch.Restart(); Line 186: GlobalConfiguration.Configure( Rock.Rest.WebApiConfig.Register ); Line 187: if ( System.Web.Hosting.HostingEnvironment.IsDevelopmentEnvironment ) Line 188: {


Source File:d:\home\site\wwwroot\App_Code\Global.asax.cs Line:186

  • Photo of Jim Michael

    1

    I'm guessing you're hosting on Azure? Last week MS updated Azure web sites and included an old build of NewtonSoft that breaks rock. I've heard they are "rolling back" the change but I've not heard of any Rock users (to date) with a broken site that has been restored. Unfortunately the only immediate fix is to move the web app to a VM, or wait it out.

    • Ross Li

      We just ran into this error 2 days ago. We are on East Asia region on Azure so perhaps there is a time difference.


      My question is in the problem is about the application using an old build of NewtonSoft.dll, is there a way to tell Azure to use a specific version of this dll instead of what is default that might be causing the error?

    • Jim Michael

      I don't believe so. As far as I'm aware the only way other Rock users on Azure webapp have been able to work around it is to move Rock to a Azure VM. If I were you I'd open a case with Microsoft on this and complain LOUDLY. It's been weeks since they introduced this problem and they need to know customers are affected and unhappy.

    • Ross Li

      I've just gotten a response from Microsoft. The suggested work around at the moment is to have the Rock installation redirect the assembly to use Newtonsoft.Json.dll v 7.x (instead of 6.x that is used by default). Here is the forum post that I was directed to https://social.msdn.microsoft.com/Forums/en-US/f0a6bbaf-498a-4c1f-b869-6779ee18e04e/app-service-applications-may-experience-methodnotfound-exceptions-due-to-incorrect-newtonsoft-json?forum=windowsazurewebsitespreview


      After uploading the v7 Newtonsoft.Json.dll and xml to the bin folder, and editing the web.config to use v 7, our site now works. Of course if there are incompatibilities between v7 and Rock then this will not be a viable workaround, but so far I haven't run into any errors yet.


      It is a bit worrying though that something like this can happen when hosting on Azure without warning.

  • Photo of Arran France

    0

    As you're off of Azure I'm going to mark this closed :)