<feed xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns="http://www.w3.org/2005/Atom" xml:lang="en-GB">
    <title>Mike Hanson</title>
    <link rel="self" type="application/atom+xml" href="http://www.mikehanson.com/Atom.aspx" />
    <subtitle type="html">A drop of knowledge can start a ripple of understanding</subtitle>
    <id>http://www.mikehanson.com/Default.aspx</id>
    <author>
        <name>Mike Hanson</name>
        <uri>http://www.mikehanson.com/Default.aspx</uri>
    </author>
    <generator uri="http://subtextproject.com" version="Subtext Version 2.1.0.5">Subtext</generator>
    <updated>2009-02-01T13:38:24Z</updated>
    <entry>
        <title>Clean Namespace AddIn</title>
        <link rel="alternate" type="text/html" href="http://www.mikehanson.com/archive/2009/02/01/clean-namespace-addin.aspx" />
        <id>http://www.mikehanson.com/archive/2009/02/01/clean-namespace-addin.aspx</id>
        <published>2009-02-01T13:23:22Z</published>
        <updated>2009-02-01T13:38:24Z</updated>
        <content type="html">&lt;p&gt;One of my pet hates about Visual Studio is that it assumes that you organise folders in projects according to namespaces and adds folder names to the namespace declaration for classes.  Worse still there is no way to turn this behaviour off.&lt;/p&gt;
