You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user-cs@ibatis.apache.org by Ron Grabowski <ro...@yahoo.com> on 2006/04/01 00:03:19 UTC

Re: iBatis and Medium Trust Environments

Is this with .NET 1.1 or 2.0? I have applications hosted with
GoDaddy.com and I haven't recieved any errors about security.

--- Shawn Smiley <ss...@yahoo.com> wrote:

> Thanks for the reply.  Unfortunately my code will be running on a
> shared server at my hosting provider so I can't modify the trust
> level or allowed permissions.  
> 
> I'll just have to come up with a different DAL solution.  I'll
> probably just throw together a very simple one (I only have 3 tables
> in a SQL Server db).
> 
> 
> Thanks,
> 
> Shawn.
> 
> Gilles Bayon <ib...@gmail.com> wrote: You might try to modify
> the web_mediumtrust.config to grant Assertion and Reflect permission
> based on the strong name.
> 
> 
>  On 3/31/06, Shawn Smiley <ss...@yahoo.com> wrote:  Is it
> possible to use iBatis on a web server that has been configured to
> allow ASP.net websites to operate only under Medium trust?
> 
> I've tried this with a simple test application and get a Security
> error when trying to access the iBatis libraries. 
> 
> I'm guessing that it probably isn't possible since Medium trust puts
> a lot of restrictions on reflection and I believe iBatis uses
> reflection for mapping fields to properties in the DAL classes.
> 
> Thanks, 
>   
>  
> Shawn.
> 
>    
> 
> ---------------------------------
>  New Yahoo! Messenger with Voice.  Call regular phones from your PC
> and save big.  
> 
> 
> 
> 
>  
> 
> 		
> ---------------------------------
> New Yahoo! Messenger with Voice. Call regular phones from your PC and
> save big.


Re: iBatis and Medium Trust Environments

Posted by dcyphr88 <be...@yahoo.com>.
Has anyone found a solution to this? I'm experiencing the same problem with a
shared hosted web farm. I'm running under medium trust and I got this error
with the latest version:

==========================
 Security Exception
Description: The application attempted to perform an operation not allowed
by the security policy.  To grant this application the required permission
please contact your system administrator or change the application's trust
level in the configuration file.

Exception Details: System.Security.SecurityException: That assembly does not
allow partially trusted callers.
==========================

So I recompiled, adding this to the AssemblyInfo.cs:
[assembly: AllowPartiallyTrustedCallers]

Then got this error when it hit builder.ConfigureAndWatch:

==========================
 Security Exception
Description: The application attempted to perform an operation not allowed
by the security policy.  To grant this application the required permission
please contact your system administrator or change the application's trust
level in the configuration file.

Exception Details: System.Security.SecurityException: Request failed.
==========================

Any way around this while still running under medium trust??


