darin_dimitrov@hotmail.co Guest
|
Posted: Fri May 20, 2005 8:25 am Post subject: Delphi 2005 raises SecurityException in a .NET console appli |
|
|
Hello,
When I try to run the following program (.NET)
----snip----
program Project1;
{$APPTYPE CONSOLE}
uses
StrUtils;
begin
end.
----snip----
I get:
Unhandled Exception: System.TypeInitializationException: An exception
was thrown by the type initializer for "Project1.Units.Project1". --->
System.TypeInitializationException: An exception was thrown by the type
initializer for "Borland.Vcl.Units.StrUtils". --->
System.TypeInitializationException: An exception was
thrown by the type initializer for "Borland.Vcl.Units.SysUtils".
---> System.Security.SecurityException: Request for the
permission of type System.Security.Permissions.SecurityPermission,
mscorlib, Version=1.0.5000.0, Culture=neutral,
PublicKeyToken=b77a5c561934e089 failed.
at Borland.Vcl.Units.SysUtils.InitPlatformId()
at Borland.Vcl.Units.SysUtils.Borland.Vcl.SysUtils()
at Borland.Vcl.Units.SysUtils..cctor()
The state of the failed permission was:
<IPermission class="System.Security.Permissions.SecurityPermission,
mscorlib, Ve
rsion=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
version="1"
Flags="UnmanagedCode"/>
--- End of inner exception stack trace ---
at
System.Runtime.CompilerServices.RuntimeHelpers.RunClassConstructor(Runtime
TypeHandle type)
at Borland.Vcl.Units.StrUtils..cctor()
--- End of inner exception stack trace ---
at
System.Runtime.CompilerServices.RuntimeHelpers.RunClassConstructor(Runtime
TypeHandle type)
at Project1.Units.Project1..cctor()
--- End of inner exception stack trace ---
at Project1.Units.Project1.Project1()
Do you have any clues?
|
|