"Operation could destabilize the runtime" error when running Evaluate() or HasErrors()

Jul 19, 2010 at 6:36 PM
Hi! After having looked around a bit for a calculation parser, I found NCalc. Today I finally reached the point where I though I could start using it. For a start I wanted NCalc to validate the syntax of some expressions. But as soon as I run HasErrors() or Evaluate(), I get a "Operation could destabilize the runtime" error which makes it impossible for me to test NCalc locally. On my local development machine I'm running the app from IIS 7 (or is it 7.5?) on Windows Server 2008R2. If I upload the app to my web host it works just fine which is opposite to what these kinds of problems usually are. Is this anything you've seen before and know how to solve?
Jul 20, 2010 at 10:19 AM

I solved the problem by changing the App pool user for the IIS website from DefaultAppPool to ASP.NET v4.0, but I still don't know why that solved it?

Jul 18, 2011 at 12:30 PM

Hi, i've the same problem with a Winform App... i don't understand.

Someone can help me please ?

 

Coordinator
Jul 18, 2011 at 6:37 PM

Can you provide a testable piece of code ?

Thanks
Sebastien

Jul 20, 2011 at 11:20 AM

in my app.config i'have this line

<NetFx40_LegacySecurityPolicy enabled="true" />

without this line, allwoks fine...