<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>RestrictedMemberAccess</title><link>http://blogs.msdn.com/b/shawnfa/archive/2006/09/29/777047.aspx</link><description>The September CTP of Orcas went live last night, including lots of features that other MSDN blogs are buzzing about such as LINQ to Objects, partial C# 3.0 support, and partial VB 9.0 support. (And prompting me to create the new Orcas category to replace</description><dc:language>en-US</dc:language><generator>Telligent Evolution Platform Developer Build (Build: 5.6.50428.7875)</generator><item><title>re: RestrictedMemberAccess</title><link>http://blogs.msdn.com/b/shawnfa/archive/2006/09/29/777047.aspx#9918113</link><pubDate>Thu, 05 Nov 2009 18:10:48 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9918113</guid><dc:creator>shawnfa</dc:creator><description>&lt;p&gt;Hi Jamebo,&lt;/p&gt;
&lt;p&gt;What you're running into is that the demand triggered when B reflects onto A is for A's grant set + RestrictedMemberAccess. &amp;nbsp;That works out to FullTrust + RestrictedMemberAccess = FullTrust.&lt;/p&gt;
&lt;p&gt;The full trust demand will not fail when it sees B's frame on the stack, as you correctly noted B is in the GAC and fully trusted. &amp;nbsp;However, when the demand continues up the stack it will eventually hit the AppDomain boundary. &amp;nbsp;The domain itself is medium trust, so the demand for full trust fails there.&lt;/p&gt;
&lt;p&gt;What you would need to do in this situation is have B Assert for FullTrust before doing the reflection in order to prevent the demand from proceeding beyond B's frame and hitting the AppDomain.&lt;/p&gt;
&lt;p&gt;-Shawn&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9918113" width="1" height="1"&gt;</description></item><item><title>re: RestrictedMemberAccess</title><link>http://blogs.msdn.com/b/shawnfa/archive/2006/09/29/777047.aspx#9915194</link><pubDate>Fri, 30 Oct 2009 09:45:46 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9915194</guid><dc:creator>Jamebo</dc:creator><description>&lt;p&gt;HI, Shawn:&lt;/p&gt;
&lt;p&gt;Thank you for your great post to explain the details. I faced a problem in RestrictedMemberAccess flag. &lt;/p&gt;
&lt;p&gt;Case 1:&lt;/p&gt;
&lt;p&gt;Appdomain Boundary (MediumTrust + RestrictedMemberAccess ) -&amp;gt; Assembly A with FullTrust (in GAC)&lt;/p&gt;
&lt;p&gt;-&amp;gt; Assembly B with MediumTrust + RestrictedMemberAccess &lt;/p&gt;
&lt;p&gt;The result is okay as RestrictedMemberAccess described.&lt;/p&gt;
&lt;p&gt;Case 2:&lt;/p&gt;
&lt;p&gt;Install Assembly B into GAC, then it is:&lt;/p&gt;
&lt;p&gt;Appdomain Boundary (MediumTrust + RestrictedMemberAccess ) -&amp;gt; Assembly A with FullTrust (in GAC)&lt;/p&gt;
&lt;p&gt;-&amp;gt; Assembly B with Full Trust (in GAC)&lt;/p&gt;
&lt;p&gt;An Security exception will be thrown : Demand falied for&lt;/p&gt;
&lt;p&gt;&amp;lt;PermissionSet class=&amp;quot;System.Security.PermissionSet&amp;quot;version=&amp;quot;1&amp;quot; Unrestricted=&amp;quot;true&amp;quot;/&amp;gt;.&lt;/p&gt;
&lt;p&gt;Why? In case 2, Assembly B has same grant set with Assembly A. It should be okay for RestrictedMemberAccess. Could you please give me some comments?&lt;/p&gt;
&lt;p&gt;Thanks&lt;/p&gt;
&lt;p&gt;-Jamebo&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9915194" width="1" height="1"&gt;</description></item><item><title>David DeWinter &amp;raquo; Using LINQ to SQL and EF in Sharepoint under Medium Trust</title><link>http://blogs.msdn.com/b/shawnfa/archive/2006/09/29/777047.aspx#9563886</link><pubDate>Thu, 23 Apr 2009 06:35:32 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9563886</guid><dc:creator>David DeWinter &amp;raquo; Using LINQ to SQL and EF in Sharepoint under Medium Trust</dc:creator><description>&lt;p&gt;PingBack from &lt;a rel="nofollow" target="_new" href="http://blogs.rev-net.com/ddewinter/2009/04/22/using-linq-to-sql-and-ef-in-sharepoint-under-medium-trust/"&gt;http://blogs.rev-net.com/ddewinter/2009/04/22/using-linq-to-sql-and-ef-in-sharepoint-under-medium-trust/&lt;/a&gt;&lt;/p&gt;
&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9563886" width="1" height="1"&gt;</description></item></channel></rss>