&lt;p&gt;Usually I get by this by adding my classes to the root of the projec then dragging them to the relevant folder, and I strongly suggest that developers working for me do the same.  This week I came across a developer who complained about this and come up with reasons based around the lack of tool help if they forget to do this, so I decided to write an addin that automagically sets the namespace declaration of new C# classes added to match the Default Namespace setting in Project Properties.  I have called it &lt;strong&gt;Clean Namespace&lt;/strong&gt; and published it on &lt;a target="_blank" href="http://www.visualstudiogallery.com/"&gt;Visual Studio Gallery&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;No commands, menus or UI it just detects when a new C# class file is added to your project and changes the namespace declaration.  You can turn it off simply by disabling the addin via &lt;strong&gt;Tools, Add-in Manager...&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.mikehanson.com/Downloads/CleanNamespace.vsi"&gt;Download&lt;/a&gt; Clean Namespace Visual Studio Installer&lt;/p&gt;&lt;img src="http://www.mikehanson.com/aggbug/19.aspx" width="1" height="1" /&gt;</content>
        <wfw:comment>http://www.mikehanson.com/comments/19.aspx</wfw:comment>
        <slash:comments>0</slash:comments>
        <wfw:commentRss>http://www.mikehanson.com/comments/commentRss/19.aspx</wfw:commentRss>
        <trackback:ping>http://www.mikehanson.com/services/trackbacks/19.aspx</trackback:ping>
    </entry>
    <entry>
        <title>NavFx Updated for SL 2.0 Release</title>
        <link rel="alternate" type="text/html" href="http://www.mikehanson.com/archive/2008/10/26/navfx-updated-for-sl-2.0-release.aspx" />
        <id>http://www.mikehanson.com/archive/2008/10/26/navfx-updated-for-sl-2.0-release.aspx</id>
        <published>2008-10-26T08:28:00Z</published>
        <updated>2008-10-26T08:28:00Z</updated>
        <content type="html">&lt;p&gt;NavFx has been updated to work with the release version of Silverlight 2.0 and new downloads for binaries and templates are available at &lt;a href="http://www.codeplex.com/NavFx"&gt;http://www.codeplex.com/NavFx&lt;/a&gt;&lt;/p&gt;&lt;img src="http://www.mikehanson.com/aggbug/18.aspx" width="1" height="1" /&gt;</content>
        <wfw:comment>http://www.mikehanson.com/comments/18.aspx</wfw:comment>
        <slash:comments>2</slash:comments>
        <wfw:commentRss>http://www.mikehanson.com/comments/commentRss/18.aspx</wfw:commentRss>
        <trackback:ping>http://www.mikehanson.com/services/trackbacks/18.aspx</trackback:ping>
    </entry>
    <entry>
        <title>NavFx Part 6 - Page Transition</title>
        <link rel="alternate" type="text/html" href="http://www.mikehanson.com/archive/2008/08/23/navfx-part-6-page-transition-again.aspx" />
        <id>http://www.mikehanson.com/archive/2008/08/23/navfx-part-6-page-transition-again.aspx</id>
        <published>2008-08-23T12:35:27Z</published>
        <updated>2008-10-26T08:25:56Z</updated>
        <content type="html">The next article on NavFx is finally finished and can be read hear &lt;font face="Arial"&gt;&lt;a href="http://www.mikehanson.com/articles/navfx-part-6-page-transition.aspx"&gt;NavFx Part 6 - Page Transition&lt;/a&gt;&lt;/font&gt;&lt;img src="http://www.mikehanson.com/aggbug/17.aspx" width="1" height="1" /&gt;</content>
        <wfw:comment>http://www.mikehanson.com/comments/17.aspx</wfw:comment>
        <slash:comments>0</slash:comments>
        <wfw:commentRss>http://www.mikehanson.com/comments/commentRss/17.aspx</wfw:commentRss>
        <trackback:ping>http://www.mikehanson.com/services/trackbacks/17.aspx</trackback:ping>
    </entry>
    <entry>
        <title>NavFx Part 5 - The Many Faces of GoToPage</title>
        <link rel="alternate" type="text/html" href="http://www.mikehanson.com/archive/2008/08/21/navfx-part-5-the-many-faces-of-gotopage-again.aspx" />
        <id>http://www.mikehanson.com/archive/2008/08/21/navfx-part-5-the-many-faces-of-gotopage-again.aspx</id>
        <published>2008-08-21T18:37:21Z</published>
        <updated>2008-08-21T18:37:21Z</updated>
        <content type="html">&lt;p&gt;The next article on NavFx is finally finished and can be read hear &lt;font face="Arial"&gt;&lt;a href="http://www.mikehanson.com/articles/navfx-part-5-the-many-faces-of-gotopage.aspx"&gt;NavFx Part 5 - The Many Faces of GoToPage&lt;/a&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;&lt;img src="http://www.mikehanson.com/aggbug/15.aspx" width="1" height="1" /&gt;</content>
        <wfw:comment>http://www.mikehanson.com/comments/15.aspx</wfw:comment>
        <slash:comments>0</slash:comments>
        <wfw:commentRss>http://www.mikehanson.com/comments/commentRss/15.aspx</wfw:commentRss>
        <trackback:ping>http://www.mikehanson.com/services/trackbacks/15.aspx</trackback:ping>
    </entry>
    <entry>
        <title>NavFx Part 4 - Application Structure</title>
        <link rel="alternate" type="text/html" href="http://www.mikehanson.com/archive/2008/07/20/navfx-part-4-application-structure-again.aspx" />
        <id>http://www.mikehanson.com/archive/2008/07/20/navfx-part-4-application-structure-again.aspx</id>
        <published>2008-07-20T12:28:24Z</published>
        <updated>2008-08-21T18:34:09Z</updated>
        <content type="html">The next article on NavFx is now available and can be read here &lt;a href="http://www.mikehanson.com/articles/navfx-part-4-application-structure.aspx"&gt;NavFx Part 4 - Application Structure&lt;/a&gt;&lt;img src="http://www.mikehanson.com/aggbug/13.aspx" width="1" height="1" /&gt;</content>
        <wfw:comment>http://www.mikehanson.com/comments/13.aspx</wfw:comment>
        <slash:comments>0</slash:comments>
        <wfw:commentRss>http://www.mikehanson.com/comments/commentRss/13.aspx</wfw:commentRss>
        <trackback:ping>http://www.mikehanson.com/services/trackbacks/13.aspx</trackback:ping>
    </entry>
    <entry>
        <title>NavFx Part 3 - At The Interface</title>
        <link rel="alternate" type="text/html" href="http://www.mikehanson.com/archive/2008/07/02/navfx-part-3---at-the-interface-again.aspx" />
        <id>http://www.mikehanson.com/archive/2008/07/02/navfx-part-3---at-the-interface-again.aspx</id>
        <published>2008-07-02T21:54:00Z</published>
        <updated>2008-07-02T21:54:00Z</updated>
        <content type="html">&lt;p&gt;The next article on NavFx is now available and can be read here &lt;font face="Arial"&gt;&lt;a href="http://www.mikehanson.com/articles/navfx-part-3---at-the-interface.aspx"&gt;NavFx Part 3 - At the Interface&lt;/a&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;&lt;img src="http://www.mikehanson.com/aggbug/11.aspx" width="1" height="1" /&gt;</content>
        <wfw:comment>http://www.mikehanson.com/comments/11.aspx</wfw:comment>
        <slash:comments>0</slash:comments>
        <wfw:commentRss>http://www.mikehanson.com/comments/commentRss/11.aspx</wfw:commentRss>
        <trackback:ping>http://www.mikehanson.com/services/trackbacks/11.aspx</trackback:ping>
    </entry>
    <entry>
        <title>NavFx Part 2 - Setting Up</title>
        <link rel="alternate" type="text/html" href="http://www.mikehanson.com/archive/2008/07/01/navfx-part-2---setting-up-again.aspx" />
        <id>http://www.mikehanson.com/archive/2008/07/01/navfx-part-2---setting-up-again.aspx</id>
        <published>2008-07-01T09:01:04Z</published>
        <updated>2008-07-01T09:01:04Z</updated>
        <content type="html">&lt;p&gt;The next article on NavFX is now available and can be read here &lt;font face="Arial"&gt;&lt;a href="http://www.mikehanson.com/articles/navfx-part-2---setting-up.aspx"&gt;NavFx Part 2 - Setting Up&lt;/a&gt;&lt;/font&gt;&lt;/p&gt;&lt;img src="http://www.mikehanson.com/aggbug/8.aspx" width="1" height="1" /&gt;</content>
        <wfw:comment>http://www.mikehanson.com/comments/8.aspx</wfw:comment>
        <slash:comments>0</slash:comments>
        <wfw:commentRss>http://www.mikehanson.com/comments/commentRss/8.aspx</wfw:commentRss>
        <trackback:ping>http://www.mikehanson.com/services/trackbacks/8.aspx</trackback:ping>
    </entry>
    <entry>
        <title>Silverlight Cross Domain WCF calls with VS WebDev.WebServer.exe</title>
        <link rel="alternate" type="text/html" href="http://www.mikehanson.com/archive/2008/06/27/silverlight-cross-domain-wcf-calls-with-vs-webdev.webserver.exe.aspx" />
        <id>http://www.mikehanson.com/archive/2008/06/27/silverlight-cross-domain-wcf-calls-with-vs-webdev.webserver.exe.aspx</id>
        <published>2008-06-27T08:03:24Z</published>
        <updated>2008-06-27T08:10:15Z</updated>
        <content type="html">&lt;p&gt;This one had me stuck for hours earlier this week, and judging by the number of posts on forums plenty of other people are suffering the same, so I hope this little titbit saves someone the frustration I suffered.&lt;/p&gt;
