yiskang / csharp-sqlite

Automatically exported from code.google.com/p/csharp-sqlite
Other
0 stars 0 forks source link

Can not run under Medium Trust #53

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
System.Security.SecurityException: Request for the permission of type
'System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.0.0,
Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.

csSQLite.winOpen(sqlite3_vfs pVfs, String zName, sqlite3_file pFile, Int32
flags, Int32& pOutFlags)

Original issue reported on code.google.com by loveyuki on 19 Feb 2010 at 1:05

GoogleCodeExporter commented 8 years ago

Original comment by noah.hart@gmail.com on 19 Feb 2010 at 10:42

GoogleCodeExporter commented 8 years ago
What platform are you running this on?  

If you are runnning under Silverlight, be sure to compile with the preprocessor
directive SILVERLIGHT

Original comment by noah.hart@gmail.com on 20 Feb 2010 at 4:53

GoogleCodeExporter commented 8 years ago
i add compile directive SLIVERLIGHT
get error too

System.Security.SecurityException: Request for the permission of type
'System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.0.0,
Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.

System.Data.SQLite.Engine.csSQLite.winRead(sqlite3_file id, Byte[] pBuf, Int32 
amt,
Int64 offset)

Original comment by loveyuki on 21 Feb 2010 at 7:09

GoogleCodeExporter commented 8 years ago
csSQLite tells me you are not using the latest code.

Please get current versions and try again

also compile directive 
is SILVERLIGHT
not SLIVERLIGHT

Original comment by noah.hart@gmail.com on 21 Feb 2010 at 4:43

GoogleCodeExporter commented 8 years ago
i modify some code .
now, this can run in medium trust.

Original comment by loveyuki on 22 Feb 2010 at 2:13

Attachments:

GoogleCodeExporter commented 8 years ago
Fixed with 
changeset:   52:c8b9bab808c8
tag:         tip
user:        Noah
date:        Mon Feb 22 12:54:28 2010 -0800
files:      
Community.CsharpSqlite.Silverlight/Community.CsharpSqlite.Silverlight.csproj
Community.CsharpSqlite.Silverlight/Community.Data.SQLite.Silverlight.csproj
Community.CsharpSqlite.Silverlight/Community.Data.SQLite.Silverlight.sln
Community.CsharpSqlite/src/_Custom.cs Community.CsharpSqlite/src/os_win_c.cs
description:
Updates for Medium Trust
Changed define from SILVERLIGHT to SQLITE_SILVERLIGHT

Original comment by noah.hart@gmail.com on 22 Feb 2010 at 8:54