History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: NH-442
Type: Improvement Improvement
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Unassigned
Reporter: Steen Rabol
Votes: 3
Watchers: 5
Operations

If you were logged in you would be able to see more operations.
NHibernate

Medium Trust level support

Created: 03/Nov/05 02:56 AM   Updated: 12/Mar/07 09:14 AM
Component/s: Core
Affects Version/s: 1.0
Fix Version/s: 1.2.0.Beta3

Issue Links:
Related
 


 Description  « Hide
Security execption is thrown if you use MHibernate on a server with medium trust level eg. web sites hosted on a shrared server. A possbible solution is shown in ASP.Net forum : http://nhibernate.sourceforge.net/forum/viewtopic.php?t=184


 All   Comments   Change History      Sort Order: Ascending order - Click to sort in descending order
Sergey Koshcheyev - 20/Dec/05 03:01 PM
The proposed solution involves avoiding the use of IdentityHashCodeProvider. This might unfortunately lead to subtle bugs at runtime, so I don't want to go that route. If somebody finds an implementation of identity hash map for .NET that is usable under restrictive security settings, please let us know.

Sergey Koshcheyev - 26/Jul/06 05:56 AM
The IdentityHashCodeProvider issue is (I believe) solved in 1.2.0.Alpha1 build since that version uses RuntimeHelpers.GetHashCode method instead of a custom IL-based solution.

I'm reopening this issue to track any other changes needed to make NH run under medium trust.

Sergey Koshcheyev - 27/Jul/06 08:28 AM
I ran FxCop on NHibernate and it didn't report any serious security errors beyond some issues with GetObjectData methods, so I guess I will just add the AllowPartiallyTrustedCallers attribute both to NH and to Iesi.Collections.

David Givoni - 26/Aug/06 03:35 PM
Any plans on when this will be incorporated into a release?

Sergey Koshcheyev - 04/Sep/06 07:45 AM
The APTCA attribute will be part of Beta1. I don't know how much it will help though so I'm still leaving the issue open.

Sergey Koshcheyev - 29/Nov/06 05:07 AM
Verified that NH works under medium trust (example is in SVN). The only significant limitation is that DynamicProxy throws a SecurityException so proxies have to be disabled.