&lt;p&gt;I am using Visual Studio 2008 to create a Silverlight 2.0 (beta 2 at the moment) application. In my solution I have two web site projects, one for hosting the application, the other to host WCF services.  All I want is to hit F5 and have both sites run in debug mode and my SL app call my WCF services and work.  So I set my projects up as I believed they should be via the properties sheet for the project root as follows.&lt;/p&gt;
&lt;ul&gt;
    &lt;li&gt;Disabled dynamic ports so I know the fixed address of the WCF &lt;/li&gt;
    &lt;li&gt;Remove the virtual directory name to make both root applications &lt;/li&gt;
    &lt;li&gt;Add the following clientaccesspolicy.xml file to the root of the WCF site (wide open for now) &lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;font face="Arial"&gt;&amp;lt;?xml version="1.0" encoding="utf-8"?&amp;gt;&lt;br /&gt;
&amp;lt;access-policy&amp;gt;&lt;br /&gt;
 &amp;lt;cross-domain-access&amp;gt;&lt;br /&gt;
  &amp;lt;policy&amp;gt;&lt;br /&gt;
   &amp;lt;allow-from&amp;gt;&lt;br /&gt;
    &amp;lt;domain uri="*"/&amp;gt;&lt;br /&gt;
   &amp;lt;/allow-from&amp;gt;&lt;br /&gt;
   &amp;lt;grant-to&amp;gt;&lt;br /&gt;
    &amp;lt;resource path="/"&lt;br /&gt;
        include-subpaths="true"/&amp;gt;&lt;br /&gt;
   &amp;lt;/grant-to&amp;gt;&lt;br /&gt;
  &amp;lt;/policy&amp;gt;&lt;br /&gt;
 &amp;lt;/cross-domain-access&amp;gt;&lt;br /&gt;
