<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss 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/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>Learning by Failing</title>
	
	<link>http://learningbyfailing.com</link>
	<description>I do Just-in-time learning, and sometimes solve problems quick &amp; dirty. These are my notes.</description>
	<lastBuildDate>Thu, 14 Oct 2010 21:51:53 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/LearningByFailing" /><feedburner:info uri="learningbyfailing" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><item>
		<title>An error when installing Mono with MacPorts</title>
		<link>http://feedproxy.google.com/~r/LearningByFailing/~3/Dy8BxaBVqd0/</link>
		<comments>http://learningbyfailing.com/2010/10/an-error-when-installing-mono-with-macports/#comments</comments>
		<pubDate>Thu, 14 Oct 2010 21:46:53 +0000</pubDate>
		<dc:creator>Lasse</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[mac]]></category>
		<category><![CDATA[mono]]></category>

		<guid isPermaLink="false">http://learningbyfailing.com/?p=187</guid>
		<description><![CDATA[Got this errpr when doing a 1234567891011$ sudo port install mono ---&#62; &#160;Computing dependencies for mono ---&#62; &#160;Dependencies to be installed: libgdiplus ---&#62; &#160;Building libgdiplus Error: Target org.macports.build returned: shell command failed Log for libgdiplus is at: /opt/local/var/macports/logs/ _opt_local_var_macports_sources_rsync.macports.org_release_ ports_devel_libgdiplus/main.log Error: The following dependencies failed to build: libgdiplus Error: Status 1 encountered during processing. To [...]]]></description>
			<content:encoded><![CDATA[<p>Got this errpr when doing a</p>
<div class="codecolorer-container bash blackboard" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br /></div></td><td><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">$ <span style="color: #c20cb9; font-weight: bold;">sudo</span> port <span style="color: #c20cb9; font-weight: bold;">install</span> mono<br />
---<span style="color: #000000; font-weight: bold;">&gt;</span> &nbsp;Computing dependencies <span style="color: #000000; font-weight: bold;">for</span> mono<br />
---<span style="color: #000000; font-weight: bold;">&gt;</span> &nbsp;Dependencies to be installed: libgdiplus<br />
---<span style="color: #000000; font-weight: bold;">&gt;</span> &nbsp;Building libgdiplus<br />
Error: Target org.macports.build returned: shell <span style="color: #7a0874; font-weight: bold;">command</span> failed<br />
Log <span style="color: #000000; font-weight: bold;">for</span> libgdiplus is at: <span style="color: #000000; font-weight: bold;">/</span>opt<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>macports<span style="color: #000000; font-weight: bold;">/</span>logs<span style="color: #000000; font-weight: bold;">/</span><br />
_opt_local_var_macports_sources_rsync.macports.org_release_<br />
ports_devel_libgdiplus<span style="color: #000000; font-weight: bold;">/</span>main.log<br />
Error: The following dependencies failed to build: libgdiplus<br />
Error: Status <span style="color: #000000;">1</span> encountered during processing.<br />
To report a bug, see <span style="color: #000000; font-weight: bold;">&lt;</span>http:<span style="color: #000000; font-weight: bold;">//</span>guide.macports.org<span style="color: #000000; font-weight: bold;">/</span><span style="color: #666666; font-style: italic;">#project.tickets&gt;</span></div></td></tr></tbody></table></div>
<p>The logfile said:</p>
<div class="codecolorer-container bash blackboard" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br /></div></td><td><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">:info:build ld: <span style="color: #000000; font-weight: bold;">in</span> <span style="color: #000000; font-weight: bold;">/</span>opt<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>libsasl2.2.dylib, <span style="color: #c20cb9; font-weight: bold;">file</span> was <br />
built <span style="color: #000000; font-weight: bold;">for</span> unsupported <span style="color: #c20cb9; font-weight: bold;">file</span> format <span style="color: #c20cb9; font-weight: bold;">which</span> is not the architecture being <br />
linked <span style="color: #7a0874; font-weight: bold;">&#40;</span>i386<span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #000000; font-weight: bold;">for</span> architecture i386</div></td></tr></tbody></table></div>
<p>libsasl2.2.dylib is in cyrus-sasl2 and apparently it was only x64-compiled.<br />
To solve it do this:</p>
<div class="codecolorer-container bash blackboard" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br />13<br />14<br />15<br /></div></td><td><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">$ <span style="color: #c20cb9; font-weight: bold;">sudo</span> port upgrade <span style="color: #660033;">--enforce-variants</span> cyrus-sasl2 +universal<br />
---<span style="color: #000000; font-weight: bold;">&gt;</span> &nbsp;Computing dependencies <span style="color: #000000; font-weight: bold;">for</span> cyrus-sasl2<br />
---<span style="color: #000000; font-weight: bold;">&gt;</span> &nbsp;Fetching cyrus-sasl2<br />
---<span style="color: #000000; font-weight: bold;">&gt;</span> &nbsp;Verifying checksum<span style="color: #7a0874; font-weight: bold;">&#40;</span>s<span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #000000; font-weight: bold;">for</span> cyrus-sasl2<br />
---<span style="color: #000000; font-weight: bold;">&gt;</span> &nbsp;Extracting cyrus-sasl2<br />
---<span style="color: #000000; font-weight: bold;">&gt;</span> &nbsp;Applying patches to cyrus-sasl2<br />
---<span style="color: #000000; font-weight: bold;">&gt;</span> &nbsp;Configuring cyrus-sasl2<br />
---<span style="color: #000000; font-weight: bold;">&gt;</span> &nbsp;Building cyrus-sasl2<br />
---<span style="color: #000000; font-weight: bold;">&gt;</span> &nbsp;Staging cyrus-sasl2 into destroot<br />
---<span style="color: #000000; font-weight: bold;">&gt;</span> &nbsp;Computing dependencies <span style="color: #000000; font-weight: bold;">for</span> cyrus-sasl2<br />
---<span style="color: #000000; font-weight: bold;">&gt;</span> &nbsp;Installing cyrus-sasl2 <span style="color: #000000; font-weight: bold;">@</span>2.1.23_3+kerberos+universal<br />
---<span style="color: #000000; font-weight: bold;">&gt;</span> &nbsp;Deactivating cyrus-sasl2 <span style="color: #000000; font-weight: bold;">@</span>2.1.23_3+kerberos<br />
---<span style="color: #000000; font-weight: bold;">&gt;</span> &nbsp;Cleaning cyrus-sasl2<br />
---<span style="color: #000000; font-weight: bold;">&gt;</span> &nbsp;Activating cyrus-sasl2 <span style="color: #000000; font-weight: bold;">@</span>2.1.23_3+kerberos+universal<br />
---<span style="color: #000000; font-weight: bold;">&gt;</span> &nbsp;Cleaning cyrus-sasl2</div></td></tr></tbody></table></div>
<p>then installing mono will succeed:</p>
<div class="codecolorer-container bash blackboard" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br />13<br />14<br />15<br />16<br />17<br />18<br />19<br /></div></td><td><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">$ <span style="color: #c20cb9; font-weight: bold;">sudo</span> port <span style="color: #c20cb9; font-weight: bold;">install</span> mono<br />
---<span style="color: #000000; font-weight: bold;">&gt;</span> &nbsp;Computing dependencies <span style="color: #000000; font-weight: bold;">for</span> mono<br />
---<span style="color: #000000; font-weight: bold;">&gt;</span> &nbsp;Dependencies to be installed: libgdiplus<br />
---<span style="color: #000000; font-weight: bold;">&gt;</span> &nbsp;Building libgdiplus<br />
---<span style="color: #000000; font-weight: bold;">&gt;</span> &nbsp;Staging libgdiplus into destroot<br />
---<span style="color: #000000; font-weight: bold;">&gt;</span> &nbsp;Installing libgdiplus <span style="color: #000000; font-weight: bold;">@</span>2.6.7_0+universal<br />
---<span style="color: #000000; font-weight: bold;">&gt;</span> &nbsp;Activating libgdiplus <span style="color: #000000; font-weight: bold;">@</span>2.6.7_0+universal<br />
---<span style="color: #000000; font-weight: bold;">&gt;</span> &nbsp;Cleaning libgdiplus<br />
---<span style="color: #000000; font-weight: bold;">&gt;</span> &nbsp;Fetching mono<br />
---<span style="color: #000000; font-weight: bold;">&gt;</span> &nbsp;Attempting to fetch mono-2.6.7.tar.bz2 from http:<span style="color: #000000; font-weight: bold;">//</span>lil.fr.distfiles.macports.org<span style="color: #000000; font-weight: bold;">/</span>mono<br />
---<span style="color: #000000; font-weight: bold;">&gt;</span> &nbsp;Verifying checksum<span style="color: #7a0874; font-weight: bold;">&#40;</span>s<span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #000000; font-weight: bold;">for</span> mono<br />
---<span style="color: #000000; font-weight: bold;">&gt;</span> &nbsp;Extracting mono<br />
---<span style="color: #000000; font-weight: bold;">&gt;</span> &nbsp;Applying patches to mono<br />
---<span style="color: #000000; font-weight: bold;">&gt;</span> &nbsp;Configuring mono<br />
---<span style="color: #000000; font-weight: bold;">&gt;</span> &nbsp;Building mono &nbsp; &nbsp; <br />
---<span style="color: #000000; font-weight: bold;">&gt;</span> &nbsp;Staging mono into destroot<br />
---<span style="color: #000000; font-weight: bold;">&gt;</span> &nbsp;Installing mono <span style="color: #000000; font-weight: bold;">@</span>2.6.7_0<br />
---<span style="color: #000000; font-weight: bold;">&gt;</span> &nbsp;Activating mono <span style="color: #000000; font-weight: bold;">@</span>2.6.7_0<br />
---<span style="color: #000000; font-weight: bold;">&gt;</span> &nbsp;Cleaning mono</div></td></tr></tbody></table></div>
]]></content:encoded>
			<wfw:commentRss>http://learningbyfailing.com/2010/10/an-error-when-installing-mono-with-macports/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://learningbyfailing.com/2010/10/an-error-when-installing-mono-with-macports/</feedburner:origLink></item>
		<item>
		<title>Removing a field from a mongodb collection</title>
		<link>http://feedproxy.google.com/~r/LearningByFailing/~3/XWQsZjfO6jE/</link>
		<comments>http://learningbyfailing.com/2010/04/removing-a-field-from-a-mongodb-collection/#comments</comments>
		<pubDate>Thu, 01 Apr 2010 13:23:00 +0000</pubDate>
		<dc:creator>Lasse</dc:creator>
				<category><![CDATA[Code]]></category>

		<guid isPermaLink="false">http://learningbyfailing.com/?p=171</guid>
		<description><![CDATA[By using the mongo shell (mongo.exe in windows). Lets say we save a couple of new objects into our &#8220;example&#8221;-collection: 1234567&#62; db.example.save({FirstName: &#34;Lasse&#34;, LastName: &#34;Krantz&#34;, MiddleName: &#34;Evald&#34;}) &#62; db.example.save({FirstName: &#34;Karin&#34;, LastName: &#34;Krook&#34;, MiddleName: &#34;Elin&#34;}) &#62; db.example.find() { &#34;_id&#34; : ObjectId(&#34;4bb493d94917000000006c33&#34;), &#34;FirstName&#34; : &#34;Lasse&#34;, &#160; &#160; &#160; &#160; &#160;&#34;LastName&#34; : &#34;Krantz&#34;, &#34;MiddleName&#34; : &#34;Evald&#34; } { [...]]]></description>
			<content:encoded><![CDATA[<p>By using the mongo shell (mongo.exe in windows).</p>
<p>Lets say we save a couple of new objects into our &#8220;example&#8221;-collection:</p>
<div class="codecolorer-container text blackboard" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">&gt; db.example.save({FirstName: &quot;Lasse&quot;, LastName: &quot;Krantz&quot;, MiddleName: &quot;Evald&quot;})<br />
&gt; db.example.save({FirstName: &quot;Karin&quot;, LastName: &quot;Krook&quot;, MiddleName: &quot;Elin&quot;})<br />
&gt; db.example.find()<br />
{ &quot;_id&quot; : ObjectId(&quot;4bb493d94917000000006c33&quot;), &quot;FirstName&quot; : &quot;Lasse&quot;, <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&quot;LastName&quot; : &quot;Krantz&quot;, &quot;MiddleName&quot; : &quot;Evald&quot; }<br />
{ &quot;_id&quot; : ObjectId(&quot;4bb494804917000000006c34&quot;), &quot;FirstName&quot; : &quot;Karin&quot;, <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&quot;LastName&quot; : &quot;Krook&quot;, &quot;MiddleName&quot; : &quot;Elin&quot; }</div></td></tr></tbody></table></div>
<p>MongoDB needs an unique id, so it inserts an _id-field since we didn&#8217;t supply one.<br />
We want to remove the MiddleName field from all of our objects, so we do an update like this:</p>
<div class="codecolorer-container text blackboard" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">&gt; db.example.update({},{$unset: {MiddleName:1}},false,true)</div></td></tr></tbody></table></div>
<p>Lets look at the collection example again:</p>
<div class="codecolorer-container text blackboard" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">&gt; db.example.find()<br />
{ &quot;FirstName&quot; : &quot;Karin&quot;, &quot;LastName&quot; : &quot;Krook&quot;, <br />
&nbsp; &nbsp; &nbsp; &nbsp;&quot;_id&quot; : ObjectId(&quot;4bb499054917000000006c35&quot;) }<br />
{ &quot;FirstName&quot; : &quot;Lasse&quot;, &quot;LastName&quot; : &quot;Krantz&quot;, <br />
&nbsp; &nbsp; &nbsp; &nbsp;&quot;_id&quot; : ObjectId(&quot;4bb499124917000000006c36&quot;) }</div></td></tr></tbody></table></div>
<p>The MiddleName field is gone!</p>
<p>The <a href="http://www.mongodb.org/display/DOCS/Updating#Updating-Update">update</a>-command arguments are (type db.example.update in the shell to see function):</p>
<p>function (query, obj, upsert, multi)<br />
query: we passed in an empty query, {}, meaning all documents.<br />
obj: updated object or <a href="http://www.mongodb.org/display/DOCS/Updating#Updating-ModifierOperations">$ operators</a> (e.g., $inc) which manipulate the object, we used the <a href="http://www.mongodb.org/display/DOCS/Updating#Updating-%24unset">$unset</a> operator, meaning deleting a field. The value 1 is a dummyvalue and could be anything.<br />
upsert: inserts a nonexisting object if it doesn&#8217;t exists. We just set this to false.<br />
multi: apply update to more than one object, false is default and then it just updates first match in query, so we set this to true for updating all our objects. </p>
]]></content:encoded>
			<wfw:commentRss>http://learningbyfailing.com/2010/04/removing-a-field-from-a-mongodb-collection/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://learningbyfailing.com/2010/04/removing-a-field-from-a-mongodb-collection/</feedburner:origLink></item>
		<item>
		<title>Could not load type System.Web.Mvc.Html.ChildActionExtensions from assembly System.Web.Mvc, Version=2.0.0.0</title>
		<link>http://feedproxy.google.com/~r/LearningByFailing/~3/xJwQAKj8Jlc/</link>
		<comments>http://learningbyfailing.com/2010/02/could-not-load-type-system-web-mvc-html-childactionextensions-from-assembly-system-web-mvc-version2-0-0-0/#comments</comments>
		<pubDate>Fri, 05 Feb 2010 08:29:23 +0000</pubDate>
		<dc:creator>Lasse</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[mvc]]></category>

		<guid isPermaLink="false">http://learningbyfailing.com/?p=168</guid>
		<description><![CDATA[Yesterday a teammember got &#8216;Could not load type &#8216;System.Web.Mvc.Html.ChildActionExtensions&#8217; from assembly &#8216;System.Web.Mvc, Version=2.0.0.0&#8242; from this code: 1&#60;% Html.RenderAction&#60;PagesController&#62;&#40;p=&#62;p.Front&#40;&#41;&#41;; %&#62; This is a method that resides in the ASP.NET MVC 2 Futures assembly, Microsoft.Web.Mvc, and the problem arised from having the ASP.NET MVC 2 Beta version installed of System.Web.Mvc. but the RC of the Futures-assembly. Installing [...]]]></description>
			<content:encoded><![CDATA[<p>Yesterday a teammember got &#8216;Could not load type &#8216;System.Web.Mvc.Html.ChildActionExtensions&#8217; from assembly &#8216;System.Web.Mvc, Version=2.0.0.0&#8242; from this code:</p>
<div class="codecolorer-container csharp blackboard" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="csharp codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #008000;">&lt;%</span> Html<span style="color: #008000;">.</span><span style="color: #0000FF;">RenderAction</span><span style="color: #008000;">&lt;</span>PagesController<span style="color: #008000;">&gt;</span><span style="color: #008000;">&#40;</span>p<span style="color: #008000;">=&gt;</span>p<span style="color: #008000;">.</span><span style="color: #0000FF;">Front</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span> <span style="color: #008000;">%&gt;</span></div></td></tr></tbody></table></div>
<p>This is a method that resides in the <a href="http://aspnet.codeplex.com/Release/ProjectReleases.aspx?ReleaseId=39978">ASP.NET MVC 2 Futures</a> assembly, Microsoft.Web.Mvc, and the problem arised from having the ASP.NET MVC 2 Beta version installed of System.Web.Mvc. but the RC of the Futures-assembly.<br />
Installing RC of MVC 2 solved the problem.<br />
And today RC2 was released, so here we go again <img src='http://learningbyfailing.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://learningbyfailing.com/2010/02/could-not-load-type-system-web-mvc-html-childactionextensions-from-assembly-system-web-mvc-version2-0-0-0/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://learningbyfailing.com/2010/02/could-not-load-type-system-web-mvc-html-childactionextensions-from-assembly-system-web-mvc-version2-0-0-0/</feedburner:origLink></item>
		<item>
		<title>StructureMap Exception : No Default Instance defined for PluginFamily IFormsAuthentication</title>
		<link>http://feedproxy.google.com/~r/LearningByFailing/~3/s1aluNNZgMQ/</link>
		<comments>http://learningbyfailing.com/2010/02/structuremap-exception-no-default-instance-defined-for-pluginfamily-iformsauthentication/#comments</comments>
		<pubDate>Thu, 04 Feb 2010 12:03:02 +0000</pubDate>
		<dc:creator>Lasse</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[mvc]]></category>
		<category><![CDATA[structuremap]]></category>

		<guid isPermaLink="false">http://learningbyfailing.com/?p=157</guid>
		<description><![CDATA[If you used the MVC-template in Visual Studio (in my case Azure/MVC2/VS2010) and has configured a StructureMapControllerFactory like this: 1234567891011121314151617181920212223242526public class StructureMapControllerFactory : DefaultControllerFactory &#123; &#160; &#160; readonly Container container; &#160; &#160; public StructureMapControllerFactory&#40;Container container&#41; &#160; &#160; &#123; &#160; &#160; &#160; &#160; this.container = container; &#160; &#160; &#125; &#160; &#160; protected override IController GetControllerInstance &#160; [...]]]></description>
			<content:encoded><![CDATA[<p>If you used the MVC-template in Visual Studio (in my case Azure/MVC2/VS2010) and has configured a StructureMapControllerFactory like this:</p>
<div class="codecolorer-container csharp blackboard" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br />13<br />14<br />15<br />16<br />17<br />18<br />19<br />20<br />21<br />22<br />23<br />24<br />25<br />26<br /></div></td><td><div class="csharp codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #0600FF; font-weight: bold;">public</span> <span style="color: #6666cc; font-weight: bold;">class</span> StructureMapControllerFactory <span style="color: #008000;">:</span> DefaultControllerFactory<br />
<span style="color: #008000;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #0600FF; font-weight: bold;">readonly</span> Container container<span style="color: #008000;">;</span><br />
<br />
&nbsp; &nbsp; <span style="color: #0600FF; font-weight: bold;">public</span> StructureMapControllerFactory<span style="color: #008000;">&#40;</span>Container container<span style="color: #008000;">&#41;</span><br />
&nbsp; &nbsp; <span style="color: #008000;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0600FF; font-weight: bold;">this</span><span style="color: #008000;">.</span><span style="color: #0000FF;">container</span> <span style="color: #008000;">=</span> container<span style="color: #008000;">;</span><br />
&nbsp; &nbsp; <span style="color: #008000;">&#125;</span><br />
<br />
&nbsp; &nbsp; <span style="color: #0600FF; font-weight: bold;">protected</span> <span style="color: #0600FF; font-weight: bold;">override</span> IController GetControllerInstance<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #008000;">&#40;</span>RequestContext requestContext, Type controllerType<span style="color: #008000;">&#41;</span><br />
&nbsp; &nbsp; <span style="color: #008000;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0600FF; font-weight: bold;">if</span> <span style="color: #008000;">&#40;</span>controllerType <span style="color: #008000;">==</span> <span style="color: #0600FF; font-weight: bold;">null</span><span style="color: #008000;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0600FF; font-weight: bold;">return</span> <span style="color: #0600FF; font-weight: bold;">base</span><span style="color: #008000;">.</span><span style="color: #0000FF;">GetControllerInstance</span><span style="color: #008000;">&#40;</span>requestContext, controllerType<span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0600FF; font-weight: bold;">try</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #008000;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0600FF; font-weight: bold;">return</span> container<span style="color: #008000;">.</span><span style="color: #0000FF;">GetInstance</span><span style="color: #008000;">&#40;</span>controllerType<span style="color: #008000;">&#41;</span> <span style="color: #0600FF; font-weight: bold;">as</span> Controller<span style="color: #008000;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #008000;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0600FF; font-weight: bold;">catch</span> <span style="color: #008000;">&#40;</span>StructureMapException<span style="color: #008000;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #008000;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">System.<span style="color: #0000FF;">Diagnostics</span></span><span style="color: #008000;">.</span><span style="color: #0000FF;">Debug</span><span style="color: #008000;">.</span><span style="color: #0000FF;">WriteLine</span><span style="color: #008000;">&#40;</span>container<span style="color: #008000;">.</span><span style="color: #0000FF;">WhatDoIHave</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0600FF; font-weight: bold;">throw</span><span style="color: #008000;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #008000;">&#125;</span><br />
<br />
&nbsp; &nbsp; <span style="color: #008000;">&#125;</span><br />
<span style="color: #008000;">&#125;</span></div></td></tr></tbody></table></div>
<p>and activating it in Global.asax.cs with an empty configuration (it will autowire the controllers):</p>
<div class="codecolorer-container csharp blackboard" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br /></div></td><td><div class="csharp codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #0600FF; font-weight: bold;">protected</span> <span style="color: #6666cc; font-weight: bold;">void</span> Application_Start<span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><br />
<span style="color: #008000;">&#123;</span><br />
&nbsp; &nbsp; var container <span style="color: #008000;">=</span> <a href="http://www.google.com/search?q=new+msdn.microsoft.com"><span style="color: #008000;">new</span></a> Container<span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span><br />
&nbsp; &nbsp; ControllerBuilder<span style="color: #008000;">.</span><span style="color: #0000FF;">Current</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #008000;">.</span><span style="color: #0000FF;">SetControllerFactory</span><span style="color: #008000;">&#40;</span><a href="http://www.google.com/search?q=new+msdn.microsoft.com"><span style="color: #008000;">new</span></a> StructureMapControllerFactory<span style="color: #008000;">&#40;</span>container<span style="color: #008000;">&#41;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span><br />
&nbsp; &nbsp; RegisterRoutes<span style="color: #008000;">&#40;</span>RouteTable<span style="color: #008000;">.</span><span style="color: #0000FF;">Routes</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span><br />
<span style="color: #008000;">&#125;</span></div></td></tr></tbody></table></div>
<p>All works fine.. until you click [ Log On ]. Then you get the error message:</p>
<blockquote><p>StructureMap Exception Code:  202<br />
No Default Instance defined for PluginFamily IFormsAuthentication</p></blockquote>
<p>It&#8217;s because the AccountController has two constructors, one default with no arguments, and one with two arguments: IFormsAuthentication and IMembershipService:</p>
<div class="codecolorer-container csharp blackboard" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br />13<br />14<br />15<br />16<br />17<br />18<br /></div></td><td><div class="csharp codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #008080; font-style: italic;">// Comments below is from the MVC Template!</span><br />
<br />
<span style="color: #008080; font-style: italic;">// This constructor is used by the MVC framework to instantiate the controller using</span><br />
<span style="color: #008080; font-style: italic;">// the default forms authentication and membership providers.</span><br />
<br />
<span style="color: #0600FF; font-weight: bold;">public</span> AccountController<span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><br />
&nbsp; &nbsp; <span style="color: #008000;">:</span> <span style="color: #0600FF; font-weight: bold;">this</span><span style="color: #008000;">&#40;</span><span style="color: #0600FF; font-weight: bold;">null</span>, <span style="color: #0600FF; font-weight: bold;">null</span><span style="color: #008000;">&#41;</span><br />
<span style="color: #008000;">&#123;</span><br />
<span style="color: #008000;">&#125;</span><br />
<br />
<span style="color: #008080; font-style: italic;">// This constructor is not used by the MVC framework but is instead provided for ease</span><br />
<span style="color: #008080; font-style: italic;">// of unit testing this type. See the comments at the end of this file for more</span><br />
<span style="color: #008080; font-style: italic;">// information.</span><br />
<span style="color: #0600FF; font-weight: bold;">public</span> AccountController<span style="color: #008000;">&#40;</span>IFormsAuthentication formsAuth, IMembershipService service<span style="color: #008000;">&#41;</span><br />
<span style="color: #008000;">&#123;</span><br />
&nbsp; &nbsp; FormsAuth <span style="color: #008000;">=</span> formsAuth <span style="color: #008000;">??</span> <a href="http://www.google.com/search?q=new+msdn.microsoft.com"><span style="color: #008000;">new</span></a> FormsAuthenticationService<span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span><br />
&nbsp; &nbsp; MembershipService <span style="color: #008000;">=</span> service <span style="color: #008000;">??</span> <a href="http://www.google.com/search?q=new+msdn.microsoft.com"><span style="color: #008000;">new</span></a> AccountMembershipService<span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span><br />
<span style="color: #008000;">&#125;</span></div></td></tr></tbody></table></div>
<p>By default, StructureMap would choose the &#8220;greediest&#8221; constructor, and therefore it chooses the constructor with two arguments. The problem is that we haven&#8217;t told StructureMap what IFormsAuthentication and IMembershipService we would like to use.<br />
One bad thing to solve our problem would be to tell StructureMap to use the default empty constructor:</p>
<div class="codecolorer-container csharp blackboard" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br /></div></td><td><div class="csharp codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #008080; font-style: italic;">// Bad design..</span><br />
var container <span style="color: #008000;">=</span> <a href="http://www.google.com/search?q=new+msdn.microsoft.com"><span style="color: #008000;">new</span></a> Container<span style="color: #008000;">&#40;</span>x<span style="color: #008000;">=&gt;</span> x<span style="color: #008000;">.</span><span style="color: #0000FF;">SelectConstructor</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">=&gt;</span><a href="http://www.google.com/search?q=new+msdn.microsoft.com"><span style="color: #008000;">new</span></a> AccountController<span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span></div></td></tr></tbody></table></div>
<p>AccountController will then create the default membership provider (the FormsAuthenticationService and AccountMembershipService is placed in AccountController.cs)  :</p>
<div class="codecolorer-container csharp blackboard" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br /></div></td><td><div class="csharp codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">FormsAuth <span style="color: #008000;">=</span> formsAuth <span style="color: #008000;">??</span> <a href="http://www.google.com/search?q=new+msdn.microsoft.com"><span style="color: #008000;">new</span></a> FormsAuthenticationService<span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span><br />
MembershipService <span style="color: #008000;">=</span> service <span style="color: #008000;">??</span> <a href="http://www.google.com/search?q=new+msdn.microsoft.com"><span style="color: #008000;">new</span></a> AccountMembershipService<span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span></div></td></tr></tbody></table></div>
<p>and totally defeat the purpose of lose wiring and a DI-framework. Our purpose must be to let the IFormsAuthentication and IMembershipService be pluggable.<br />
We must tell StructureMap to use AccountMembershipService for IMembershipService and FormsAuthenticationService for IFormsAuthentication. However, AccountMembershipService has two constructors:</p>
<div class="codecolorer-container csharp blackboard" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br /></div></td><td><div class="csharp codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #0600FF; font-weight: bold;">public</span> AccountMembershipService<span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><br />
&nbsp; &nbsp; <span style="color: #008000;">:</span> <span style="color: #0600FF; font-weight: bold;">this</span><span style="color: #008000;">&#40;</span><span style="color: #0600FF; font-weight: bold;">null</span><span style="color: #008000;">&#41;</span><br />
<span style="color: #008000;">&#123;</span><br />
<span style="color: #008000;">&#125;</span><br />
<br />
<span style="color: #0600FF; font-weight: bold;">public</span> AccountMembershipService<span style="color: #008000;">&#40;</span>MembershipProvider provider<span style="color: #008000;">&#41;</span><br />
<span style="color: #008000;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #0600FF; font-weight: bold;">this</span><span style="color: #008000;">.</span><span style="color: #0000FF;">provider</span> <span style="color: #008000;">=</span> provider <span style="color: #008000;">??</span> Membership<span style="color: #008000;">.</span><span style="color: #0000FF;">Provider</span><span style="color: #008000;">;</span><br />
<span style="color: #008000;">&#125;</span></div></td></tr></tbody></table></div>
<p>so we want to plug in a MembershipProvider also as Membership.Provider for the time being, this is the default Membership provider.<br />
The configuration will then be:</p>
<div class="codecolorer-container csharp blackboard" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br />13<br />14<br />15<br /></div></td><td><div class="csharp codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #0600FF; font-weight: bold;">protected</span> <span style="color: #6666cc; font-weight: bold;">void</span> Application_Start<span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><br />
<span style="color: #008000;">&#123;</span><br />
&nbsp; &nbsp; var container <span style="color: #008000;">=</span> <a href="http://www.google.com/search?q=new+msdn.microsoft.com"><span style="color: #008000;">new</span></a> Container<span style="color: #008000;">&#40;</span>config<span style="color: #008000;">=&gt;</span><br />
&nbsp; &nbsp; <span style="color: #008000;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; config<span style="color: #008000;">.</span><span style="color: #0000FF;">ForRequestedType</span><span style="color: #008000;">&lt;</span>MembershipProvider<span style="color: #008000;">&gt;</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #008000;">.</span><span style="color: #0000FF;">TheDefault</span><span style="color: #008000;">.</span><span style="color: #0000FF;">IsThis</span><span style="color: #008000;">&#40;</span>Membership<span style="color: #008000;">.</span><span style="color: #0000FF;">Provider</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; config<span style="color: #008000;">.</span><span style="color: #0000FF;">ForRequestedType</span><span style="color: #008000;">&lt;</span>IFormsAuthentication<span style="color: #008000;">&gt;</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #008000;">.</span><span style="color: #0000FF;">TheDefaultIsConcreteType</span><span style="color: #008000;">&lt;</span>FormsAuthenticationService<span style="color: #008000;">&gt;</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; config<span style="color: #008000;">.</span><span style="color: #0000FF;">ForRequestedType</span><span style="color: #008000;">&lt;</span>IMembershipService<span style="color: #008000;">&gt;</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #008000;">.</span><span style="color: #0000FF;">TheDefaultIsConcreteType</span><span style="color: #008000;">&lt;</span>AccountMembershipService<span style="color: #008000;">&gt;</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span><br />
&nbsp; &nbsp; <span style="color: #008000;">&#125;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span><br />
&nbsp; &nbsp; ControllerBuilder<span style="color: #008000;">.</span><span style="color: #0000FF;">Current</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #008000;">.</span><span style="color: #0000FF;">SetControllerFactory</span><span style="color: #008000;">&#40;</span><a href="http://www.google.com/search?q=new+msdn.microsoft.com"><span style="color: #008000;">new</span></a> StructureMapControllerFactory<span style="color: #008000;">&#40;</span>container<span style="color: #008000;">&#41;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span><br />
&nbsp; &nbsp; RegisterRoutes<span style="color: #008000;">&#40;</span>RouteTable<span style="color: #008000;">.</span><span style="color: #0000FF;">Routes</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span><br />
<span style="color: #008000;">&#125;</span></div></td></tr></tbody></table></div>
<p>And when it&#8217;s time, we can simply change our authentication mechanism.</p>
]]></content:encoded>
			<wfw:commentRss>http://learningbyfailing.com/2010/02/structuremap-exception-no-default-instance-defined-for-pluginfamily-iformsauthentication/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		<feedburner:origLink>http://learningbyfailing.com/2010/02/structuremap-exception-no-default-instance-defined-for-pluginfamily-iformsauthentication/</feedburner:origLink></item>
		<item>
		<title>Using fiddler with Azure devstorage</title>
		<link>http://feedproxy.google.com/~r/LearningByFailing/~3/br4e59qvAA0/</link>
		<comments>http://learningbyfailing.com/2009/12/using-fiddler-with-azure-devstorage/#comments</comments>
		<pubDate>Tue, 15 Dec 2009 13:06:50 +0000</pubDate>
		<dc:creator>Lasse</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[azure]]></category>

		<guid isPermaLink="false">http://learningbyfailing.com/?p=153</guid>
		<description><![CDATA[If you need to inspect your developmentstorage traffic with Fiddler, then add DevelopmentStorageProxyUri=http://ipv4.fiddler to your connection string: 123456&#60;configuration&#62; &#160; &#60;appSettings&#62; &#160; &#160; &#60;add key=&#34;AzureConnectionString&#34; &#160; &#160; &#160; value=&#34;UseDevelopmentStorage=true;DevelopmentStorageProxyUri=http://ipv4.fiddler&#34; /&#62; &#160; &#60;/appSettings&#62; &#60;/configuration&#62;]]></description>
			<content:encoded><![CDATA[<p>If you need to inspect your developmentstorage traffic with <a href="http://www.fiddlertool.com/" target="_blank">Fiddler</a>, then add DevelopmentStorageProxyUri=http://ipv4.fiddler to your connection string:</p>
<div class="codecolorer-container xml blackboard" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br /></div></td><td><div class="xml codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;configuration<span style="color: #000000; font-weight: bold;">&gt;</span></span></span><br />
&nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;appSettings<span style="color: #000000; font-weight: bold;">&gt;</span></span></span><br />
&nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;add</span> <span style="color: #000066;">key</span>=<span style="color: #ff0000;">&quot;AzureConnectionString&quot;</span> </span><br />
<span style="color: #009900;"> &nbsp; &nbsp; &nbsp; <span style="color: #000066;">value</span>=<span style="color: #ff0000;">&quot;UseDevelopmentStorage=true;DevelopmentStorageProxyUri=http://ipv4.fiddler&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span><br />
&nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/appSettings<span style="color: #000000; font-weight: bold;">&gt;</span></span></span><br />
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/configuration<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></div></td></tr></tbody></table></div>
]]></content:encoded>
			<wfw:commentRss>http://learningbyfailing.com/2009/12/using-fiddler-with-azure-devstorage/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://learningbyfailing.com/2009/12/using-fiddler-with-azure-devstorage/</feedburner:origLink></item>
		<item>
		<title>Using the CloudStorageAccount.FromConfigurationSetting</title>
		<link>http://feedproxy.google.com/~r/LearningByFailing/~3/R47pR7y-b0c/</link>
		<comments>http://learningbyfailing.com/2009/12/using-the-cloudstorageaccount-fromconfigurationsetting/#comments</comments>
		<pubDate>Tue, 15 Dec 2009 12:57:54 +0000</pubDate>
		<dc:creator>Lasse</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[azure]]></category>

		<guid isPermaLink="false">http://learningbyfailing.com/?p=147</guid>
		<description><![CDATA[If you get the error: Unhandled Exception: System.InvalidOperationException: ConfigurationSettingSubscriber needs to be set before FromConfigurationSetting can be used at Microsoft.WindowsAzure.CloudStorageAccount.FromConfigurationSetting(String settingName) you need to add this: 12CloudStorageAccount.SetConfigurationSettingPublisher&#40;&#40;configName, configSetter&#41; =&#62; &#160;configSetter&#40;ConfigurationManager.AppSettings&#91;configName&#93;&#41;&#41;; then you can do: 1var azureAccount = CloudStorageAccount.FromConfigurationSetting&#40;&#34;AzureConnectionString&#34;&#41;; if you have this in your .config-file: 12345&#60;configuration&#62; &#160; &#60;appSettings&#62; &#160; &#160; &#60;add key=&#34;AzureConnectionString&#34; value=&#34;UseDevelopmentStorage=true&#34; /&#62; &#160; [...]]]></description>
			<content:encoded><![CDATA[<p>If you get the error:</p>
<p>Unhandled Exception: System.InvalidOperationException: ConfigurationSettingSubscriber needs to be set before FromConfigurationSetting can be used<br />
at Microsoft.WindowsAzure.CloudStorageAccount.FromConfigurationSetting(String settingName)</p>
<p>you need to add this:</p>
<div class="codecolorer-container csharp blackboard" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br /></div></td><td><div class="csharp codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">CloudStorageAccount<span style="color: #008000;">.</span><span style="color: #0000FF;">SetConfigurationSettingPublisher</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#40;</span>configName, configSetter<span style="color: #008000;">&#41;</span> <span style="color: #008000;">=&gt;</span><br />
&nbsp;configSetter<span style="color: #008000;">&#40;</span>ConfigurationManager<span style="color: #008000;">.</span><span style="color: #0000FF;">AppSettings</span><span style="color: #008000;">&#91;</span>configName<span style="color: #008000;">&#93;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span></div></td></tr></tbody></table></div>
<p>then you can do:</p>
<div class="codecolorer-container csharp blackboard" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="csharp codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">var azureAccount <span style="color: #008000;">=</span> CloudStorageAccount<span style="color: #008000;">.</span><span style="color: #0000FF;">FromConfigurationSetting</span><span style="color: #008000;">&#40;</span><span style="color: #666666;">&quot;AzureConnectionString&quot;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span></div></td></tr></tbody></table></div>
<p>if you have this in your .config-file:</p>
<div class="codecolorer-container xml blackboard" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br /></div></td><td><div class="xml codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;configuration<span style="color: #000000; font-weight: bold;">&gt;</span></span></span><br />
&nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;appSettings<span style="color: #000000; font-weight: bold;">&gt;</span></span></span><br />
&nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;add</span> <span style="color: #000066;">key</span>=<span style="color: #ff0000;">&quot;AzureConnectionString&quot;</span> <span style="color: #000066;">value</span>=<span style="color: #ff0000;">&quot;UseDevelopmentStorage=true&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span><br />
&nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/appSettings<span style="color: #000000; font-weight: bold;">&gt;</span></span></span><br />
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/configuration<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></div></td></tr></tbody></table></div>
]]></content:encoded>
			<wfw:commentRss>http://learningbyfailing.com/2009/12/using-the-cloudstorageaccount-fromconfigurationsetting/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		<feedburner:origLink>http://learningbyfailing.com/2009/12/using-the-cloudstorageaccount-fromconfigurationsetting/</feedburner:origLink></item>
		<item>
		<title>StorageClientException: One of the request inputs is out of range.</title>
		<link>http://feedproxy.google.com/~r/LearningByFailing/~3/b0CfaFwY7uo/</link>
		<comments>http://learningbyfailing.com/2009/12/storageclientexception-one-of-the-request-inputs-is-out-of-range/#comments</comments>
		<pubDate>Wed, 02 Dec 2009 09:00:58 +0000</pubDate>
		<dc:creator>Lasse</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[azure]]></category>

		<guid isPermaLink="false">http://learningbyfailing.com/?p=141</guid>
		<description><![CDATA[If you get: Microsoft.WindowsAzure.StorageClient.StorageClientException: One of the request inputs is out of range. and inner exception is: System.Net.WebException: The remote server returned an error: (400) Bad Request. you probably have to check your table/queue/blob name (I got this when naming a queue with some uppercase characters). You can read about the limitations in the article [...]]]></description>
			<content:encoded><![CDATA[<p>If you get:<br />
<strong>Microsoft.WindowsAzure.StorageClient.StorageClientException: One of the request inputs is out of range.</strong><br />
and inner exception is:<br />
<strong>System.Net.WebException: The remote server returned an error: (400) Bad Request.</strong><br />
you probably have to check your table/queue/blob name (I got this when naming a queue with some uppercase characters).</p>
<p>You can read about the limitations in the article &#8220;<a href="http://weblogs.asp.net/vblasberg/archive/2009/02/17/azure-details-and-limitations-blobs-tables-and-queues.aspx">Azure Details and Limitations &#8211; Blobs, Tables, and Queues</a>&#8220;</p>
]]></content:encoded>
			<wfw:commentRss>http://learningbyfailing.com/2009/12/storageclientexception-one-of-the-request-inputs-is-out-of-range/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		<feedburner:origLink>http://learningbyfailing.com/2009/12/storageclientexception-one-of-the-request-inputs-is-out-of-range/</feedburner:origLink></item>
		<item>
		<title>System.Xml.Schema.XmlSchemaException: The targetNamespace parameter ” should be the same value as the targetNamespace</title>
		<link>http://feedproxy.google.com/~r/LearningByFailing/~3/vMfLAsaRxI4/</link>
		<comments>http://learningbyfailing.com/2009/08/systemxmlschemaxmlschemaexception-the-targetnamespace-parameter-should-be-the-same-value-as-the-targetnamespace/#comments</comments>
		<pubDate>Tue, 11 Aug 2009 07:29:39 +0000</pubDate>
		<dc:creator>Lasse</dc:creator>
				<category><![CDATA[Code]]></category>

		<guid isPermaLink="false">http://learningbyfailing.com/?p=130</guid>
		<description><![CDATA[Got this error after trying to validate a XML document against a XSD schema. XmlSpy didn&#8217;t complain, but the XmlSchemaSet Add-method did. Don&#8217;t forget to send in the value of targetNamespace in the xsd as the first parameter (the msdn example here doesn&#8217;t use it, hence my error). First, failing method, schemas.Add (the Assert.Fail is [...]]]></description>
			<content:encoded><![CDATA[<p>Got this error after trying to <a href="http://msdn.microsoft.com/en-us/library/bb340331.aspx">validate</a> a XML document against a XSD schema. <a href="http://www.altova.com/xmlspy.html">XmlSpy</a> didn&#8217;t complain, but the <a href="http://msdn.microsoft.com/en-us/library/system.xml.schema.xmlschemaset.aspx">XmlSchemaSet</a> Add-method did.<br />
Don&#8217;t forget to send in the value of targetNamespace in the xsd as the first parameter (the msdn example <a href="http://msdn.microsoft.com/en-us/library/bb340331.aspx">here</a> doesn&#8217;t use it, hence my error).<br />
First, failing method, schemas.Add (the Assert.Fail is NUnit, this is test code):</p>
<div class="codecolorer-container csharp blackboard" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br /></div></td><td><div class="csharp codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #0600FF; font-weight: bold;">static</span> <span style="color: #6666cc; font-weight: bold;">void</span> validate<span style="color: #008000;">&#40;</span>XDocument xDocument<span style="color: #008000;">&#41;</span><br />
<span style="color: #008000;">&#123;</span><br />
&nbsp; var schemas <span style="color: #008000;">=</span> <a href="http://www.google.com/search?q=new+msdn.microsoft.com"><span style="color: #008000;">new</span></a> XmlSchemaSet<span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span><br />
&nbsp; schemas<span style="color: #008000;">.</span><span style="color: #0000FF;">Add</span><span style="color: #008000;">&#40;</span><span style="color: #666666;">&quot;&quot;</span>, XmlReader<span style="color: #008000;">.</span><span style="color: #0000FF;">Create</span><span style="color: #008000;">&#40;</span>Settings<span style="color: #008000;">.</span><span style="color: #0000FF;">ImportSchemaFile</span><span style="color: #008000;">.</span><span style="color: #0000FF;">FullName</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span><br />
&nbsp; xDocument<span style="color: #008000;">.</span><span style="color: #0000FF;">Validate</span><span style="color: #008000;">&#40;</span>schemas,<span style="color: #008000;">&#40;</span>o,v<span style="color: #008000;">&#41;</span><span style="color: #008000;">=&gt;;</span> Assert<span style="color: #008000;">.</span><span style="color: #0000FF;">Fail</span><span style="color: #008000;">&#40;</span>v<span style="color: #008000;">.</span><span style="color: #0000FF;">Message</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span><br />
<span style="color: #008000;">&#125;</span></div></td></tr></tbody></table></div>
<p>Then when adding the targetNamespace from the xsd:</p>
<div class="codecolorer-container xml blackboard" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="xml codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;xs:schema</span> <span style="color: #000066;">xmlns</span>=<span style="color: #ff0000;">&quot;http://upptec.se&quot;</span> <span style="color: #000066;">xmlns:xs</span>=<span style="color: #ff0000;">&quot;http://www.w3.org/2001/XMLSchema&quot;</span> <span style="color: #000066;">targetNamespace</span>=<span style="color: #ff0000;">&quot;http://upptec.se&quot;</span> <span style="color: #000066;">elementFormDefault</span>=<span style="color: #ff0000;">&quot;qualified&quot;</span> <span style="color: #000066;">attributeFormDefault</span>=<span style="color: #ff0000;">&quot;unqualified&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span></div></td></tr></tbody></table></div>
<p>it worked nicely:</p>
<div class="codecolorer-container csharp blackboard" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br /></div></td><td><div class="csharp codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #0600FF; font-weight: bold;">static</span> <span style="color: #6666cc; font-weight: bold;">void</span> validate<span style="color: #008000;">&#40;</span>XDocument xDocument<span style="color: #008000;">&#41;</span><br />
<span style="color: #008000;">&#123;</span><br />
&nbsp; var schemas <span style="color: #008000;">=</span> <a href="http://www.google.com/search?q=new+msdn.microsoft.com"><span style="color: #008000;">new</span></a> XmlSchemaSet<span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span><br />
&nbsp; schemas<span style="color: #008000;">.</span><span style="color: #0000FF;">Add</span><span style="color: #008000;">&#40;</span><span style="color: #666666;">&quot;http://upptec.se&quot;</span>, XmlReader<span style="color: #008000;">.</span><span style="color: #0000FF;">Create</span><span style="color: #008000;">&#40;</span>Settings<span style="color: #008000;">.</span><span style="color: #0000FF;">ImportSchemaFile</span><span style="color: #008000;">.</span><span style="color: #0000FF;">FullName</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span><br />
&nbsp; xDocument<span style="color: #008000;">.</span><span style="color: #0000FF;">Validate</span><span style="color: #008000;">&#40;</span>schemas,<span style="color: #008000;">&#40;</span>o,v<span style="color: #008000;">&#41;</span><span style="color: #008000;">=&gt;</span> Assert<span style="color: #008000;">.</span><span style="color: #0000FF;">Fail</span><span style="color: #008000;">&#40;</span>v<span style="color: #008000;">.</span><span style="color: #0000FF;">Message</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span><br />
<span style="color: #008000;">&#125;</span></div></td></tr></tbody></table></div>
<p>But it smells.. so after refacoring and not using targetNamespace at all:</p>
<div class="codecolorer-container csharp blackboard" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br /></div></td><td><div class="csharp codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #0600FF; font-weight: bold;">static</span> <span style="color: #6666cc; font-weight: bold;">void</span> validate<span style="color: #008000;">&#40;</span>XDocument xDocument<span style="color: #008000;">&#41;</span><br />
<span style="color: #008000;">&#123;</span><br />
&nbsp; var validatingSchema <span style="color: #008000;">=</span> XmlSchema<span style="color: #008000;">.</span><span style="color: #0000FF;">Read</span><span style="color: #008000;">&#40;</span>XmlReader<span style="color: #008000;">.</span><span style="color: #0000FF;">Create</span><span style="color: #008000;">&#40;</span>Settings<span style="color: #008000;">.</span><span style="color: #0000FF;">ImportSchemaFile</span><span style="color: #008000;">.</span><span style="color: #0000FF;">FullName</span><span style="color: #008000;">&#41;</span>,<span style="color: #008000;">&#40;</span>o,v<span style="color: #008000;">&#41;</span><span style="color: #008000;">=&gt;</span>Assert<span style="color: #008000;">.</span><span style="color: #0000FF;">Fail</span><span style="color: #008000;">&#40;</span>v<span style="color: #008000;">.</span><span style="color: #0000FF;">Message</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span><br />
&nbsp; var schemas <span style="color: #008000;">=</span> <a href="http://www.google.com/search?q=new+msdn.microsoft.com"><span style="color: #008000;">new</span></a> XmlSchemaSet<span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span><br />
&nbsp; schemas<span style="color: #008000;">.</span><span style="color: #0000FF;">Add</span><span style="color: #008000;">&#40;</span>validatingSchema<span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span><br />
&nbsp; xDocument<span style="color: #008000;">.</span><span style="color: #0000FF;">Validate</span><span style="color: #008000;">&#40;</span>schemas,<span style="color: #008000;">&#40;</span>o,v<span style="color: #008000;">&#41;</span><span style="color: #008000;">=&gt;</span> Assert<span style="color: #008000;">.</span><span style="color: #0000FF;">Fail</span><span style="color: #008000;">&#40;</span>v<span style="color: #008000;">.</span><span style="color: #0000FF;">Message</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span><br />
<span style="color: #008000;">&#125;</span></div></td></tr></tbody></table></div>
]]></content:encoded>
			<wfw:commentRss>http://learningbyfailing.com/2009/08/systemxmlschemaxmlschemaexception-the-targetnamespace-parameter-should-be-the-same-value-as-the-targetnamespace/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://learningbyfailing.com/2009/08/systemxmlschemaxmlschemaexception-the-targetnamespace-parameter-should-be-the-same-value-as-the-targetnamespace/</feedburner:origLink></item>
		<item>
		<title>Building MassTransit with NAnt</title>
		<link>http://feedproxy.google.com/~r/LearningByFailing/~3/qUfoHQs2T3k/</link>
		<comments>http://learningbyfailing.com/2009/05/building-masstransit-with-nant/#comments</comments>
		<pubDate>Fri, 29 May 2009 14:36:58 +0000</pubDate>
		<dc:creator>Lasse</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[MassTransit]]></category>

		<guid isPermaLink="false">http://learningbyfailing.com/?p=121</guid>
		<description><![CDATA[I&#8217;ve started playing with MassTransit and began with downloading the source code (using AnkhSvn). It didn&#8217;t compile.. there was a SolutionVersion.cs file missing. Instead of executing the long &#8220;saga&#8221; below, I quote the comment from Chris Patterson: Or, you could just run build.bat in the main folder and be happy as Larry! And be done [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve started playing with <a href="http://code.google.com/p/masstransit">MassTransit</a> and began with downloading the source code (using <a href="http://ankhsvn.open.collab.net/">AnkhSvn</a>).<br />
It didn&#8217;t compile.. there was a SolutionVersion.cs file missing.<br />
Instead of executing the long &#8220;saga&#8221; below, I quote the comment from Chris Patterson:</p>
<blockquote><p>Or, you could just run build.bat in the main folder and be happy as Larry!</p></blockquote>
<p>And be done with it&#8230; (the name &#8220;build.bat&#8221; should be an obviuos clue, how could I miss that).</p>
<p><a href="http://www.phrases.org.uk/meanings/as-happy-as-larry.html">About Larry -></a>.</p>
<p><del datetime="2009-06-01T07:03:22+00:00">Well enough, I did look closer at the MassTransit page, and yeah, use NAnt to build it and SolutionVersion.cs will be created. So, off downloading <a href="http://nant.sourceforge.net/">NAnt</a> binary. Got suspicios of the old version, but it seems it&#8217;s ok.<br />
Executed NAnt inside the MassTransit/BuildScripts (no args required), but got:</del></p>
<div class="codecolorer-container dos blackboard" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="dos codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">Invalid element <span style="color: #33cc33;">&lt;</span>msbuild<span style="color: #33cc33;">&gt;</span>. Unknown task or datatype.</div></td></tr></tbody></table></div>
<p><del datetime="2009-06-01T07:03:22+00:00">Wot? That doesn&#8217;t add up. After a quick google, I learned that you have to download the <a href="http://nantcontrib.sourceforge.net/">NAntContrib</a> binary and but these binaries in the NAnt bin-directory.<br />
All well and fine! More MassTransit is coming (I&#8217;m struggling to understand MassTransit atm).<br />
</del></p>
<p><del datetime="2009-06-01T07:03:22+00:00">In short:</del></p>
<ol>
	<del datetime="2009-06-01T07:03:22+00:00">
<li>Download <a href="http://nant.sourceforge.net/">NAnt</a> binary and extract somewhere.</del></li>
<li><del datetime="2009-06-01T07:03:22+00:00">Download <a href="http://nantcontrib.sourceforge.net/">NAntContrib</a> binary and extract the contents of the bin-directory to NAnts bin-directory.</del></li>
<li><del datetime="2009-06-01T07:03:22+00:00">Open a prompt, cd to MassTransit/BuildScripts and execute &#8220;..\..\NAnt\bin\nant&#8221; (or whereever you have the NAnt bins). No need for paths or arguments.</del>
</li>
<li><del datetime="2009-06-01T07:03:22+00:00">MassTransit will now build from inside Visual Studio 2008</del></li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://learningbyfailing.com/2009/05/building-masstransit-with-nant/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		<feedburner:origLink>http://learningbyfailing.com/2009/05/building-masstransit-with-nant/</feedburner:origLink></item>
		<item>
		<title>No connection could be made because the target machine actively refused it</title>
		<link>http://feedproxy.google.com/~r/LearningByFailing/~3/zQwtt4Qxm4A/</link>
		<comments>http://learningbyfailing.com/2009/02/no-connection-could-be-made-because-the-target-machine-actively-refused-it/#comments</comments>
		<pubDate>Tue, 24 Feb 2009 22:28:34 +0000</pubDate>
		<dc:creator>Lasse</dc:creator>
				<category><![CDATA[Tools]]></category>

		<guid isPermaLink="false">http://learningbyfailing.com/?p=117</guid>
		<description><![CDATA[[Fiddler] Connection to localhost. failed. Exception Text: No connection could be made because the target machine actively refused it Ok, I must remember it this time, I&#8217;ve been down this road before! If you get this TURN IPv6 OFF in Fiddler (Tools &#8211; Fiddler options inside Fiddler2). Works for me. But if you still have [...]]]></description>
			<content:encoded><![CDATA[<blockquote><p>[Fiddler] Connection to localhost. failed.<br />
Exception Text: No connection could be made because the target machine actively refused it</p></blockquote>
<p>Ok, I must remember it this time, I&#8217;ve been down this road before!<br />
If you get this TURN IPv6 OFF in <a href="http://www.fiddler2.com/">Fiddler</a> (Tools &#8211; Fiddler options inside Fiddler2).<br />
Works for me.<br />
But if you still have problems, do like Marcelo Ampuero comments <a href="http://weblogs.asp.net/mikebosch/archive/2007/10/09/using-fiddler-with-asp-net-s-default-local-server.aspx">in this post</a>.</p>
<blockquote><p>2.- Add a period (localhost./mywebapp)<br />
3.- On vista disable ipv6 localhost on C:\Windows\System32\drivers\etc\hosts, changing<br />
::1             localhost  to<br />
#::1             localhost</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://learningbyfailing.com/2009/02/no-connection-could-be-made-because-the-target-machine-actively-refused-it/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://learningbyfailing.com/2009/02/no-connection-could-be-made-because-the-target-machine-actively-refused-it/</feedburner:origLink></item>
	</channel>
</rss>

