1

I have a web application which uses JSON.Net to write out an array of data from a .Net Array().

When run in the VS2010 environment, it works fine.

When run under IIS6 and .Net 3.5, it works fine.

When run under IIS7 or 7.5 and .Net 3.5 when .Net 4.0 is installed (but the app pool and site is set to use v2 runtime), it fails with the exception 'System.Security.VerificationException: Operation could destabilize the runtime.'

I do not have access to an IIS7 (or 7.5) system without .Net 4.,0 so I cannot try that case.

Can anyone shed any light on this?

  • 2
    Are you using the latest version of Json.NET? I fixed an issue along the lines of what you've described some time ago. – James Newton-King Aug 24 '10 at 08:52
  • Well, I was sure, right up until I replaced the running dlls with a fresh copy from json.codeplex.com and it suddenly worked. Both the version I downloaded on Friday and just now are 35r8 and have the same file sizes for the dll, pdb and xml files. Weird. Chalk this one up to gremlins I think! Thankyou for a fine library btw, I will be making a donation as soon as I get paid for this. –  Aug 24 '10 at 09:30
  • possible duplicate of [Json.NET + VerificationException Operation could destabilize the runtime.](http://stackoverflow.com/questions/5968084/json-net-verificationexception-operation-could-destabilize-the-runtime) – Aaron Maenpaa Jun 15 '11 at 14:33
  • possible duplicate of [Json.NET says "operation may destabilize the runtime" under .NET 4, but not under .NET 3.5](http://stackoverflow.com/questions/5511171/json-net-says-operation-may-destabilize-the-runtime-under-net-4-but-not-under) – Jehof Aug 05 '11 at 10:50

0 Answers0