Shawn Smiley wrote:
> 
> This is currently with .net 1.1 hosted by 1&1.  The FAQ on their site
> doesn't explicitly say that they are running in Medium trust, but I
> inferred that based on the list of restrictions they indicate.
> 
> The restrictions include:
> -No file access outside of the application directory
> -No calls to unmanaged code
> -No access to any data access driver other than System.Data.SqlClient
> -No access to IsolatedStorage
> -No access to system environment variables
> -Application Tracing/debugging is not allowed
> -No access to Message Queues, Directory Services, Printing, or Performance
> Counters
> -No access to the Registry or Windows Event Logs
> -Control of security relavant infrastructure like ControlAppDomain,
> ControlEvidence, RemotingConfiguration, UnmangedCode and others
> --Cannot create or open network sockets
> 
> 
> Thanks,
> Shawn
> 
> 
> Ron Grabowski <ro...@yahoo.com> wrote: Is this with .NET 1.1 or
> 2.0? I have applications hosted with
> GoDaddy.com and I haven't recieved any errors about security.
> 
> --- Shawn Smiley  wrote:
> 
>> Thanks for the reply.  Unfortunately my code will be running on a
>> shared server at my hosting provider so I can't modify the trust
>> level or allowed permissions.  
>> 
>> I'll just have to come up with a different DAL solution.  I'll
>> probably just throw together a very simple one (I only have 3 tables
>> in a SQL Server db).
>> 
>> 
>> Thanks,
>> 
>> Shawn.
>> 
>> Gilles Bayon  wrote: You might try to modify
>> the web_mediumtrust.config to grant Assertion and Reflect permission
>> based on the strong name.
>> 
>> 
>>  On 3/31/06, Shawn Smiley  wrote:  Is it
>> possible to use iBatis on a web server that has been configured to
>> allow ASP.net websites to operate only under Medium trust?
>> 
>> I've tried this with a simple test application and get a Security
>> error when trying to access the iBatis libraries. 
>> 
>> I'm guessing that it probably isn't possible since Medium trust puts
>> a lot of restrictions on reflection and I believe iBatis uses
>> reflection for mapping fields to properties in the DAL classes.
>> 
>> Thanks, 
>>   
>>  
>> Shawn.
>> 
>>    
>> 
>> ---------------------------------
>>  New Yahoo! Messenger with Voice.  Call regular phones from your PC
>> and save big.  
>> 
>> 
>> 
>> 
>>  
>> 
>>   
>> ---------------------------------
>> New Yahoo! Messenger with Voice. Call regular phones from your PC and
>> save big.
> 
> 
> 
> 		
> ---------------------------------
> New Yahoo! Messenger with Voice. Call regular phones from your PC and save
> big.
> 

-- 
View this message in context: http://www.nabble.com/iBatis-and-Medium-Trust-Environments-tp3679770p20431279.html
Sent from the iBATIS - User - Cs mailing list archive at Nabble.com.


Re: iBatis and Medium Trust Environments

Posted by Shawn Smiley <ss...@yahoo.com>.
This is currently with .net 1.1 hosted by 1&1.  The FAQ on their site doesn't explicitly say that they are running in Medium trust, but I inferred that based on the list of restrictions they indicate.

The restrictions include:
-No file access outside of the application directory
-No calls to unmanaged code
-No access to any data access driver other than System.Data.SqlClient
-No access to IsolatedStorage
-No access to system environment variables
-Application Tracing/debugging is not allowed
-No access to Message Queues, Directory Services, Printing, or Performance Counters
-No access to the Registry or Windows Event Logs
-Control of security relavant infrastructure like ControlAppDomain, ControlEvidence, RemotingConfiguration, UnmangedCode and others
--Cannot create or open network sockets


Thanks,
Shawn


Ron Grabowski <ro...@yahoo.com> wrote: Is this with .NET 1.1 or 2.0? I have applications hosted with
GoDaddy.com and I haven't recieved any errors about security.

--- Shawn Smiley  wrote:

> Thanks for the reply.  Unfortunately my code will be running on a
> shared server at my hosting provider so I can't modify the trust
> level or allowed permissions.  
> 
> I'll just have to come up with a different DAL solution.  I'll
> probably just throw together a very simple one (I only have 3 tables
> in a SQL Server db).
> 
> 
> Thanks,
> 
> Shawn.
> 
> Gilles Bayon  wrote: You might try to modify
> the web_mediumtrust.config to grant Assertion and Reflect permission
> based on the strong name.
> 
> 
>  On 3/31/06, Shawn Smiley  wrote:  Is it
> possible to use iBatis on a web server that has been configured to
> allow ASP.net websites to operate only under Medium trust?
> 
> I've tried this with a simple test application and get a Security
> error when trying to access the iBatis libraries. 
> 
> I'm guessing that it probably isn't possible since Medium trust puts
> a lot of restrictions on reflection and I believe iBatis uses
> reflection for mapping fields to properties in the DAL classes.
> 
> Thanks, 
>   
>  
> Shawn.
> 
>    
> 
> ---------------------------------
>  New Yahoo! Messenger with Voice.  Call regular phones from your PC
> and save big.  
> 
> 
> 
> 
>  
> 
>   
> ---------------------------------
> New Yahoo! Messenger with Voice. Call regular phones from your PC and
> save big.



		
---------------------------------
New Yahoo! Messenger with Voice. Call regular phones from your PC and save big.