<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: NHibernate Proxy Generator</title>
	<atom:link href="http://blog.symbiotic-development.com/2008/03/22/nhibernate-proxy-generator/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.symbiotic-development.com/2008/03/22/nhibernate-proxy-generator/</link>
	<description>Evolving Together</description>
	<lastBuildDate>Thu, 31 Mar 2011 18:54:23 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
	<item>
		<title>By: Mario</title>
		<link>http://blog.symbiotic-development.com/2008/03/22/nhibernate-proxy-generator/comment-page-1/#comment-168</link>
		<dc:creator>Mario</dc:creator>
		<pubDate>Sun, 22 Mar 2009 01:51:12 +0000</pubDate>
		<guid isPermaLink="false">http://blog.symbiotic-development.com/2008/03/22/nhibernate-proxy-generator/#comment-168</guid>
		<description>Hi,

I also had the problem making NHibernate work with medium trust and this is what I did:

First..you need some sort of hosting that allows reflection in your server...There are some like crystaltech.com which will allow you to use reflection (in shared hosting) as long as it is used for assemblies within your designated app folder.

Second...

Download the Castle.DynamicProxy-vs2005 project. NHibernate ships with the dll, but you will need to modify the assembly to allow lazy loading under medium trust. Once you have the assembly, make sure nhibernate references this assembly and not the old dll.

Open the Castle.DynamicProxy-vs2005 project and look for the ModuleScope.cs file (it is right in the main directory). There look for the method:
private AssemblyName GetAssemblyName (bool signStrongName)
In there comment out the following code:

if (signStrongName)
         {
             byte[] keyPairStream = GetKeyPair();

             if (keyPairStream != null)
             {
                 assemblyName.KeyPair = new StrongNameKeyPair(keyPairStream);
             }
         }




Now give it a shot.

Mario</description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>I also had the problem making NHibernate work with medium trust and this is what I did:</p>
<p>First..you need some sort of hosting that allows reflection in your server&#8230;There are some like crystaltech.com which will allow you to use reflection (in shared hosting) as long as it is used for assemblies within your designated app folder.</p>
<p>Second&#8230;</p>
<p>Download the Castle.DynamicProxy-vs2005 project. NHibernate ships with the dll, but you will need to modify the assembly to allow lazy loading under medium trust. Once you have the assembly, make sure nhibernate references this assembly and not the old dll.</p>
<p>Open the Castle.DynamicProxy-vs2005 project and look for the ModuleScope.cs file (it is right in the main directory). There look for the method:<br />
private AssemblyName GetAssemblyName (bool signStrongName)<br />
In there comment out the following code:</p>
<p>if (signStrongName)<br />
         {<br />
             byte[] keyPairStream = GetKeyPair();</p>
<p>             if (keyPairStream != null)<br />
             {<br />
                 assemblyName.KeyPair = new StrongNameKeyPair(keyPairStream);<br />
             }<br />
         }</p>
<p>Now give it a shot.</p>
<p>Mario</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Symbiotic Development &#187; NHibernate ProxyGenerators added to NHContrib</title>
		<link>http://blog.symbiotic-development.com/2008/03/22/nhibernate-proxy-generator/comment-page-1/#comment-146</link>
		<dc:creator>Symbiotic Development &#187; NHibernate ProxyGenerators added to NHContrib</dc:creator>
		<pubDate>Tue, 23 Sep 2008 06:56:02 +0000</pubDate>
		<guid isPermaLink="false">http://blog.symbiotic-development.com/2008/03/22/nhibernate-proxy-generator/#comment-146</guid>
		<description>[...] looks like the NHibernate Proxy Generator I discussed in a previous post has been added to the NHibernateForge, the NHibernate community and contribution [...]</description>
		<content:encoded><![CDATA[<div style="padding: 1em; color: blue;">
<p>[...] looks like the NHibernate Proxy Generator I discussed in a previous post has been added to the NHibernateForge, the NHibernate community and contribution [...]</p>
</div>
]]></content:encoded>
	</item>
	<item>
		<title>By: Reflective Perspective - Chris Alcock &#187; The Morning Brew #58</title>
		<link>http://blog.symbiotic-development.com/2008/03/22/nhibernate-proxy-generator/comment-page-1/#comment-65</link>
		<dc:creator>Reflective Perspective - Chris Alcock &#187; The Morning Brew #58</dc:creator>
		<pubDate>Tue, 25 Mar 2008 07:20:09 +0000</pubDate>
		<guid isPermaLink="false">http://blog.symbiotic-development.com/2008/03/22/nhibernate-proxy-generator/#comment-65</guid>
		<description>[...] NHibernate Proxy Generator - Some resources for getting NHibernate to play nicely in partial trust environments. [...]</description>
		<content:encoded><![CDATA[<div style="padding: 1em; color: blue;">
<p>[...] NHibernate Proxy Generator &#8211; Some resources for getting NHibernate to play nicely in partial trust environments. [...]</p>
</div>
]]></content:encoded>
	</item>
</channel>
</rss>

