<?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>Host Protection</title><link>http://blogs.msdn.com/b/shawnfa/archive/2005/10/12/480186.aspx</link><description>One of our new Whidbey hosting features is called Host Protection -- basically it allows an application hosting the CLR to declare some types of operations off limits for use by hosted code. This is orthogonal to CAS in that CAS allows an administrator</description><dc:language>en-US</dc:language><generator>Telligent Evolution Platform Developer Build (Build: 5.6.50428.7875)</generator><item><title>re: Host Protection</title><link>http://blogs.msdn.com/b/shawnfa/archive/2005/10/12/480186.aspx#10080243</link><pubDate>Mon, 25 Oct 2010 06:38:52 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10080243</guid><dc:creator>Bydia</dc:creator><description>&lt;p&gt;Is it this Host Protection that is blocking my Trace.Writes to not cross boundaries like System account to logged in user account?&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10080243" width="1" height="1"&gt;</description></item><item><title>re: Host Protection</title><link>http://blogs.msdn.com/b/shawnfa/archive/2005/10/12/480186.aspx#9634357</link><pubDate>Fri, 22 May 2009 00:28:05 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9634357</guid><dc:creator>shawnfa</dc:creator><description>&lt;p&gt;The CLR doesn't provide a general mechanism to disable host protection (otherwise the hosts wouldn't be too happy :-) ). &amp;nbsp; Individual hosts may have a way to do so, but in general that won't be possible.&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=9634357" width="1" height="1"&gt;</description></item><item><title>re: Host Protection</title><link>http://blogs.msdn.com/b/shawnfa/archive/2005/10/12/480186.aspx#9519006</link><pubDate>Mon, 30 Mar 2009 17:07:58 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9519006</guid><dc:creator>Amitabh Ranjan</dc:creator><description>&lt;p&gt;Shawn,&lt;/p&gt;
&lt;p&gt;I am creating a Custom Data Extension for SSRS over our data access layer which uses nHibernate. I am getting the 'Attempted to perform an operation that was forbidden by the CLR host' error. &lt;/p&gt;
&lt;p&gt;Is there anyway I can disable the CLR Host Protection for my Custom Data Extension.&lt;/p&gt;
&lt;p&gt;Thanks in advance,&lt;/p&gt;
&lt;p&gt;Amitabh&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9519006" width="1" height="1"&gt;</description></item><item><title>re: Host Protection</title><link>http://blogs.msdn.com/b/shawnfa/archive/2005/10/12/480186.aspx#489284</link><pubDate>Sat, 05 Nov 2005 02:50:42 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:489284</guid><dc:creator>shawnfa</dc:creator><description>Stephen,&lt;br&gt;&lt;br&gt;Could you setup a static Dictionary&amp;lt;int, string&amp;gt; to enable this scenario?&lt;br&gt;&lt;br&gt;-Shawn&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=489284" width="1" height="1"&gt;</description></item><item><title>re: Host Protection</title><link>http://blogs.msdn.com/b/shawnfa/archive/2005/10/12/480186.aspx#480527</link><pubDate>Thu, 13 Oct 2005 14:52:08 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:480527</guid><dc:creator>Stephen</dc:creator><description>Hi,&lt;br&gt;&lt;br&gt;I am working on runtime for a language vendor and I have a question for you!&lt;br&gt;&lt;br&gt;Q.  If you have an assembly that has a loose contract between two static methods and you need to pass information between but without using &amp;quot;this&amp;quot; or as a parameter how can you do this?  But still want the assembly to be SQLCLR SAFE.&lt;br&gt;&lt;br&gt;For example:&lt;br&gt;&lt;br&gt;private static readonly LocalDataStoreSlot localSlot;&lt;br&gt;static SQLSUB()&lt;br&gt;{&lt;br&gt; localSlot = Thread.AllocateDataSlot();&lt;br&gt;}&lt;br&gt;&lt;br&gt;private static string GetMessage()&lt;br&gt;{&lt;br&gt; return Thread.GetData(localSlot).ToString() +&amp;quot; from HelloSub&amp;quot;;&lt;br&gt;}&lt;br&gt;&lt;br&gt;public static string Message()&lt;br&gt;{&lt;br&gt; Thread.SetData(localSlot, &amp;quot;Hello&amp;quot;);&lt;br&gt; return GetMessage()+&amp;quot; [CS]&amp;quot;;&lt;br&gt;}&lt;br&gt;&lt;br&gt;This example will fail in the class constructor with a HostProtection exception (requires: SharedState, ExternalThreading permissions).    The use of [ThreadStatic] does not help because the attribute is not permitted and it also applies to “static field”.&lt;br&gt;&lt;br&gt;What options do I have?&lt;br&gt;&lt;br&gt;--&lt;br&gt;stephen at gennard . net&lt;br&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=480527" width="1" height="1"&gt;</description></item></channel></rss>