structuremap icon indicating copy to clipboard operation
structuremap copied to clipboard

Operation could destabilize the runtime? Fails on some machines

Open mschreibernaoual opened this issue 12 years ago • 6 comments

I am getting this issue on my machine, but other dev machines are working ok. Same source, setup, etc.. Has anyone seen this before?

Operation could destabilize the runtime. 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.Security.VerificationException: Operation could destabilize the runtime.

Source Error:

Line 25: public static IContainer Initialize() Line 26: { Line 27: ObjectFactory.Initialize(x => x.Scan(scan => Line 28: { Line 29: scan.TheCallingAssembly();

mschreibernaoual avatar May 03 '14 02:05 mschreibernaoual

I don't think this is going to end up being a StructureMap problem. There's some type in your assembly that isn't trusted by the CLR. Google that exception and go through the StackOverflow questions is my best advice.

jeremydmiller avatar Jun 24 '14 03:06 jeremydmiller

@mschreibernaoual, did you ever figure this issue out. Was it related fixed by some Windows Update? Same thing is happening to me after migrating to the SM 3.1. Issue only exists on production machine. Not issue on developer machines or QA machines.

gbanister avatar Sep 30 '14 20:09 gbanister

I experienced this problem several yrs ago (not using SM). We'd tried a couple of things - none of which worked:

  1. turning off APTCA (allow partially trusted callers)
  2. setting a security attribute for the assembly - SkipVerificationInFullTrust = true

Eventually, found it was caused by a Hotfix that MS released. They'd issued a fix for this problem though a couple weeks later (assuming you're up to date with your service packs/hotfixes/.NET updates.

udlose avatar Sep 30 '14 21:09 udlose

It was. A hot fix fixed the issue

Sent from my iPhone

On Sep 30, 2014, at 2:42 PM, Greg Banister [email protected] wrote:

@mschreibernaoual https://github.com/mschreibernaoual, did you ever figure this issue out. Was it related fixed by some Windows Update? Same thing is happening to me after migrating to the SM 3.1. Issue only exists on production machine. Not issue on developer machines or QA machines.

— Reply to this email directly or view it on GitHub https://github.com/structuremap/structuremap/issues/254#issuecomment-57379425 .

mschreibernaoual avatar Oct 01 '14 00:10 mschreibernaoual

Can you please let me know HotFix URL to fix the same .

satish860 avatar Jul 13 '15 05:07 satish860

We updated the windows machine to the latest hotfixes

ms-denver avatar Jul 13 '15 19:07 ms-denver