<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Phil Leggetter - Real-Time Web Software and Technology Evangelist &#187; C# Snippets</title>
	<atom:link href="http://www.leggetter.co.uk/tag/c-snippets/feed" rel="self" type="application/rss+xml" />
	<link>http://www.leggetter.co.uk</link>
	<description>Real-Time Web, Real-Time Data and Social Media Software and Technology Evangelist and Consultant</description>
	<lastBuildDate>Sun, 29 Jan 2012 05:00:00 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=</generator>
		<item>
		<title>System.Security.SecurityException: That assembly does not allow partially trusted callers</title>
		<link>http://www.leggetter.co.uk/2009/08/26/system-security-securityexception-that-assembly-does-not-allow-partially-trusted-callers.html</link>
		<comments>http://www.leggetter.co.uk/2009/08/26/system-security-securityexception-that-assembly-does-not-allow-partially-trusted-callers.html#comments</comments>
		<pubDate>Tue, 25 Aug 2009 23:51:12 +0000</pubDate>
		<dc:creator>Phil Leggetter</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[.NET]]></category>
		<category><![CDATA[ASP.NET MVC]]></category>
		<category><![CDATA[C# Snippets]]></category>
		<category><![CDATA[Windows Azure]]></category>

		<guid isPermaLink="false">http://www.leggetter.co.uk/?p=268</guid>
		<description><![CDATA[<p>I was writing a Windows Azure ASP.NET MVC application and when making a call to a page I received the following exception:</p> <p>System.Security.SecurityException: That assembly does not allow partially trusted callers</p> <p>In my application I&#8217;m using <a href="http://www.castleproject.org/container/index.html">Castle Windsor</a> for dependency injection and when trying to resolve a service using:</p> } <p>IGravatar gravatar = MvcApplication.Container.Resolve&#60;IGravatar&#62;();</p> [...]
Related posts:<ol>
<li><a href='http://www.leggetter.co.uk/2009/08/28/windows-azure-503-service-unavailable.html' rel='bookmark' title='Windows Azure &#8211; 503 Service Unavailable'>Windows Azure &#8211; 503 Service Unavailable</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>I was writing a Windows Azure ASP.NET MVC application and when making a call to a page I received the following exception:</p>
<blockquote><p>System.Security.SecurityException: That assembly does not allow partially trusted callers</p></blockquote>
<p>In my application I&#8217;m using <a  href="http://www.castleproject.org/container/index.html">Castle Windsor</a> for dependency injection and when trying to resolve a service using:</p>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">}</div>
<blockquote><p>IGravatar gravatar = MvcApplication.Container.Resolve&lt;IGravatar&gt;();</p></blockquote>
<p>I received this message. To solve things I needed to update the WebRole element in the ServiceDefinitions.csdef file so that enableNativeCodeExecution is enabled.</p>
<blockquote><p>&lt;WebRole name=&#8221;TwitterGravatarMVC&#8221; enableNativeCodeExecution=&#8221;true&#8221;&gt;</p></blockquote>
<p>I found <a  href="http://social.msdn.microsoft.com/Forums/en-US/netservices/thread/c2e49731-9e72-49b6-9fb3-1243c85b265d">the solution</a>, detailed above, on the<a  href="http://social.msdn.microsoft.com/Forums/en-US/netservices/thread/c2e49731-9e72-49b6-9fb3-1243c85b265d"> Azure Services Platform Developer Centre forum</a>.</p>
<p>Related posts:<ol>
<li><a href='http://www.leggetter.co.uk/2009/08/28/windows-azure-503-service-unavailable.html' rel='bookmark' title='Windows Azure &#8211; 503 Service Unavailable'>Windows Azure &#8211; 503 Service Unavailable</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.leggetter.co.uk/2009/08/26/system-security-securityexception-that-assembly-does-not-allow-partially-trusted-callers.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>C# &#8211; Get Windows Temporary Directory</title>
		<link>http://www.leggetter.co.uk/2007/02/02/get-windows-temporary-directory.html</link>
		<comments>http://www.leggetter.co.uk/2007/02/02/get-windows-temporary-directory.html#comments</comments>
		<pubDate>Fri, 02 Feb 2007 09:25:48 +0000</pubDate>
		<dc:creator>Phil Leggetter</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[.NET]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[C# Snippets]]></category>
		<category><![CDATA[Software Development]]></category>

		<guid isPermaLink="false">http://www.leggetter.co.uk/2007/02/02/get-windows-temporary-directory.html</guid>
		<description><![CDATA[<p>Once you know it you&#8217;ll probably never forget it&#8230;but wait, this is the second time I&#8217;ve <a href="http://www.google.com/search?q=C%23+get+temp+folder+path" title="Google search for C# get temp folder path">googled</a> for this. I&#8217;d best post how you &#8220;get the Windows temporary directory using C#&#8220;!</p> <p>Related posts: <a href='http://www.leggetter.co.uk/2009/08/28/windows-azure-503-service-unavailable.html' rel='bookmark' title='Windows Azure &#8211; 503 Service Unavailable'>Windows Azure &#8211; 503 Service [...]
Related posts:<ol>
<li><a href='http://www.leggetter.co.uk/2009/08/28/windows-azure-503-service-unavailable.html' rel='bookmark' title='Windows Azure &#8211; 503 Service Unavailable'>Windows Azure &#8211; 503 Service Unavailable</a></li>
<li><a href='http://www.leggetter.co.uk/2008/05/20/how-to-install-caplin-systems-liberator-free-edition-on-windows.html' rel='bookmark' title='How to install Caplin Systems&#8217; Liberator Free Edition on Windows'>How to install Caplin Systems&#8217; Liberator Free Edition on Windows</a></li>
<li><a href='http://www.leggetter.co.uk/2007/05/22/linkstation-nas-folder-share-with-windows-vista.html' rel='bookmark' title='Linkstation NAS Folder share with Windows Vista'>Linkstation NAS Folder share with Windows Vista</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>Once you know it you&#8217;ll probably never forget it&#8230;but wait, this is the second time I&#8217;ve <a  href="http://www.google.com/search?q=C%23+get+temp+folder+path" title="Google search for C# get temp folder path">googled</a> for this. I&#8217;d best post how  you &#8220;<strong>get the Windows temporary directory using C#</strong>&#8220;!</p>
<pre class="brush: csharp; title: ; notranslate">string tempPath =
    System.IO.Path.GetTempPath();</pre>
<p>Related posts:<ol>
<li><a href='http://www.leggetter.co.uk/2009/08/28/windows-azure-503-service-unavailable.html' rel='bookmark' title='Windows Azure &#8211; 503 Service Unavailable'>Windows Azure &#8211; 503 Service Unavailable</a></li>
<li><a href='http://www.leggetter.co.uk/2008/05/20/how-to-install-caplin-systems-liberator-free-edition-on-windows.html' rel='bookmark' title='How to install Caplin Systems&#8217; Liberator Free Edition on Windows'>How to install Caplin Systems&#8217; Liberator Free Edition on Windows</a></li>
<li><a href='http://www.leggetter.co.uk/2007/05/22/linkstation-nas-folder-share-with-windows-vista.html' rel='bookmark' title='Linkstation NAS Folder share with Windows Vista'>Linkstation NAS Folder share with Windows Vista</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.leggetter.co.uk/2007/02/02/get-windows-temporary-directory.html/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Page Caching using disk: enhanced
Database Caching 21/49 queries in 0.028 seconds using disk: basic

Served from: www.leggetter.co.uk @ 2012-02-04 20:36:41 -->
