<?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: Running SharpArchitecture in medium trust</title>
	<atom:link href="http://paulwideman.com/softwareartist/2009/12/27/running-sharparchitecture-in-medium-trust/feed/" rel="self" type="application/rss+xml" />
	<link>http://paulwideman.com/softwareartist/2009/12/27/running-sharparchitecture-in-medium-trust/</link>
	<description>Code is a form of art.</description>
	<lastBuildDate>Thu, 23 Dec 2010 18:09:29 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.3</generator>
	<item>
		<title>By: Paul</title>
		<link>http://paulwideman.com/softwareartist/2009/12/27/running-sharparchitecture-in-medium-trust/comment-page-1/#comment-25</link>
		<dc:creator>Paul</dc:creator>
		<pubDate>Fri, 04 Jun 2010 18:51:25 +0000</pubDate>
		<guid isPermaLink="false">http://paulwideman.com/softwareartist/?p=95#comment-25</guid>
		<description>@Laury:

Check which version of Castle DynamicProxy you&#039;re using. The version that was included with S#arp 1.0 did not work in medium trust, but later versions do. You shouldn&#039;t have to disable lazy loading completely. Also note that this post is rather out of date, the Castle source is now in github. See my post on S#arp 1.5 and medium trust for more details.

Also, I&#039;m afraid I&#039;m not much help on your other issues with GoDaddy. I host a site there too, and while I&#039;m not running a production S#arp site there I am in the process of building one to run on my GoDaddy account, and so far I&#039;ve had success getting it to run there. There are some things I can&#039;t do (like use AutoMapper, for instance), but the basic S#arp site works OK.

