<?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>Ignore the man behind the curtain &#187; .NET Development</title>
	<atom:link href="http://brianseekford.com/index.php/category/net-development/feed/" rel="self" type="application/rss+xml" />
	<link>http://brianseekford.com</link>
	<description>Software engineering in a .NET world</description>
	<lastBuildDate>Fri, 02 Dec 2011 19:16:42 +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>How do I cancel a databinding property set in WPF?</title>
		<link>http://brianseekford.com/index.php/2011/11/30/how-do-i-cancel-a-databinding-property-set-in-wpf/</link>
		<comments>http://brianseekford.com/index.php/2011/11/30/how-do-i-cancel-a-databinding-property-set-in-wpf/#comments</comments>
		<pubDate>Wed, 30 Nov 2011 14:39:38 +0000</pubDate>
		<dc:creator>Brian Seekford</dc:creator>
				<category><![CDATA[WPF]]></category>
		<category><![CDATA[cancel]]></category>
		<category><![CDATA[ComboBox]]></category>
		<category><![CDATA[DataBinding]]></category>
		<category><![CDATA[property]]></category>
		<category><![CDATA[PropertyChanged]]></category>
		<category><![CDATA[Set]]></category>
		<category><![CDATA[ViewModel]]></category>
		<category><![CDATA[wpf]]></category>

		<guid isPermaLink="false">http://brianseekford.com/index.php/2011/11/30/how-do-i-cancel-a-databinding-property-set-in-wpf/</guid>
		<description><![CDATA[I have a combobox in WPF that I am using the SelectedItem property with a DataBinding and sometimes certain items shouldn’t be selected based on certain criteria. Mine was that two comboboxes couldn’t have the same value. Yes, there are other ways, such as removing invalid values from other boxes, but here was my solution [...]]]></description>
			<content:encoded><![CDATA[<p>I have a combobox in WPF that I am using the SelectedItem property with a DataBinding and sometimes certain items shouldn’t be selected based on certain criteria. Mine was that two comboboxes couldn’t have the same value.</p>
<p>Yes, there are other ways, such as removing invalid values from other boxes, but here was my solution for preventing the invalid property set by cancelling the selection/property set.</p>
<p>WPF sucks in this manner as there isn’t an easy way to update it. You can’t raise the property updated event since the binding ignores those when setting, to avoid recursion issue I suppose. (Yes, developers could defend by not raising the events if the property doesn’t change)</p>
<p>Anyway, the solution is simply to raise the property changed after the operation, by simply posting it to the work queue on the UI thread right afterward.</p>
<p>&#160;</p>
<p>Code: in C#</p>
<p>public MyHeaderType SelectedHeader   <br />&#160;&#160;&#160;&#160;&#160; {    <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; get { return this.selectedHeader; }    <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; set    <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; {    <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; bool resetMe= validateValue(value);    <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; var origVal = selectedHeader;//store for reset</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; selectedHeader = value;   <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; RaisePropertyChanged(() =&gt; SelectedHeader);</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; if (resetMe)//Why do I need to set the value above? No idea. Doesn&#8217;t work unless I do it that way. Yes. I tried.   <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; {    <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; Application.Current.Dispatcher.BeginInvoke( //force a reenter to put it back&#8230;&#8230;    <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; new Action(() =&gt;    <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; {    <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; SelectedHeader = origVal;//put me back to the correct value.    <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; }),    <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; DispatcherPriority.ContextIdle,    <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; null    <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; );&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; }    <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; }    <br />&#160;&#160;&#160;&#160;&#160; }    </p>
<p>&#160;</p>
<p>&#160;</p>
<p>&#160;</p>
<p>Happy Coding!</p>
]]></content:encoded>
			<wfw:commentRss>http://brianseekford.com/index.php/2011/11/30/how-do-i-cancel-a-databinding-property-set-in-wpf/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to set the BackgroundColor on a GridViewColumn in WPF!</title>
		<link>http://brianseekford.com/index.php/2011/10/17/how-to-set-the-backgroundcolor-on-a-gridviewcolumn-in-wpf/</link>
		<comments>http://brianseekford.com/index.php/2011/10/17/how-to-set-the-backgroundcolor-on-a-gridviewcolumn-in-wpf/#comments</comments>
		<pubDate>Mon, 17 Oct 2011 19:50:38 +0000</pubDate>
		<dc:creator>Brian Seekford</dc:creator>
				<category><![CDATA[WPF]]></category>
		<category><![CDATA[background]]></category>
		<category><![CDATA[color]]></category>
		<category><![CDATA[gridviewcolumn]]></category>
		<category><![CDATA[ListView]]></category>
		<category><![CDATA[wpf]]></category>

		<guid isPermaLink="false">http://brianseekford.com/index.php/2011/10/17/how-to-set-the-backgroundcolor-on-a-gridviewcolumn-in-wpf/</guid>
		<description><![CDATA[So, you figured you would set the Grid or Border background color and it would work out? Then you ran your program and only the text was being filled in with your color right? Well, the issue is two fold. First, you need to set the cell contents to stretch. Then you need to get [...]]]></description>
			<content:encoded><![CDATA[<p>So, you figured you would set the Grid or Border background color and it would work out? Then you ran your program and only the text was being filled in with your color right?</p>
<p>Well, the issue is two fold. First, you need to set the cell contents to stretch. Then you need to get past the fact the column pads the cell by 6 pixels left and right.</p>
<p>Handling the padding is here:</p>
<pre>

 &lt;Style TargetType=&quot;Border&quot; x:Key=&quot;columnBorder&quot;&gt;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;Setter Property=&quot;Margin&quot; Value=&quot;-6,-2,-6,-6&quot;/&gt;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;Setter Property=&quot;Padding&quot; Value=&quot;6,2,6,6&quot;/&gt;

&lt;/Style&gt;

&#160;
</pre>
<p>&#160;</p>
<p>Set the <code>Horizontal</code><code>Content</code><code>Alignment on the ListView or GridView.</code></p>
<p><code>Hope this helps.</code></p>
<p><code>I googled around for other entries and found this one with more detail than I wanted to write.</code></p>
<p><a title="http://www.interact-sw.co.uk/iangblog/2007/05/30/wpf-listview-column-margins" href="http://www.interact-sw.co.uk/iangblog/2007/05/30/wpf-listview-column-margins">http://www.interact-sw.co.uk/iangblog/2007/05/30/wpf-listview-column-margins</a></p>
<p><font face="Courier New">Happy coding!</font></p>
]]></content:encoded>
			<wfw:commentRss>http://brianseekford.com/index.php/2011/10/17/how-to-set-the-backgroundcolor-on-a-gridviewcolumn-in-wpf/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>&#8220;Unable to load one or more of the requested types.&#8221; when using EntityDataSource with Entity Framework in ASP.NET</title>
		<link>http://brianseekford.com/index.php/2011/08/01/unable-to-load-one-or-more-of-the-requested-types-when-using-entitydatasource-with-entity-framework-in-asp-net/</link>
		<comments>http://brianseekford.com/index.php/2011/08/01/unable-to-load-one-or-more-of-the-requested-types-when-using-entitydatasource-with-entity-framework-in-asp-net/#comments</comments>
		<pubDate>Mon, 01 Aug 2011 15:40:13 +0000</pubDate>
		<dc:creator>Brian Seekford</dc:creator>
				<category><![CDATA[.NET Development]]></category>
		<category><![CDATA[asp.net]]></category>
		<category><![CDATA[ef]]></category>
		<category><![CDATA[entity framework]]></category>
		<category><![CDATA[entitydatasource]]></category>

		<guid isPermaLink="false">http://brianseekford.com/index.php/2011/08/01/unable-to-load-one-or-more-of-the-requested-types-when-using-entitydatasource-with-entity-framework-in-asp-net/</guid>
		<description><![CDATA[I always love pushing something out that fails miserably and randomly. Especially when using straight Microsoft technologies. It seems these folks don’t eat their own dog food, or we wouldn’t encounter this crap. Anyway, it took quite a while to figure out the resolution to this issue, but it all lies in the fact that [...]]]></description>
			<content:encoded><![CDATA[<p>I always love pushing something out that fails miserably and randomly. Especially when using straight Microsoft technologies. It seems these folks don’t eat their own dog food, or we wouldn’t encounter this crap.</p>
<p>Anyway, it took quite a while to figure out the resolution to this issue, but it all lies in the fact that their control is “trying” to be intelligent, and really only needed a little direction.</p>
<p>Let me explain, when the EntityDataSource loads, it looks for the Context. Where may you ask? Well, it actually uses reflection and attempts to load all types from the assembly to resolve the entities. If there is any error in this at all, it blows up. There are a number of reasons this can fail. Dependency mismatches, bad references, and other things that may not break your application but break this feature.</p>
<p>How can I fix this? I am sure you are asking this right now. “Damn it Brian, Get to the freaking point and the fix!” Fine.</p>
<p>It’s pretty simple.</p>
<p>Set this property on the EntityDataSource in your .aspx file. <strong>ContextTypeName</strong> .</p>
<p>The value? Well, the full namespace and class of your context. Example. <strong>Seekford.Data.MyEntityContext</strong></p>
<p>More detailed example:</p>
<p>&lt;asp:EntityDataSource … ContextTypeName=&quot;<strong>Seekford.Data.MyEntityContext</strong>&quot; /&gt;    </p>
<p>Happy coding!</p>
]]></content:encoded>
			<wfw:commentRss>http://brianseekford.com/index.php/2011/08/01/unable-to-load-one-or-more-of-the-requested-types-when-using-entitydatasource-with-entity-framework-in-asp-net/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A new guard page for the stack cannot be created</title>
		<link>http://brianseekford.com/index.php/2011/07/27/a-new-guard-page-for-the-stack-cannot-be-created/</link>
		<comments>http://brianseekford.com/index.php/2011/07/27/a-new-guard-page-for-the-stack-cannot-be-created/#comments</comments>
		<pubDate>Wed, 27 Jul 2011 18:42:56 +0000</pubDate>
		<dc:creator>Brian Seekford</dc:creator>
				<category><![CDATA[.NET Development]]></category>
		<category><![CDATA[asp.net]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[cassini]]></category>
		<category><![CDATA[iis]]></category>
		<category><![CDATA[web server]]></category>

		<guid isPermaLink="false">http://brianseekford.com/index.php/2011/07/27/a-new-guard-page-for-the-stack-cannot-be-created/</guid>
		<description><![CDATA[&#160; You get a nice error that says, “A new guard page for the stack cannot be created”, well easy fix. I could be long winded, but the issue is simply this, you caused a stack overflow. How you say? Well, check to see if you are using a Server.Transfer that transfers you to a [...]]]></description>
			<content:encoded><![CDATA[<p>&#160;</p>
<p>You get a nice error that says, “<em>A new guard page for the stack cannot be created”,</em> well easy fix. I could be long winded, but the issue is simply this, you caused a stack overflow.</p>
<p>How you say? Well, check to see if you are using a Server.Transfer that transfers you to a page that then Transfers you back and forth, or even to yourself.</p>
<p>Have login code that checks to see if you are logged in? If not, then it bounces you to a login page. Maybe you put it in a master page. Well, if the login page uses the master page, it will just keep transferring itself to itself and you blow the stack.</p>
<p>Response.Redirect will give you a different error as the browser only jumps a low number of redirects before giving up. Server.Transfer uses the internal stack, so it blows up on the server itself.</p>
<p>Happy coding!</p>
]]></content:encoded>
			<wfw:commentRss>http://brianseekford.com/index.php/2011/07/27/a-new-guard-page-for-the-stack-cannot-be-created/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Updated my WCF Data Contract but client doesn&#8217;t receive the property values&#8230;.</title>
		<link>http://brianseekford.com/index.php/2011/07/15/updated-my-wcf-data-contract-but-client-doesnt-receive-the-property-values/</link>
		<comments>http://brianseekford.com/index.php/2011/07/15/updated-my-wcf-data-contract-but-client-doesnt-receive-the-property-values/#comments</comments>
		<pubDate>Fri, 15 Jul 2011 12:06:00 +0000</pubDate>
		<dc:creator>Brian Seekford</dc:creator>
				<category><![CDATA[.NET Development]]></category>
		<category><![CDATA[datacontract]]></category>
		<category><![CDATA[datamember]]></category>
		<category><![CDATA[missing]]></category>
		<category><![CDATA[property]]></category>
		<category><![CDATA[wcf]]></category>

		<guid isPermaLink="false">http://brianseekford.com/index.php/2011/07/15/updated-my-wcf-data-contract-but-client-doesnt-receive-the-property-values/</guid>
		<description><![CDATA[I spent about ten minutes wondering why I wasn’t getting the data I expected from my WCF service. I had just changed my data contract to have one more property/field and the data wasn’t being received by my client application. The client is in javascript, so it’s happy with whatever it receives. So no errors [...]]]></description>
			<content:encoded><![CDATA[<p>I spent about ten minutes wondering why I wasn’t getting the data I expected from my WCF service. I had just changed my data contract to have one more property/field and the data wasn’t being received by my client application. The client is in javascript, so it’s happy with whatever it receives. So no errors there, just an undefined property.</p>
<p>I looked at fiddler and noticed it didn’t come through there either. Now I chalked it up to a stale build and rebuilt again. Hmm…. Still undefined…wtf?</p>
<p>Well, simple issue with a simple fix. It turns out I , DUH, forget to tag the property as a DataMember. So the serializer ignored it thinking it was just an internal variable. No need to serialize or expose. Geez.</p>
<p>My fault but it was pretty funny when I started going back through my entities and contracts and started comparing them.</p>
<p>So, in short, if your client for your WCF service is not receiving the property you expect on the data contract, make sure you marked them properly. Easy to overlook when you are updating the DAL DTO’s, Business Entities, and then your Contract Entity.</p>
<p>Example:</p>
<p>/// &lt;summary&gt;<br />
/// Gets or sets the reference.<br />
/// &lt;/summary&gt;<br />
/// &lt;value&gt;<br />
/// The reference.<br />
/// &lt;/value&gt;<br />
[DataMember(Name= "Reference")]<br />
public string Reference { get; set; }</p>
<p>Happy coding!</p>
]]></content:encoded>
			<wfw:commentRss>http://brianseekford.com/index.php/2011/07/15/updated-my-wcf-data-contract-but-client-doesnt-receive-the-property-values/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>HRESULT: 0&#215;80131515 when running installutil to install a .NET Service</title>
		<link>http://brianseekford.com/index.php/2011/07/13/hresult-0x80131515-when-running-installutil-to-install-a-net-service/</link>
		<comments>http://brianseekford.com/index.php/2011/07/13/hresult-0x80131515-when-running-installutil-to-install-a-net-service/#comments</comments>
		<pubDate>Wed, 13 Jul 2011 19:23:09 +0000</pubDate>
		<dc:creator>Brian Seekford</dc:creator>
				<category><![CDATA[.NET Development]]></category>
		<category><![CDATA[.NET]]></category>
		<category><![CDATA[80131515]]></category>
		<category><![CDATA[FileLoadException]]></category>
		<category><![CDATA[installation]]></category>
		<category><![CDATA[InstallUtil]]></category>
		<category><![CDATA[service]]></category>
		<category><![CDATA[unblock]]></category>

		<guid isPermaLink="false">http://brianseekford.com/index.php/2011/07/13/hresult-0x80131515-when-running-installutil-to-install-a-net-service/</guid>
		<description><![CDATA[So you write your nice and fancy service and are all excited to distribute it to your client. You don’t feel like creating an installer for it, that seems like overkill. You just send a zip file with a batch file that calls installutil to register the service. Easy right? Well, your client calls and [...]]]></description>
			<content:encoded><![CDATA[<p>So you write your nice and fancy service and are all excited to distribute it to your client. You don’t feel like creating an installer for it, that seems like overkill. You just send a zip file with a batch file that calls installutil to register the service. Easy right?</p>
<p>Well, your client calls and complains that get the following error when running installutil aka your batch file:</p>
<p>Exception occurred while initializing the installation:</p>
<p>System.IO.FileLoadException: Could not load file or assembly ‘file:///D:\services\myservicehost.exe’ or one of its dependencies. Operation is not support. (Exception from HRESULT: 0&#215;80131515).</p>
<p>I am sure you will start scratching your head and immediately blame them missing a dll or maybe the client ran it wrong. Maybe they have it in the wrong directory? Seems feasible, right? Wrong.</p>
<p>It turns out that Windows was protecting them. Windows doesn’t like files from other computers very much, especially not executables. They get a special stay away from me flag. </p>
<p>So, how do I fix this? Easy. Just open the properties dialog on the exe/service you extracted and hit the UNBLOCK button. Now installutil will work great!</p>
<p>Happy Coding!</p>
]]></content:encoded>
			<wfw:commentRss>http://brianseekford.com/index.php/2011/07/13/hresult-0x80131515-when-running-installutil-to-install-a-net-service/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How To Fix:Error    39    The type or namespace name &#8216;Contracts&#8217; does not exist in the namespace &#8216;XXX&#8217; (are you missing an assembly reference?)</title>
		<link>http://brianseekford.com/index.php/2011/06/06/how-to-fixerror-39-the-type-or-namespace-name-contracts-does-not-exist-in-the-namespace-xxx-are-you-missing-an-assembly-reference/</link>
		<comments>http://brianseekford.com/index.php/2011/06/06/how-to-fixerror-39-the-type-or-namespace-name-contracts-does-not-exist-in-the-namespace-xxx-are-you-missing-an-assembly-reference/#comments</comments>
		<pubDate>Mon, 06 Jun 2011 14:15:07 +0000</pubDate>
		<dc:creator>Brian Seekford</dc:creator>
				<category><![CDATA[.NET Development]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[compiler]]></category>
		<category><![CDATA[error]]></category>
		<category><![CDATA[error 39]]></category>
		<category><![CDATA[missing assembly]]></category>
		<category><![CDATA[namespace]]></category>
		<category><![CDATA[type]]></category>

		<guid isPermaLink="false">http://brianseekford.com/index.php/2011/06/06/how-to-fixerror-39-the-type-or-namespace-name-contracts-does-not-exist-in-the-namespace-xxx-are-you-missing-an-assembly-reference/</guid>
		<description><![CDATA[So….Just got done mentally disintegrating my computer and various items around it. This lovely error kept appearing to tell me ABSOLUTELY NOTHING. I checked my references, of course they were included. It’s how I had intellisense, and every other feature that leads me to believe everything is A OK. That is, until you actually compile. [...]]]></description>
			<content:encoded><![CDATA[<p>So….Just got done mentally disintegrating my computer and various items around it. This lovely error kept appearing to tell me ABSOLUTELY NOTHING.</p>
<p>I checked my references, of course they were included. It’s how I had intellisense, and every other feature that leads me to believe everything is A OK. That is, until you actually compile. You then get the awesomely descriptive error above.</p>
<p>Oh, It appears descriptive right? You say, oh, I must have done something wrong and somehow removed the assembly reference. Let me check it? Nope, it’s there.</p>
<p>Well, it turns out the answer is simple and the stupid compiler could have added one more suggestion. Here is how I would write it.</p>
<p>The type or namespace name &#8216;Contracts&#8217; does not exist in the namespace &#8216;XXX&#8217; (are you missing an assembly reference? Are the assemblies built using the same .NET Runtime Profile?) </p>
<p>Yup! One assembly was using the .NET 4.0 CLIENT profile and the other the .NET 4 Full profile. Awesome huh!!!</p>
<p>So, if you come across this with one eye bleeding because you stabbed yourself and missing hair, now you know the simple resolution. </p>
<p><a href="http://brianseekford.com/wp-content/uploads/2011/06/image.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://brianseekford.com/wp-content/uploads/2011/06/image_thumb.png" width="244" height="46" /></a></p>
<p>&#160;</p>
<p>Happy Coding!</p>
]]></content:encoded>
			<wfw:commentRss>http://brianseekford.com/index.php/2011/06/06/how-to-fixerror-39-the-type-or-namespace-name-contracts-does-not-exist-in-the-namespace-xxx-are-you-missing-an-assembly-reference/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>KillExcel &#8211; A simple way to purge those unwanted ghost processes</title>
		<link>http://brianseekford.com/index.php/2011/02/16/killexcel-a-simple-way-to-purge-those-unwanted-ghost-processes/</link>
		<comments>http://brianseekford.com/index.php/2011/02/16/killexcel-a-simple-way-to-purge-those-unwanted-ghost-processes/#comments</comments>
		<pubDate>Wed, 16 Feb 2011 16:14:55 +0000</pubDate>
		<dc:creator>Brian Seekford</dc:creator>
				<category><![CDATA[Office]]></category>

		<guid isPermaLink="false">http://brianseekford.com/?p=463</guid>
		<description><![CDATA[If you develop Office Addins, or automate office, you probably have the issue of dealing with a lot of ghost Excel processes. You get them when you don&#8217;t free properly, or you kill your process but the Excel doesn&#8217;t get terminated(which is almost certain when you abnormally terminate). Anyway, this simple executable will iterate all [...]]]></description>
			<content:encoded><![CDATA[<p>If you develop Office Addins, or automate office, you probably have the issue of dealing with a lot of ghost Excel processes. You get them when you don&#8217;t free properly, or you kill your process but the Excel doesn&#8217;t get terminated(which is almost certain when you abnormally terminate).</p>
<p>Anyway, this simple executable will iterate all your Excel processes and kill them.</p>
<p>Note: Built in 4.0 .NET framework.</p>
<p><a href="http://brianseekford.com/wp-content/uploads/2011/02/KillExcel.exe">KillExcel.exe</a></p>
<p>Happy Coding!</p>
]]></content:encoded>
			<wfw:commentRss>http://brianseekford.com/index.php/2011/02/16/killexcel-a-simple-way-to-purge-those-unwanted-ghost-processes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to optimize download performance for files stream from your database via asp.net</title>
		<link>http://brianseekford.com/index.php/2011/02/10/how-to-optimize-download-performance-for-files-stream-from-your-database-via-asp-net/</link>
		<comments>http://brianseekford.com/index.php/2011/02/10/how-to-optimize-download-performance-for-files-stream-from-your-database-via-asp-net/#comments</comments>
		<pubDate>Thu, 10 Feb 2011 19:40:58 +0000</pubDate>
		<dc:creator>Brian Seekford</dc:creator>
				<category><![CDATA[.NET Development]]></category>
		<category><![CDATA[asp.net]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[caching]]></category>
		<category><![CDATA[document]]></category>
		<category><![CDATA[ETag]]></category>
		<category><![CDATA[Office]]></category>
		<category><![CDATA[stream]]></category>

		<guid isPermaLink="false">http://brianseekford.com/index.php/2011/02/10/how-to-optimize-download-performance-for-files-stream-from-your-database-via-asp-net/</guid>
		<description><![CDATA[I had a requirement to create a download page that streamed office documents to the client from our website. The way Office (Word and Excel at least) open documents from URL’s are the browser downloads it first, then Word and Excel call back to the server to make sure nothing changed. Normally, these results in [...]]]></description>
			<content:encoded><![CDATA[<p>I had a requirement to create a download page that streamed office documents to the client from our website. The way Office (Word and Excel at least) open documents from URL’s are the browser downloads it first, then Word and Excel call back to the server to make sure nothing changed.</p>
<p>Normally, these results in you streaming the file twice, unknowingly. That is bad for performance and your bandwidth. No one wants a laggy and latent operation.</p>
<p>So, what is there you can do? Well, if you intercept the headers to a normally hosted document, you will see a header called ETag. This is basically a document hash reference that can be used when the follow request occurs.</p>
<p>Ok, English right.</p>
<p>So, the solution I implemented is pretty easy. I created a unique hash tag (it can be a true hash, or simply a rowid and the recordtimestamp combined) and set the ETag header.</p>
<p>You ask, “Well, how does setting an <strong>ETag</strong> header prevent duplicate efforts?”. It doesn’t. Here comes the work you do first.</p>
<p>When a request comes in. Look for a header called: IF-None-Match. If you see it, you need to jump into a little simple logic.</p>
<p>First, calculate your <strong>Etag</strong> value and compare it to the value of the If-None-Match and if it, well, matches, you get to do something special. If it doesn’t match, act like nothing happened and continue on with the normal data return.</p>
<p>So, what is the something special you ask? Simple, Clear your response contents, set your StatusCode to 304, and end the response .</p>
<p>Now I hear, geez. You made this sound very complicated. Is there an easier way to explain this?</p>
<p>Sure…I’ll try.</p>
<p>&#160;</p>
<p>Here are the steps for simplicity:</p>
<ol>
<li>Check for <strong>If-None-Match </strong>header
<ol>
<li>If Exists, compare value of header to your hash(id combo, CRC, whatever you want to use)
<ol>
<li>If Matches,
<ol>
<li>Set <strong>StatusCode</strong> =304, </li>
<li>Clear Response Contents </li>
<li>End Response </li>
</ol>
</li>
<li>Else.
<ol>
<li>Continue as normal </li>
</ol>
</li>
</ol>
</li>
</ol>
</li>
<li>Normal <img style="border-bottom-style: none; border-right-style: none; border-top-style: none; border-left-style: none" class="wlEmoticon wlEmoticon-winkingsmile" alt="Winking smile" src="http://brianseekford.com/wp-content/uploads/2011/02/wlEmoticon-winkingsmile.png" />
<ol>
<li>Generate <strong>ETag</strong> hash (again, however you want to identify this file as unique, something that changes if the file changes) </li>
<li>Response with <strong>ETag</strong> in header </li>
</ol>
</li>
</ol>
<p><em>What does that mean in code? I don’t speak flow.</em></p>
<p>Here is a code example.</p>
<p><font face="Consolas"><font style="font-size: 12pt">&#160; <span><font color="#0000ff">private</font></span>&#160;<span><font color="#0000ff">const</font></span>&#160;<span><font color="#0000ff">string</font></span> _wordMimeType = <span><font color="#a31515">&quot;application/msword&quot;</font></span>;<span><font color="#008000">// (for Microsoft Word files)</font></span>        <br />&#160;&#160;&#160; <span><font color="#0000ff">private</font></span>&#160;<span><font color="#0000ff">const</font></span>&#160;<span><font color="#0000ff">string</font></span> _excelMimeType = <span><font color="#a31515">&quot;application/vnd.ms-excel&quot;</font></span>;&#160; <span><font color="#008000">//(for Microsoft Excel files)</font></span>        <br />&#160;&#160;&#160; <br />&#160;&#160;&#160; <span><font color="#0000ff">private</font></span>&#160;<span><font color="#0000ff">void</font></span> StreamDocumentfromDatabase(<span><font color="#2b91af">Guid</font></span> documentID)        <br />&#160;&#160;&#160; {        <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span><font color="#0000ff">string</font></span> etagFilter = Request.Headers[<span><font color="#a31515">&quot;If-None-Match&quot;</font></span>];        <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span><font color="#0000ff">string</font></span> etag;        <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span><font color="#008000">//load the bits into memory</font></span>        <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span><font color="#0000ff">using</font></span> (<span><font color="#0000ff">var</font></span> context = <span><font color="#0000ff">new</font></span>&#160;<span><font color="#2b91af">EvidenceReviewContext</font></span>())        <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; {        <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span><font color="#0000ff">if</font></span> (!<span><font color="#0000ff">string</font></span>.IsNullOrEmpty(etagFilter))        <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; {        <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span><font color="#008000">//check db to see if to respond with ignore (cached copy already found)</font></span>        <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span><font color="#0000ff">var</font></span> blobCheck = (<span><font color="#0000ff">from</font></span> ev <span><font color="#0000ff">in</font></span> context.Documents        <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span><font color="#0000ff">where</font></span> ev.documentID == documentID &amp;&amp;        <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; ev.BlobDataId.HasValue        <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span><font color="#0000ff">select</font></span> ev.BlobDataId.Value        <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; ).FirstOrDefault();        <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span><font color="#0000ff">if</font></span> (blobCheck != <span><font color="#0000ff">null</font></span>)        <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; {        <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span><font color="#0000ff">if</font></span> (etagFilter == (documentID.ToString() + blobCheck.ToString()))        <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; {        <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; Response.ClearContent();        <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; Response.StatusCode = 304;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; Response.End();        <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; }        <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; }        <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; }        </p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span><font color="#0000ff">var</font></span> theBlob = (<span><font color="#0000ff">from</font></span> ev <span><font color="#0000ff">in</font></span> context.Documents        <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span><font color="#0000ff">where</font></span> ev.documentID == documentID &amp;&amp;        <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; ev.BlobDataId.HasValue        <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span><font color="#0000ff">select</font></span>&#160;<span><font color="#0000ff">new</font></span>        <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; {        <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; Data = ev.BlobData.Data,        <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; FileExtension = ev.FileExtension,        <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; BlobID = ev.BlobDataId.Value        <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; }).FirstOrDefault();        </p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span><font color="#0000ff">if</font></span> (theBlob == <span><font color="#0000ff">null</font></span>)        <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span><font color="#0000ff">return</font></span>;        </p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span><font color="#0000ff">if</font></span> (theBlob.FileExtension.ToLower().StartsWith(<span><font color="#a31515">&quot;.doc&quot;</font></span>))        <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; Response.ContentType = _wordMimeType;        <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span><font color="#0000ff">else</font></span>&#160;<span><font color="#0000ff">if</font></span> (theBlob.FileExtension.ToLower().StartsWith(<span><font color="#a31515">&quot;.xls&quot;</font></span>))        <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; Response.ContentType = _excelMimeType;        <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; Response.AddHeader(<span><font color="#a31515">&quot;Content-Disposition&quot;</font></span>, <span><font color="#a31515">&quot;attachment; filename=&quot;</font></span> + documentID.ToString().Replace(<span><font color="#a31515">&quot;-&quot;</font></span>, <span><font color="#a31515">&quot;&quot;</font></span>) + theBlob.FileExtension);        <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; etag = documentID.ToString() + theBlob.BlobID.ToString();        <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; Response.AddHeader(<span><font color="#a31515">&quot;ETag&quot;</font></span>, etag);        </p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span><font color="#008000">//Write the file directly to the HTTP content output stream.</font></span>        </p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span><font color="#008000">//NOTE: THIS IS NOT MEMORY EFFICIENT AT ALL. TODO: change compression technique for documents</font></span>        <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span><font color="#0000ff">byte</font></span>[] dataToSend = <span><font color="#0000ff">null</font></span>;        <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span><font color="#0000ff">using</font></span> (<span><font color="#2b91af">MemoryStream</font></span> dataStream = <span><font color="#0000ff">new</font></span>&#160;<span><font color="#2b91af">MemoryStream</font></span>(theBlob.Data))        <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; {        <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span><font color="#0000ff">using</font></span> (<span><font color="#2b91af">MemoryStream</font></span> stream = UnzippedData(dataStream))        <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; {        <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; dataToSend = stream.ToArray();        <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; }        <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; }        <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span><font color="#008000">//relieve some pressure by pushing write of data outside of the blocks above to allow for memory free.</font></span>        <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; Response.BinaryWrite(dataToSend);        <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; Response.Flush();        <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; }        <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; Response.End();        <br />&#160;&#160;&#160; }</font></font></p>
<p><font size="3" face="Consolas"></font></p>
<p><font size="3" face="Consolas">I hope this article helped you out a little and saved you some serious download times. (When Office revisits the file, it remembers the ETag. So you get efficiencies all over the place).</font></p>
<p><font size="3" face="Consolas"></font></p>
<p><font size="3" face="Consolas">Happy Coding!</font></p>
]]></content:encoded>
			<wfw:commentRss>http://brianseekford.com/index.php/2011/02/10/how-to-optimize-download-performance-for-files-stream-from-your-database-via-asp-net/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CommunicationException with Silverlight and a cross domain call</title>
		<link>http://brianseekford.com/index.php/2010/12/04/communicationexception-with-silverlight-and-a-cross-domain-call/</link>
		<comments>http://brianseekford.com/index.php/2010/12/04/communicationexception-with-silverlight-and-a-cross-domain-call/#comments</comments>
		<pubDate>Sun, 05 Dec 2010 04:15:36 +0000</pubDate>
		<dc:creator>Brian Seekford</dc:creator>
				<category><![CDATA[.NET Development]]></category>
		<category><![CDATA[Silverlight]]></category>
		<category><![CDATA[call]]></category>
		<category><![CDATA[clientaccesspolicy.xml]]></category>
		<category><![CDATA[cross domain]]></category>
		<category><![CDATA[service]]></category>
		<category><![CDATA[wcf]]></category>

		<guid isPermaLink="false">http://brianseekford.com/?p=439</guid>
		<description><![CDATA[You are calling your services from Silverlight but the services are accessed via a different URI than the Silverlight application is being hosted. Errors galore, right?  Silverlight honors the protection that helps mitigate a sites scripts from being called if someone simply copied your app to their server.  The error you get is this:  An [...]]]></description>
			<content:encoded><![CDATA[<p>You are calling your services from Silverlight but the services are accessed via a different URI than the Silverlight application is being hosted. Errors galore, right? </p>
<p>Silverlight honors the protection that helps mitigate a sites scripts from being called if someone simply copied your app to their server. </p>
<p>The error you get is this: </p>
<p>An error occurred while trying to make a request to URI &#8216;http://localhost.:2935/Services/UserService.svc&#8217;. This could be due to attempting to access a service in a cross-domain way without a proper cross-domain policy in place, or a policy that is unsuitable for SOAP services. You may need to contact the owner of the service to publish a cross-domain policy file and to ensure it allows SOAP-related HTTP headers to be sent. This error may also be caused by using internal types in the web service proxy without using the InternalsVisibleToAttribute attribute. Please see the inner exception for more details. </p>
<p>This error is very easily fixed. </p>
<p>Create a file in you web root. Must be the root called <strong>clientaccesspolicy.xml</strong> . It must be named exactly and must live in the root. </p>
<p>File: <strong>clientaccesspolicy.xml</strong></p>
<p>Now, copy this into the file: </p>
<pre>&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;access-policy&gt;
  &lt;cross-domain-access&gt;
    &lt;policy&gt;
      &lt;allow-from http-request-headers="SOAPAction"&gt;
        &lt;domain uri="*"/&gt;
      &lt;/allow-from&gt;
      &lt;grant-to&gt;
        &lt;resource path="/" include-subpaths="true"/&gt;
      &lt;/grant-to&gt;
    &lt;/policy&gt;
  &lt;/cross-domain-access&gt;
&lt;/access-policy&gt;</pre>
<p>Save it, rebuild and run. Voila, you should now be up and running. If you need more info, check this helpful link. </p>
<p>Happy Coding!</p>
]]></content:encoded>
			<wfw:commentRss>http://brianseekford.com/index.php/2010/12/04/communicationexception-with-silverlight-and-a-cross-domain-call/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

