[Mono-list] System.Exception.Security when mixing mono with microsoft

Sebastien Pouliot spouliot@videotron.ca
Wed, 24 Mar 2004 17:21:37 -0500


Non local assemblies (e.g. network drives) are given much less freedom than
local ones by the MS runtime.

Some ressources (like DNS) requires specific permissions (like
DnsPermission). However if you're using Mono's System.dll under MS runtime
the security exception is (most probably) because it tried to call unmanaged
code (which isn't permitted by default to non-local assemblies).

Sebastien Pouliot

-----Original Message-----
From: mono-list-admin@lists.ximian.com
[mailto:mono-list-admin@lists.ximian.com]On Behalf Of Ofer Achler
Sent: 24 mars 2004 13:10
To: mono-list@lists.ximian.com
Subject: [Mono-list] System.Exception.Security when mixing mono with


I'm trying to write a program that uses the mono system.dll but with the
Microsoft runtime, but I'm getting an exception of type
System.Security.SecurityException wiwth additional information: security
error. On trying to resolve a hostname:

System.Net.IPHostEntry tmp = System.Net.Dns.GetHostByName(value);

Causes the error.

I've read this would be caused by not running the program locally, but it
is.  Any ideas?

Thank you =)

Mono-list maillist  -  Mono-list@lists.ximian.com