Hope you get everything working.</description>
		<content:encoded><![CDATA[<p>@Laury:</p>
<p>Check which version of Castle DynamicProxy you&#8217;re using. The version that was included with S#arp 1.0 did not work in medium trust, but later versions do. You shouldn&#8217;t have to disable lazy loading completely. Also note that this post is rather out of date, the Castle source is now in github. See my post on S#arp 1.5 and medium trust for more details.</p>
<p>Also, I&#8217;m afraid I&#8217;m not much help on your other issues with GoDaddy. I host a site there too, and while I&#8217;m not running a production S#arp site there I am in the process of building one to run on my GoDaddy account, and so far I&#8217;ve had success getting it to run there. There are some things I can&#8217;t do (like use AutoMapper, for instance), but the basic S#arp site works OK.</p>
<p>Hope you get everything working.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Laury</title>
		<link>http://paulwideman.com/softwareartist/2009/12/27/running-sharparchitecture-in-medium-trust/comment-page-1/#comment-24</link>
		<dc:creator>Laury</dc:creator>
		<pubDate>Fri, 04 Jun 2010 17:53:54 +0000</pubDate>
		<guid isPermaLink="false">http://paulwideman.com/softwareartist/?p=95#comment-24</guid>
		<description>What would you know. I added .Not.LazyLoad() to every reference in my mapping files and it works now, 

In addition, some lines for any of you to be aware of what medium trust can affect despite NHibernate. In my local version I have medium trust on and: 

- I can cache a byte[] which represent an image on my site, well, in godaddy, apparently, this have been restricted in medium trust. All the images on my site doesn&#039;t show.

- Some css doesn&#039;t work (I don&#039;t know why, css doesn&#039;t represent a treat of any kind on securities). In Conclusion it&#039;s time to get my business somewhere else. 
This 2 first observations works locally, in Godaddy not.

This last one doesn&#039;t work anywhere:
- Well, with Ajax, I internally render a View from the Controller and display the html returned on a division tag (that&#039;s the beauty of mvc). Well, my renderpartialtostring process doesn&#039;t work and break with an exception in System.Security.Permissions.SecurityPermission. I bet that is when it tries to render the view by using the framework.

In conclusion, run as far as you can from GoDaddy if you are using ASP.NET 2.0/3.0/3.5. They support full trust only in ASP.NET 1.1

Cheers</description>
		<content:encoded><![CDATA[<p>What would you know. I added .Not.LazyLoad() to every reference in my mapping files and it works now, </p>
<p>In addition, some lines for any of you to be aware of what medium trust can affect despite NHibernate. In my local version I have medium trust on and: </p>
<p>- I can cache a byte[] which represent an image on my site, well, in godaddy, apparently, this have been restricted in medium trust. All the images on my site doesn&#8217;t show.</p>
<p>- Some css doesn&#8217;t work (I don&#8217;t know why, css doesn&#8217;t represent a treat of any kind on securities). In Conclusion it&#8217;s time to get my business somewhere else.<br />
This 2 first observations works locally, in Godaddy not.</p>
<p>This last one doesn&#8217;t work anywhere:<br />
- Well, with Ajax, I internally render a View from the Controller and display the html returned on a division tag (that&#8217;s the beauty of mvc). Well, my renderpartialtostring process doesn&#8217;t work and break with an exception in System.Security.Permissions.SecurityPermission. I bet that is when it tries to render the view by using the framework.</p>
<p>In conclusion, run as far as you can from GoDaddy if you are using ASP.NET 2.0/3.0/3.5. They support full trust only in ASP.NET 1.1</p>
<p>Cheers</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Laury</title>
		<link>http://paulwideman.com/softwareartist/2009/12/27/running-sharparchitecture-in-medium-trust/comment-page-1/#comment-23</link>
		<dc:creator>Laury</dc:creator>
		<pubDate>Fri, 04 Jun 2010 04:44:55 +0000</pubDate>
		<guid isPermaLink="false">http://paulwideman.com/softwareartist/?p=95#comment-23</guid>
		<description>Thanks for the answer Paul.
And yes, it&#039;s false. I&#039;ve tried everything already (well it&#039;s should be working if so). I think I&#039;m about to throw the towel already.

I read something about ProxyGenerator though, but isn&#039;t that NHibernate.ByteCode.Castle.ProxyFactoryFactory is for? I&#039;ll be playing with that.

Thanks anyway</description>
		<content:encoded><![CDATA[<p>Thanks for the answer Paul.<br />
And yes, it&#8217;s false. I&#8217;ve tried everything already (well it&#8217;s should be working if so). I think I&#8217;m about to throw the towel already.</p>
<p>I read something about ProxyGenerator though, but isn&#8217;t that NHibernate.ByteCode.Castle.ProxyFactoryFactory is for? I&#8217;ll be playing with that.</p>
<p>Thanks anyway</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Paul</title>
		<link>http://paulwideman.com/softwareartist/2009/12/27/running-sharparchitecture-in-medium-trust/comment-page-1/#comment-22</link>
		<dc:creator>Paul</dc:creator>
		<pubDate>Fri, 04 Jun 2010 02:31:06 +0000</pubDate>
		<guid isPermaLink="false">http://paulwideman.com/softwareartist/?p=95#comment-22</guid>
		<description>@Laury:

If you were having a problem with an assembly lacking the APTC attribute then you&#039;d get an assembly loading error. I don&#039;t think that&#039;s the case here. Make sure you&#039;ve set the reflection-optimizer to false in your NH config.</description>
		<content:encoded><![CDATA[<p>@Laury:</p>
<p>If you were having a problem with an assembly lacking the APTC attribute then you&#8217;d get an assembly loading error. I don&#8217;t think that&#8217;s the case here. Make sure you&#8217;ve set the reflection-optimizer to false in your NH config.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Laury</title>
		<link>http://paulwideman.com/softwareartist/2009/12/27/running-sharparchitecture-in-medium-trust/comment-page-1/#comment-21</link>
		<dc:creator>Laury</dc:creator>
		<pubDate>Wed, 02 Jun 2010 20:55:20 +0000</pubDate>
		<guid isPermaLink="false">http://paulwideman.com/softwareartist/?p=95#comment-21</guid>
		<description>btw, I analyzed the stack trace and apparently I can&#039;t create a proxy... my code breaks here 
 NHibernate.ByteCode.Castle.ProxyFactory.GetProxy(Object id, ISessionImplementor session) +416. And the InnerException message says &quot;Creating a proxy instance failed&quot;

Does this mean that NHibernate.ByteCode.Castle or Castle.DynamicProxy don&#039;t have APTC on? because I made it, more than once, for days!! I even know all the process by heart.

Can someone help me please?</description>
		<content:encoded><![CDATA[<p>btw, I analyzed the stack trace and apparently I can&#8217;t create a proxy&#8230; my code breaks here<br />
 NHibernate.ByteCode.Castle.ProxyFactory.GetProxy(Object id, ISessionImplementor session) +416. And the InnerException message says &#8220;Creating a proxy instance failed&#8221;</p>
<p>Does this mean that NHibernate.ByteCode.Castle or Castle.DynamicProxy don&#8217;t have APTC on? because I made it, more than once, for days!! I even know all the process by heart.</p>
<p>Can someone help me please?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Laury</title>
		<link>http://paulwideman.com/softwareartist/2009/12/27/running-sharparchitecture-in-medium-trust/comment-page-1/#comment-20</link>
		<dc:creator>Laury</dc:creator>
		<pubDate>Wed, 02 Jun 2010 19:02:30 +0000</pubDate>
		<guid isPermaLink="false">http://paulwideman.com/softwareartist/?p=95#comment-20</guid>
		<description>This is great. Such a useful post. Thanks Paul. Saved me a lot of time.

Nevertheless, I still can make it work entirely because I&#039;m getting an exception that says &quot;Request for the permission of type &#039;System.Security.Permissions.ReflectionPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089&#039; failed.&quot;.

My site is in godaddy (figures). I made this build work after my third try and I just don&#039;t want to give this up being so close to resolve it and bit godaddy&#039;s medium trust. If anyone can help me would be great.

Cheers</description>
		<content:encoded><![CDATA[<p>This is great. Such a useful post. Thanks Paul. Saved me a lot of time.</p>
<p>Nevertheless, I still can make it work entirely because I&#8217;m getting an exception that says &#8220;Request for the permission of type &#8216;System.Security.Permissions.ReflectionPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089&#8242; failed.&#8221;.</p>
<p>My site is in godaddy (figures). I made this build work after my third try and I just don&#8217;t want to give this up being so close to resolve it and bit godaddy&#8217;s medium trust. If anyone can help me would be great.</p>
<p>Cheers</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: SharpArchitecture 1.5 in medium trust &#183; The Software Artist</title>
		<link>http://paulwideman.com/softwareartist/2009/12/27/running-sharparchitecture-in-medium-trust/comment-page-1/#comment-17</link>
		<dc:creator>SharpArchitecture 1.5 in medium trust &#183; The Software Artist</dc:creator>
		<pubDate>Sun, 16 May 2010 16:50:56 +0000</pubDate>
		<guid isPermaLink="false">http://paulwideman.com/softwareartist/?p=95#comment-17</guid>
		<description>[...] previous post on running S#arpArchitecture 1.0 in medium trust seemed to be helpful to a few, so here are [...]</description>
		<content:encoded><![CDATA[<p>[...] previous post on running S#arpArchitecture 1.0 in medium trust seemed to be helpful to a few, so here are [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Paul</title>
		<link>http://paulwideman.com/softwareartist/2009/12/27/running-sharparchitecture-in-medium-trust/comment-page-1/#comment-16</link>
		<dc:creator>Paul</dc:creator>
		<pubDate>Thu, 01 Apr 2010 15:20:50 +0000</pubDate>
		<guid isPermaLink="false">http://paulwideman.com/softwareartist/?p=95#comment-16</guid>
		<description>Glad you got it working Ben, and sorry for not responding for so long, I&#039;ve been busy at work and haven&#039;t had much time for this blog or the personal project I&#039;m working on with SharpArch. Hoping to pick it back up soon though.</description>
		<content:encoded><![CDATA[<p>Glad you got it working Ben, and sorry for not responding for so long, I&#8217;ve been busy at work and haven&#8217;t had much time for this blog or the personal project I&#8217;m working on with SharpArch. Hoping to pick it back up soon though.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ben Scott</title>
		<link>http://paulwideman.com/softwareartist/2009/12/27/running-sharparchitecture-in-medium-trust/comment-page-1/#comment-15</link>
		<dc:creator>Ben Scott</dc:creator>
		<pubDate>Wed, 10 Mar 2010 14:24:10 +0000</pubDate>
		<guid isPermaLink="false">http://paulwideman.com/softwareartist/?p=95#comment-15</guid>
		<description>Hey Paul,

Nevermind, I found it!  On the 3rd complete rebuild I found that the -D:assembly.allow-partially-trusted-callers=true on some of the Castle projects (Castle.MicroKernel and Castle.Windsor) didn&#039;t work.  I had to manually modify the AssemblyInfo.cs for both projects to solve my issue.

Thanks again for blogging this.  You have literally saved me a week&#039;s work.

Ben.</description>
		<content:encoded><![CDATA[<p>Hey Paul,</p>
<p>Nevermind, I found it!  On the 3rd complete rebuild I found that the -D:assembly.allow-partially-trusted-callers=true on some of the Castle projects (Castle.MicroKernel and Castle.Windsor) didn&#8217;t work.  I had to manually modify the AssemblyInfo.cs for both projects to solve my issue.</p>
<p>Thanks again for blogging this.  You have literally saved me a week&#8217;s work.</p>
<p>Ben.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ben Scott</title>
		<link>http://paulwideman.com/softwareartist/2009/12/27/running-sharparchitecture-in-medium-trust/comment-page-1/#comment-14</link>
		<dc:creator>Ben Scott</dc:creator>
		<pubDate>Wed, 10 Mar 2010 13:32:09 +0000</pubDate>
		<guid isPermaLink="false">http://paulwideman.com/softwareartist/?p=95#comment-14</guid>
		<description>Hi Paul,

I&#039;ve nearly got it to work with the current versions of the entire stack.  One final hang up which I&#039;m hoping you&#039;ve encountered is to do with the InitializeServiceLocator() method in Global.asax.  It&#039;s still throwing the SecurityException but I&#039;m having trouble attaching a debugger.  Did you run into the same issue?

Thanks,
Ben.</description>
		<content:encoded><![CDATA[<p>Hi Paul,</p>
<p>I&#8217;ve nearly got it to work with the current versions of the entire stack.  One final hang up which I&#8217;m hoping you&#8217;ve encountered is to do with the InitializeServiceLocator() method in Global.asax.  It&#8217;s still throwing the SecurityException but I&#8217;m having trouble attaching a debugger.  Did you run into the same issue?</p>
<p>Thanks,<br />
Ben.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

