how to NOT "destabilize the runtime"

Using (or providing) Microsoft.NET Classes

how to NOT "destabilize the runtime"

Postby jGoff on Wed Oct 27, 2010 12:00 pm

I've just used Dyalog to create a .Net DLL. When I do the export, I am told that that the assembly was successfully emitted to file.

However when I attempt to run it from Dyalog (use []NEW), I get the following message:

"System.Security.VerificationException: Operation could destabilize the runtime"

I believe this is saying that there's been a security violation.

Anyone know how do I get Dyalog to create a secure DLL, or give it permission to run an insecure one?

I am able to get this error using the simplest DLL possible. The first example in ".Net Interface Guide" (v12.0 p38-42) which only does a lone iota will trigger the security breach. In this case I was able to run Dyalog as the administrator and then be successful. However "running as administrator" is not strong enough to run my own more complex DLL.

Advise anyone?
jGoff
 
Posts: 26
Joined: Fri Jun 19, 2009 12:25 pm

Re: how to NOT "destabilize the runtime"

Postby JohnD|Dyalog on Fri Oct 29, 2010 12:05 pm

Hi Jim,

I'm in the process of setting up a Virtual Machine to repro this. Is this with .Net 4.0?

/john
User avatar
JohnD|Dyalog
 
Posts: 74
Joined: Wed Oct 01, 2008 9:35 am

Re: how to NOT "destabilize the runtime"

Postby jGoff on Fri Oct 29, 2010 6:59 pm

Hi John,

When I first encountered the problem my config file was:

<?xml version ="1.0"?>
<configuration>
<runtime>
<NetFx40_LegacySecurityPolicy enabled="true"/>
</runtime>

<startup useLegacyV2RuntimeActivationPolicy="true">
<supportedRuntime version="v4.0.30319" />
</startup>
</configuration>

-----------------------------------------------------------

As part of my process of flailing-about to get things going, I removed this config file, so I'm back to the Dyalog's default, i.e. no dyalog.exe.config file.

-----------------------------------------------------------

Thanks for taking a look at this,

Jim
jGoff
 
Posts: 26
Joined: Fri Jun 19, 2009 12:25 pm

Re: how to NOT "destabilize the runtime"

Postby JohnD|Dyalog on Mon Nov 08, 2010 9:44 am

OK Jim, I can reproduce the issue on a clean VM.

It looks like (as you probably suspected) a change in the security model between .Net 2.0 and .Net 4.0. I'll investigate in more detail and try to provide a fix. In the meantime you could try installing and running with .Net 2.0, or run as administrator (which I think will work).

Best Regards,
John Daintree,
User avatar
JohnD|Dyalog
 
Posts: 74
Joined: Wed Oct 01, 2008 9:35 am


Return to Microsoft.NET

Who is online

Users browsing this forum: No registered users and 1 guest