&amp;lt;/access-policy&amp;gt;&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;So having written the code for my SL app to call my WCF service, references and all that stuff working fine I expect it all to work, I hit F5 in VS 2008 and both sites run, I can browse to the .svc file and get a working web page telling me how to create a client but in my SL application I get an error when I hit the button to call the service.&lt;/p&gt;
&lt;p&gt;WTF? double check, tripple check, hours of googling to make sure I have done it right, that my clientaccesspolicy.xml file is right still not working.  I read hundreds of blog/forum posts and articles and still no clue.  Many talked about problems with WebDev.WebServer.exe not having a root to place the policy file in but I had that covered you can change it in the properties sheet for the project.   Still no luck.&lt;/p&gt;
&lt;p&gt;Just when I was about to give up and wire my project up to IIS I re-read an article that I had spotted earlier about "Self Hosting" WCF services in a Windows Service and what was required in the policy file to support this.  Light bulb moment, WebDev.WebServer.exe may not be a Windows Service but it is effectively a "Self Hosting Process", a quick change to my clientaccesspolicy.xml file and bingo it works.  What did I change?  Look below at the attribute in bold on the &amp;lt;allow-from&amp;gt; element.&lt;/p&gt;
&lt;p&gt;&lt;font face="Arial"&gt;&amp;lt;?xml version="1.0" encoding="utf-8"?&amp;gt;&lt;br /&gt;
&amp;lt;access-policy&amp;gt;&lt;br /&gt;
 &amp;lt;cross-domain-access&amp;gt;&lt;br /&gt;
  &amp;lt;policy&amp;gt;&lt;br /&gt;
   &amp;lt;allow-from &lt;strong&gt;http-request-headers="*"&lt;/strong&gt;&amp;gt;&lt;br /&gt;
    &amp;lt;domain uri="*"/&amp;gt;&lt;br /&gt;
   &amp;lt;/allow-from&amp;gt;&lt;br /&gt;
   &amp;lt;grant-to&amp;gt;&lt;br /&gt;
    &amp;lt;resource path="/"&lt;br /&gt;
        include-subpaths="true"/&amp;gt;&lt;br /&gt;
   &amp;lt;/grant-to&amp;gt;&lt;br /&gt;
  &amp;lt;/policy&amp;gt;&lt;br /&gt;
 &amp;lt;/cross-domain-access&amp;gt;&lt;br /&gt;
&amp;lt;/access-policy&amp;gt;&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;So make this note in your little black book:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;When it comes to web services (WCF or ASMX) WebDev.WebServer.exe is a Self Hosting Process and any requirements for self hosting apply.&lt;/strong&gt;&lt;/p&gt;&lt;img src="http://www.mikehanson.com/aggbug/6.aspx" width="1" height="1" /&gt;</content>
        <wfw:comment>http://www.mikehanson.com/comments/6.aspx</wfw:comment>
        <slash:comments>3</slash:comments>
        <wfw:commentRss>http://www.mikehanson.com/comments/commentRss/6.aspx</wfw:commentRss>
        <trackback:ping>http://www.mikehanson.com/services/trackbacks/6.aspx</trackback:ping>
    </entry>
    <entry>
        <title>NavFx Part 1 - Quick Reference</title>
        <link rel="alternate" type="text/html" href="http://www.mikehanson.com/archive/2008/06/21/navfx-part-1-again.aspx" />
        <id>http://www.mikehanson.com/archive/2008/06/21/navfx-part-1-again.aspx</id>
        <published>2008-06-21T17:46:14Z</published>
        <updated>2008-07-01T09:02:38Z</updated>
        <content type="html">&lt;p&gt;I have posted my first article on the navigation framework NavFx I created for Silverlight.  Took a little longer than expected as I actually had to get some work done.  You can read it here &lt;font face="Arial"&gt;&lt;a href="http://www.mikehanson.com/articles/navfx-part-1.aspx"&gt;NavFx Part 1 - Quick Reference&lt;/a&gt;.&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;1st July 2008 - This article has been updated with some recent changes and enhancements made to NavFx.&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;&lt;img src="http://www.mikehanson.com/aggbug/5.aspx" width="1" height="1" /&gt;</content>
        <wfw:comment>http://www.mikehanson.com/comments/5.aspx</wfw:comment>
        <slash:comments>0</slash:comments>
        <wfw:commentRss>http://www.mikehanson.com/comments/commentRss/5.aspx</wfw:commentRss>
        <trackback:ping>http://www.mikehanson.com/services/trackbacks/5.aspx</trackback:ping>
    </entry>
    <entry>
        <title>Silverlight Navigation Framework</title>
        <link rel="alternate" type="text/html" href="http://www.mikehanson.com/archive/2008/06/05/silverlight-navigation-framework.aspx" />
        <id>http://www.mikehanson.com/archive/2008/06/05/silverlight-navigation-framework.aspx</id>
        <published>2008-06-05T08:18:41Z</published>
        <updated>2008-06-21T19:16:47Z</updated>
        <content type="html">&lt;p&gt;I am working on a navigation framework for Silverlight 2.* applications and will be posting a series of articles and the code over the coming days and weeks.&lt;/p&gt;
&lt;p&gt;The first article &lt;a href="http://www.mikehanson.com/articles/introducing-the-silverlight-navigation-framework.aspx"&gt;Introducing Silverlight Navigation Framework&lt;/a&gt;  is available now. &lt;/p&gt;&lt;img src="http://www.mikehanson.com/aggbug/3.aspx" width="1" height="1" /&gt;</content>
        <wfw:comment>http://www.mikehanson.com/comments/3.aspx</wfw:comment>
        <slash:comments>1</slash:comments>
        <wfw:commentRss>http://www.mikehanson.com/comments/commentRss/3.aspx</wfw:commentRss>
        <trackback:ping>http://www.mikehanson.com/services/trackbacks/3.aspx</trackback:ping>
    </entry>
</feed>