System.Security.Permissions.FileIOPermission

System.Security.Permissions.FileIOPermission

Postby tristankoffee » Fri 29 Sep 2006 07:53

Hi,

We're converting a project we did about a year go in .NET 1.1 to .NET 2.0. The project used version 3.2 of the CoreLab.Oracle.dll. I've just gone in and downloaded the newest .NET 2 version as the old DLL didn't work once deployed to our web hosts (the old partially trusted callers problem).

The new DLL works no problem locally. However, once it is uploaded the page using the DLL errors with the following error:

System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed. at System.Security.CodeAccessSecurityEngine.Check(Object demand, StackCrawlMark& stackMark, Boolean isPermSet)
at System.Security.CodeAccessPermission.Demand()
at System.Reflection.Assembly.VerifyCodeBaseDiscovery(String codeBase)
at System.Reflection.Assembly.GetName(Boolean copiedName)
at System.Reflection.Assembly.GetName()
at CoreLab.Common.r.a(Assembly A_0)
at CoreLab.Common.ab.a(Type A_0, String& A_1, Assembly& A_2)
at CoreLab.Common.ab.a(Type A_0, String& A_1, Boolean& A_2, String& A_3)
at CoreLab.Common.ab.a(LicenseContext A_0, Type A_1, Object A_2, Boolean A_3)
at CoreLab.Oracle.OracleConnection.Open()
at cms.oracleHandler.GetDataReader(String sproc) in P:\C021EXR\mainSiteNet2\cms\oracleHandler.cs:line 34
at C021EXR.clientLogin.Authenticate(Object sender, EventArgs e) in P:\C021EXR\mainSiteNet2\clientLogin.aspx.cs:line 68

I assume it's a security thing with my web hosts and I've already emailed them to see if they can do anything about it, but I was just wondering if anybody has seen this before and/or if anybody had any ideas about how to solve it? This is quite urgent, so any help would be appreciated!

Many Thanks,

Tristan
tristankoffee
 
Posts: 3
Joined: Fri 29 Sep 2006 07:47

Postby Alexey » Fri 29 Sep 2006 08:23

Seemingly, there is "Medium" trust level on the server. So you need to get FileIOPermission allowed.
Alexey
 
Posts: 2756
Joined: Mon 13 Mar 2006 07:43

Postby tristankoffee » Fri 29 Sep 2006 08:43

Thanks for the swift reply Alexey!

Is there any way around it? We've asked our hosts in the past for security policies to be changed and they refused us.

What do we do if they won't change it? Do you know which file the DLL is trying to access that requires the permission!?

Many thanks once again!

Tristan
tristankoffee
 
Posts: 3
Joined: Fri 29 Sep 2006 07:47

Postby Alexey » Fri 29 Sep 2006 10:09

If you use Direct mode you would need only SocketPermission.
Alexey
 
Posts: 2756
Joined: Mon 13 Mar 2006 07:43

Postby tristankoffee » Mon 02 Oct 2006 08:18

Hi Alexey,

I tried changing to 'Direct' mode, and it's still giving the FileIOPermission error. Any ideas?

I'm just wondering why it tries to access files and which files it's trying to access?

Thanks again for your help,

Tristan
tristankoffee
 
Posts: 3
Joined: Fri 29 Sep 2006 07:47

Postby Alexey » Mon 02 Oct 2006 08:33

Send us small test project if possible to reproduce the problem; it is
desirable to use 'scott' schema objects, otherwise include definition of
your own database objects. Do not use third party components.
Also provide us with web.config files from the server.
Alexey
 
Posts: 2756
Joined: Mon 13 Mar 2006 07:43


Return to dotConnect for Oracle