<?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>.debug</title>
	<atom:link href="http://www.dexterlegaspi.com/journal/?feed=rss2" rel="self" type="application/rss+xml" />
	<link>http://www.dexterlegaspi.com/journal</link>
	<description>.NET and BizTalk Rants</description>
	<lastBuildDate>Tue, 08 May 2012 02:35:52 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>ServiceReferences.ClientConfig Transform</title>
		<link>http://www.dexterlegaspi.com/journal/?p=220</link>
		<comments>http://www.dexterlegaspi.com/journal/?p=220#comments</comments>
		<pubDate>Tue, 08 May 2012 02:35:52 +0000</pubDate>
		<dc:creator>dalegaspi</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[SilverLight]]></category>

		<guid isPermaLink="false">http://www.dexterlegaspi.com/journal/?p=220</guid>
		<description><![CDATA[Web.config transformations is one of my favorite features in the new Visual Studio 2010, and indispensable with equally awesome Web Deploy projects and it baffles me why Microsoft not make this work out of the box for SilverLight ServiceReferences.ClientConfig.  There &#8230; <a href="http://www.dexterlegaspi.com/journal/?p=220">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Web.config transformations is one of my favorite features in the new Visual Studio 2010, and indispensable with equally awesome Web Deploy projects and it baffles me why Microsoft not make this work out of the box for SilverLight ServiceReferences.ClientConfig.  There are a number of workarounds you can find on the internet, and one came close to what I <a href="http://stackoverflow.com/questions/1326886/silverlight-how-to-setup-servicereferences-clientconfig-when-placed-inside-xap">wanted</a>, but I still thought it&#8217;s retarded.</p>
<p>This <a href="http://blogs.staykov.net/2011/10/servicereferenceclientconfig-build.html">blog entry</a> from a fellow developer nailed it.  It behaves <em>exactly</em> like a web.config transform (without using any third-party libraries), except you have to set it up manually in your SL project.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dexterlegaspi.com/journal/?feed=rss2&#038;p=220</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>.NET 4.5/5 await and async</title>
		<link>http://www.dexterlegaspi.com/journal/?p=218</link>
		<comments>http://www.dexterlegaspi.com/journal/?p=218#comments</comments>
		<pubDate>Mon, 30 Apr 2012 01:23:31 +0000</pubDate>
		<dc:creator>dalegaspi</dc:creator>
				<category><![CDATA[.NET]]></category>

		<guid isPermaLink="false">http://www.dexterlegaspi.com/journal/?p=218</guid>
		<description><![CDATA[Just when I thought LINQ and PLINQ was difficult enough to grasp with my little brain, it gets worse with the new await and async keywords introduced in .NET 4.5.  I happen to come across this while trying out the &#8230; <a href="http://www.dexterlegaspi.com/journal/?p=218">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Just when I thought LINQ and PLINQ was difficult enough to grasp with my little brain, it gets worse with the new await and async keywords introduced in .NET 4.5.  I happen to come across this while trying out the new-ish yet-another-HTTP-client System.Net.Http.HttpClient (not to be confused with the Microsoft.Http.HttpClient).</p>
<p>I don&#8217;t get it: why the heck does this new HttpClient have to be ALL asynchronous methods?  What if you just need a simple synchronous method?  Perhaps it&#8217;s just that I haven&#8217;t grasped why Microsoft created this in the first place.  I think it&#8217;s supposed to simplify threading, but the code I&#8217;m seeing is more confusing than it has to be.</p>
<p>Or maybe I&#8217;m just getting to old for this sh!t.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dexterlegaspi.com/journal/?feed=rss2&#038;p=218</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PaperTrailApp vs Loggly</title>
		<link>http://www.dexterlegaspi.com/journal/?p=214</link>
		<comments>http://www.dexterlegaspi.com/journal/?p=214#comments</comments>
		<pubDate>Sat, 28 Apr 2012 20:04:15 +0000</pubDate>
		<dc:creator>dalegaspi</dc:creator>
				<category><![CDATA[.NET]]></category>

		<guid isPermaLink="false">http://www.dexterlegaspi.com/journal/?p=214</guid>
		<description><![CDATA[Just like a lot of developers, I like the idea of log files but it really becomes a pain to deal with when dealing with a system consisting of multiple servers (IIS farms, for example) where you need to look &#8230; <a href="http://www.dexterlegaspi.com/journal/?p=214">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Just like a lot of developers, I like the idea of log files but it really becomes a pain to deal with when dealing with a system consisting of multiple servers (IIS farms, for example) where you need to look at more than one log file to troubleshoot something.</p>
<p>A co-worker introduced the whole team to a cloud-based logging facility called <a href="http://www.loggly.com/">Loggly</a>.  Integration with Loggly is very easy and pretty much serves me for the most part, however as I use it more, the more I become annoyed at how clunky the UI is (no unix tail equivalent, very limited searching/filtering) and how delayed refresh rates are (which could span several seconds).</p>
<p>So I started looking at an alternative and came across <a href="http://www.papertrailapp.com">PaperTrailApp</a>.  It&#8217;s similar in concept with Loggly, but it&#8217;s more integrated with standard logging facilities like syslog and its OOB support for NLog is a welcome addition.  Its UI is a lot more polished than Loggly&#8217;s (auto-refresh and tail-like features supported) and there&#8217;s practically no delay that I can detect.  Searching/Filtering is much better as well.</p>
<p>I haven&#8217;t played with PaperTrailApp that long (literally started only an hour ago), but I&#8217;m almost positive that between Loggly and PaperTrailApp, the latter gets my vote.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dexterlegaspi.com/journal/?feed=rss2&#038;p=214</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>The Tale of WCF, PerfMon, and Forced Single-Threading</title>
		<link>http://www.dexterlegaspi.com/journal/?p=211</link>
		<comments>http://www.dexterlegaspi.com/journal/?p=211#comments</comments>
		<pubDate>Sun, 22 Apr 2012 14:56:45 +0000</pubDate>
		<dc:creator>dalegaspi</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[WCF]]></category>

		<guid isPermaLink="false">http://www.dexterlegaspi.com/journal/?p=211</guid>
		<description><![CDATA[The great thing about the new WCF framework is the ability to add performance counters on your WCF services by adding settings in the web.config (i.e., no additional lines of code).  This ability enabled us to easily (well, relatively) troubleshoot &#8230; <a href="http://www.dexterlegaspi.com/journal/?p=211">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>The great thing about the new WCF framework is the ability to add performance counters on your WCF services by adding settings in the web.config (i.e., no additional lines of code).  This ability enabled us to easily (well, relatively) troubleshoot the cause of the bottleneck in our B2C API.</p>
<p>It turns out that one of the WCF services that we&#8217;re using was forced to be running in a single thread.</p>
<pre>[ServiceBehavior(InstanceContextMode = InstanceContextMode.Single)]</pre>
<p>Somehow, one of the previous developers was probably unit-testing the WCF and forgot to remove the directive before he checked in the code.</p>
<p>I think this option, IMO, is ultimately evil and very destructive; it should throw an ERROR in the Event Viewer when something like this is set in WCF implementation.</p>
<p>This, my friends, is why load testing is very important in any customer-facing API.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dexterlegaspi.com/journal/?feed=rss2&#038;p=211</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>I Hate ASP.NET</title>
		<link>http://www.dexterlegaspi.com/journal/?p=207</link>
		<comments>http://www.dexterlegaspi.com/journal/?p=207#comments</comments>
		<pubDate>Tue, 28 Feb 2012 04:25:24 +0000</pubDate>
		<dc:creator>dalegaspi</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[Visual Studio 2010]]></category>

		<guid isPermaLink="false">http://www.dexterlegaspi.com/journal/?p=207</guid>
		<description><![CDATA[Since installing Visual Studio 2011 Beta, I started getting this error when trying to debug an ASP.NET application through the local web server in Visual Studio (2010): Exception message: Could not load file or assembly ‘msshrtmi’ or one of its &#8230; <a href="http://www.dexterlegaspi.com/journal/?p=207">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Since installing Visual Studio 2011 Beta, I started getting this error when trying to debug an ASP.NET application through the local web server in Visual Studio (2010):</p>
<pre><em>Exception message: Could not load file or assembly ‘msshrtmi’ or one of its dependencies. An attempt was made to load a program with an incorrect format.</em></pre>
<p>What is this?!  Most google results will point you to some Azure-related forum threads and will advise you to remove &lt;PlatformTarget&gt; tags in your .csproj files.  That didn&#8217;t work for me.  What did work is manually deleting msshrtmi.dll from the target directory.  Now, adding this in the pre- or post-build step should work, but for some reason, it doesn&#8217;t&#8230;maybe because it&#8217;s almost midnight and I&#8217;m still dealing with this crap.  I&#8217;m getting too old for this.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dexterlegaspi.com/journal/?feed=rss2&#038;p=207</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WCF REST Services and HTTP Redirects</title>
		<link>http://www.dexterlegaspi.com/journal/?p=202</link>
		<comments>http://www.dexterlegaspi.com/journal/?p=202#comments</comments>
		<pubDate>Tue, 31 Jan 2012 20:36:22 +0000</pubDate>
		<dc:creator>dalegaspi</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[IIS]]></category>

		<guid isPermaLink="false">http://www.dexterlegaspi.com/journal/?p=202</guid>
		<description><![CDATA[We have an existing RESTful method that does a redirect (HTTP 302) for a specific condition.  Our proxy services complained that the redirect abruptly closes the connection which wrecks havoc on their proxy servers&#8230;he has the curl command to prove &#8230; <a href="http://www.dexterlegaspi.com/journal/?p=202">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>We have an existing RESTful method that does a redirect (HTTP 302) for a specific condition.  Our proxy services complained that the redirect abruptly closes the connection which wrecks havoc on their proxy servers&#8230;he has the curl command to prove it, and it returns it like this:</p>
<pre>curl(18): transfer closed with outstanding read data remaining</pre>
<p>The funny thing is, when I run the REST HTTP service under Visual Studio debugger using the built-in web server, i don&#8217;t get this error!  it only appears when I deploy it on an IIS server.</p>
<p>Here&#8217;s the original code:</p>
<pre>if (...)
{
  HttpContext.Current.Response.Redirect(new_url);
}</pre>
<p>I changed it to:</p>
<pre>if (...)
{
  HttpContext.Current.Response.Rediect(new_url, false);
}</pre>
<p>The problem now is that status code is being set to HTTP 200!  To get around this (after a lot of trial and error),</p>
<p>I added this code:</p>
<pre>WebOperationContext.Current.OutgoingResponse.StatusCode = System.Net.HttpStatusCode.Redirect;</pre>
<p>BAM!  Fixed.  No more curl errors!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dexterlegaspi.com/journal/?feed=rss2&#038;p=202</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Automate FTP in PowerShell</title>
		<link>http://www.dexterlegaspi.com/journal/?p=199</link>
		<comments>http://www.dexterlegaspi.com/journal/?p=199#comments</comments>
		<pubDate>Wed, 28 Dec 2011 20:17:00 +0000</pubDate>
		<dc:creator>dalegaspi</dc:creator>
				<category><![CDATA[PowerShell]]></category>

		<guid isPermaLink="false">http://www.dexterlegaspi.com/journal/?p=199</guid>
		<description><![CDATA[Sometimes solutions can just be so simple&#8230;why complicate it? &#160;]]></description>
			<content:encoded><![CDATA[<p>Sometimes solutions can just be so <a href="http://stackoverflow.com/a/8660761/918858">simple</a>&#8230;why complicate it?</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dexterlegaspi.com/journal/?feed=rss2&#038;p=199</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>IIS 7.x Dynamic Compression</title>
		<link>http://www.dexterlegaspi.com/journal/?p=196</link>
		<comments>http://www.dexterlegaspi.com/journal/?p=196#comments</comments>
		<pubDate>Sat, 17 Dec 2011 14:00:51 +0000</pubDate>
		<dc:creator>dalegaspi</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[IIS]]></category>

		<guid isPermaLink="false">http://www.dexterlegaspi.com/journal/?p=196</guid>
		<description><![CDATA[I&#8217;m not a big fan of Scott Hanselman.  I personally think the guy has a very high opinion of himself and you really need to weed out a lot of the BS and unfunny stuff he&#8217;s saying to get the &#8230; <a href="http://www.dexterlegaspi.com/journal/?p=196">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m not a big fan of Scott Hanselman.  I personally think the guy has a very high opinion of himself and you really need to weed out a lot of the BS and unfunny stuff he&#8217;s saying to get the meat of what he&#8217;s talking about.</p>
<p>Having said all of that, this <a href="http://www.hanselman.com/blog/EnablingDynamicCompressionGzipDeflateForWCFDataFeedsODataAndOtherCustomServicesInIIS7.aspx">blog post</a> of his is the ONLY useful source out there about enabling IIS 7 Dynamic Compression.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dexterlegaspi.com/journal/?feed=rss2&#038;p=196</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Web Deploy 2.0 and Remote IIS</title>
		<link>http://www.dexterlegaspi.com/journal/?p=191</link>
		<comments>http://www.dexterlegaspi.com/journal/?p=191#comments</comments>
		<pubDate>Fri, 09 Dec 2011 16:17:27 +0000</pubDate>
		<dc:creator>dalegaspi</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[TFS]]></category>

		<guid isPermaLink="false">http://www.dexterlegaspi.com/journal/?p=191</guid>
		<description><![CDATA[This seems simple but believe it or not it took me a long while to find the answer.. If you&#8217;re using Web Deploy 2.0 and you try to deploy your web application to a remote server by using https://remote_server:8172/msdeploy.axd you &#8230; <a href="http://www.dexterlegaspi.com/journal/?p=191">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>This seems simple but believe it or not it took me a long while to find the answer..</p>
<p>If you&#8217;re using Web Deploy 2.0 and you try to deploy your web application to a remote server by using https://remote_server:8172/msdeploy.axd you may encounter an error message that is along the lines of the destination is unreachable, or the required process &#8220;The Web Management Service&#8221; is started.</p>
<p>If you encounter this, try to check the services on the REMOTE SERVER if Web Management Service exists and is running.  Chances are, it&#8217;s missing.  If it&#8217;s missing, you need to launch the Web Platform Installer and install &#8220;IIS: Management Service&#8221; then go to Services and make sure it&#8217;s running.</p>
<p><strong>Update: If you&#8217;re still having problems, like getting a 404 or 403 errors on deploying the app to a remote IIS (i.e., using TFS), there&#8217;s something else you need to do <img src='http://www.dexterlegaspi.com/journal/wp-includes/images/smilies/icon_neutral.gif' alt=':-|' class='wp-smiley' />  : check out this <a href="http://stackoverflow.com/questions/2946340/visual-studio-2010-web-deployment-task-failed">thread from stack overflow</a> and read the response from simbolo.</strong></p>
]]></content:encoded>
			<wfw:commentRss>http://www.dexterlegaspi.com/journal/?feed=rss2&#038;p=191</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Upgrading from Silverlight 2.x to 4.x</title>
		<link>http://www.dexterlegaspi.com/journal/?p=186</link>
		<comments>http://www.dexterlegaspi.com/journal/?p=186#comments</comments>
		<pubDate>Thu, 27 Oct 2011 02:15:31 +0000</pubDate>
		<dc:creator>dalegaspi</dc:creator>
				<category><![CDATA[SilverLight]]></category>

		<guid isPermaLink="false">http://www.dexterlegaspi.com/journal/?p=186</guid>
		<description><![CDATA[Forget about installing and reinstalling the Silverlight SDK Tools, forget about the tools that just crashes Visual Studio for no apparent reason, this is probably one of the things that frustrates the hell out of SilverLight development: upgrading from older &#8230; <a href="http://www.dexterlegaspi.com/journal/?p=186">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Forget about installing and reinstalling the Silverlight SDK Tools, forget about the <a href="http://www.dexterlegaspi.com/journal/?p=160">tools that just crashes Visual Studio</a> for no apparent reason, this is probably one of the things that frustrates the hell out of SilverLight development: upgrading from older to newer version.</p>
<p>I am not a SilverLight expert&#8211;far from it.  I don&#8217;t intend to learn this, and the only reason I&#8217;m going through the motions is because some system that I happen to have inherited uses SilverLight.  SilverLight is probably one of the top 5 things I hate that came out of the Microsoft pile of trainwreck (WiX being the #1).</p>
<p>Anyway, enough with the rant.</p>
<p>I upgraded the UI from SilverLight 2.x to 4.x and one of the things that Microsoft got rid of is the asp:SilverLight tag to plop in your SL app on a page; it&#8217;s recommended that you use the object.  The issue with this is that the silverlight object is now not accessible from code-behind&#8230;so in SL 2.x where it&#8217;s easy to pass a dynamic initParams string with:</p>
<p>mySLApp.InitParameters = &#8220;O HAI LOL&#8221;;</p>
<p>&#8230;now with SL 4, this becomes a nuisance.  Fortunately with this <a href="http://www.jamespeckham.com/blog/09-08-02/Init_Params_in_Silverlight_3.aspx">blog posting</a>, I have found an elegant way to pass initialization parameters&#8230;make sure you read the comment from Jelgab.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dexterlegaspi.com/journal/?feed=rss2&#038;p=186</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

