<?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>Chris Danielson&#039;s Blog &#187; Uncategorized</title>
	<atom:link href="http://www.chrisdanielson.com/category/uncategorized/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.chrisdanielson.com</link>
	<description>Trials and Tribulations of a Software Developer</description>
	<lastBuildDate>Tue, 10 Apr 2012 17:15:23 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Windows 2008 IIS .Net SecurityException</title>
		<link>http://www.chrisdanielson.com/2010/09/18/windows-2008-iis-net-securityexception/</link>
		<comments>http://www.chrisdanielson.com/2010/09/18/windows-2008-iis-net-securityexception/#comments</comments>
		<pubDate>Sat, 18 Sep 2010 15:50:09 +0000</pubDate>
		<dc:creator>Chris Danielson</dc:creator>
				<category><![CDATA[.Net Development]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[.Net]]></category>
		<category><![CDATA[AspNetHostingPermission]]></category>
		<category><![CDATA[caspol.exe]]></category>
		<category><![CDATA[SecurityException]]></category>
		<category><![CDATA[UNC]]></category>
		<category><![CDATA[Windows 2008]]></category>

		<guid isPermaLink="false">http://www.chrisdanielson.com/?p=374</guid>
		<description><![CDATA[<script type="text/javascript"><!--
google_ad_client = "pub-ca-pub-7445498461482554";
google_alternate_color = "FFFFFF";
google_ad_width = 234;
google_ad_height = 60;
google_ad_format = "234x60_as";
google_ad_type = "text_image";
google_ad_channel ="";
google_color_border = "FFFFFF";
google_color_link = "0022C9";
google_color_bg = "FFFFFF";
google_color_text = "000000";
google_color_url = "128A00";
google_ui_features = "rc:0";
//--></script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>I was attempting to install a .Net 3.5 application written in C# onto a Windows 2008 Enterprise R2 (64 bit) virtualized system.  What makes this a little unique is that the ASP.Net code is stored on a UNC file share.  Because of this issue, I received the following error: Security Exception Description: The application attempted [...]]]></description>
			<content:encoded><![CDATA[<script type="text/javascript"><!--
google_ad_client = "pub-ca-pub-7445498461482554";
google_alternate_color = "FFFFFF";
google_ad_width = 234;
google_ad_height = 60;
google_ad_format = "234x60_as";
google_ad_type = "text_image";
google_ad_channel ="";
google_color_border = "FFFFFF";
google_color_link = "0022C9";
google_color_bg = "FFFFFF";
google_color_text = "000000";
google_color_url = "128A00";
google_ui_features = "rc:0";
//--></script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script><p>I was attempting to install a .Net 3.5 application written in C# onto a Windows 2008 Enterprise R2 (64 bit) virtualized system.  What makes this a little unique is that the ASP.Net code is stored on a <strong>UNC file share</strong>.  Because of this issue, I received the following error:</p>
<blockquote><p><code>Security Exception<br />
Description: The application attempted to perform an operation not allowed by the security policy. To grant this application the required permission please contact your system administrator or change the application’s trust level in the configuration file.</code></p>
<p><code>Exception Details: System.Security.SecurityException: Request for the permission of type ‘System.Web.AspNetHostingPermission, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089′ failed.</code></p></blockquote>
<p>Initially I was baffled and with enough searching I came across the &#8220;caspol&#8221; <a href="http://support.microsoft.com/kb/320268">solution from Microsoft</a>.</p>
<p>Which in essence is:<br />
<code><br />
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\caspol.exe -m -ag 1 -url "file:////\\fs\share\*" FullTrust -exclusive on<br />
</code></p>
<p>And of course, this doesn&#8217;t work!  I had overlooked that inside each .Net framework directory (yes there are two on 64 bit systems) is a separate configuration file.</p>
<p>By running the 64 bit caspol.exe command, I was able to quickly fix the issue.<br />
<code><br />
C:\WINDOWS\Microsoft.NET\Framework64\v2.0.50727\caspol.exe -m -ag 1 -url "file:////\\fs\share\*" FullTrust -exclusive on</code></p>
<p>I restarted the IIS service for good measure and we&#8217;re off to the races.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.chrisdanielson.com/2010/09/18/windows-2008-iis-net-securityexception/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

