<rss version="2.0" 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:copyright="http://blogs.law.harvard.edu/tech/rss" xmlns:image="http://purl.org/rss/1.0/modules/image/">
    <channel>
        <title>Darren Fieldhouse</title>
        <link>http://geekswithblogs.net/DarrenFieldhouse/Default.aspx</link>
        <description> </description>
        <language>en-GB</language>
        <copyright>DarrenFieldhouse</copyright>
        <managingEditor>darren.fieldhouse@assign-it.co.uk</managingEditor>
        <generator>Subtext Version 0.0.0.0</generator>
        <image>
            <title>Darren Fieldhouse</title>
            <url>http://geekswithblogs.net/images/RSS2Image.gif</url>
            <link>http://geekswithblogs.net/DarrenFieldhouse/Default.aspx</link>
            <width>77</width>
            <height>60</height>
        </image>
        <item>
            <title>ObjectDisposedException in Entity Framework</title>
            <link>http://geekswithblogs.net/DarrenFieldhouse/archive/2011/12/12/objectdisposedexception-in-entity-framework.aspx</link>
            <description>&lt;p&gt;Originally posted on: &lt;a href='http://geekswithblogs.net/DarrenFieldhouse/archive/2011/12/12/objectdisposedexception-in-entity-framework.aspx'&gt;http://geekswithblogs.net/DarrenFieldhouse/archive/2011/12/12/objectdisposedexception-in-entity-framework.aspx&lt;/a&gt;&lt;/p&gt;&lt;p&gt;Having just help another developer with this issue, I thought I’d write a quick post about the cause of the ObjectDisposedException exception when working with Entity Framework.&lt;/p&gt;  &lt;p&gt;It is important to be aware of two things when working with Entity Framework&lt;/p&gt;  &lt;p&gt;1) The data context must not be disposed of until all the data is fetched from the database.&lt;/p&gt;  &lt;p&gt;2) A linq statement creates an IQueryable, which is not executed until you enumerate over it (e.g. use it in a for each loop) or convert it to a list or an array.&lt;/p&gt;  &lt;p&gt;Lets see and example:&lt;/p&gt; &lt;code&gt;   &lt;p&gt;Public Function GetProducts() As IEnumerable(Of Product)      &lt;br /&gt;    Using entities As New AdventureWorksEntities       &lt;br /&gt;        Return From p in entities.Products Where Not p.IsDiscontinued       &lt;br /&gt;    End Using       &lt;br /&gt;End Function       &lt;br /&gt;&lt;/p&gt; &lt;/code&gt;  &lt;p&gt;Now, If we call the above function like this:&lt;/p&gt; &lt;code&gt;   &lt;p&gt;For Each product In GetProducts()      &lt;br /&gt;    Console.WriteLine(product.Name)       &lt;br /&gt;Next       &lt;br /&gt;&lt;/p&gt; &lt;/code&gt;  &lt;p&gt;We will get an ObjectDisposedException exception because the query is not executed until we get to the For Each loop, whereas the data context is disposed of before leaving the GetProducts() function.&lt;/p&gt;  &lt;p&gt;To avoid this problem simply call .ToList() on the query inside the Using block so it is executed there and then:&lt;/p&gt; &lt;code&gt;   &lt;p&gt;Public Function GetProducts() As IEnumerable(Of Product)      &lt;br /&gt;    Using entities As New AdventureWorksEntities       &lt;br /&gt;        Return (From p in entities.Products       &lt;br /&gt;                Where Not p.IsDiscontinued).ToList()      &lt;br /&gt;    End Using       &lt;br /&gt;End Function       &lt;/p&gt;&lt;/code&gt; &lt;img src="http://geekswithblogs.net/DarrenFieldhouse/aggbug/148014.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>DarrenFieldhouse</dc:creator>
            <guid>http://geekswithblogs.net/DarrenFieldhouse/archive/2011/12/12/objectdisposedexception-in-entity-framework.aspx</guid>
            <pubDate>Mon, 12 Dec 2011 05:57:37 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/DarrenFieldhouse/comments/148014.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/DarrenFieldhouse/archive/2011/12/12/objectdisposedexception-in-entity-framework.aspx#feedback</comments>
            <wfw:commentRss>http://geekswithblogs.net/DarrenFieldhouse/comments/commentRss/148014.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/DarrenFieldhouse/services/trackbacks/148014.aspx</trackback:ping>
        </item>
        <item>
            <title>New features in VB.NET 11 (.NET 4.5)</title>
            <link>http://geekswithblogs.net/DarrenFieldhouse/archive/2011/10/07/new-features-in-vb.net-11-.net-4.5.aspx</link>
            <description>&lt;p&gt;Originally posted on: &lt;a href='http://geekswithblogs.net/DarrenFieldhouse/archive/2011/10/07/new-features-in-vb.net-11-.net-4.5.aspx'&gt;http://geekswithblogs.net/DarrenFieldhouse/archive/2011/10/07/new-features-in-vb.net-11-.net-4.5.aspx&lt;/a&gt;&lt;/p&gt;&lt;p&gt;Unlike the release of &lt;a href="http://blog.dotnettech.net/archive/2008/12/01/new-features-in-vb.net-10-.net-4.0.aspx"&gt;VB.NET with .NET 4.0&lt;/a&gt;, the next release of VB.NET doesn’t have the anything like as many new features, which is almost certainly because the language is really maturing and a lot more parity has been achieved between C# and VB.NET.&lt;/p&gt;  &lt;div class="subheading"&gt;Async&lt;/div&gt;  &lt;p&gt;The big new feature for both languages is the introduction of the await/async keywords. I won’t go into detail here because they are covered in lots of other places (including the &lt;a href="http://blogs.msdn.com/b/vbteam/archive/2011/04/13/async-feature-control-flow.aspx"&gt;VB.NET team blog&lt;/a&gt;).&lt;/p&gt;  &lt;div class="subheading"&gt;Yield&lt;/div&gt;  &lt;p&gt;One if the freebees we get because of the Async feature is the Yield keyword. This has been a feature of C# for a long time, and although not massively useful, when you do need it, it can save you a lot of time. Let look at an example.&lt;/p&gt;  &lt;p&gt;Imagine you have a function that takes an array of integers and returns an IEnumerable(Of Integer) containing the even numbers in that array (I know – completely contrived demo). The easiest way to do it would be to build a list and then return it once it is complete, for example:&lt;/p&gt; &lt;code&gt;Function GetEvens(numbers As Integer()) As IEnumberable(Of Integer)  &lt;br /&gt;  Dim evenNumbers As New List(Of Integer)     &lt;br /&gt;    &lt;br /&gt;  For Each number in numbers     &lt;br /&gt;    If number Mod 2 = 0 Then     &lt;br /&gt;      evenNumbers.Add(number)     &lt;br /&gt;    End If     &lt;br /&gt;  Next     &lt;br /&gt;    &lt;br /&gt;  Return evenNumbers     &lt;br /&gt;End Function&lt;/code&gt;   &lt;p&gt;With the Yield keyword we no longer need the List to hold the results, we can return them (yield them) as we find them, making our function look like this:&lt;/p&gt; &lt;code&gt;Function GetEvens(numbers As Integer()) As IEnumberable(Of Integer)    &lt;br /&gt;  For Each number in numbers     &lt;br /&gt;    If number Mod 2 = 0 Then     &lt;br /&gt;      Yield number     &lt;br /&gt;    End If     &lt;br /&gt;  Next     &lt;br /&gt;End Function&lt;/code&gt;   &lt;div class="subheading"&gt;Global&lt;/div&gt;  &lt;p&gt;The Global keyword has existed for a while to allow you to be explicit about which namespace you want. For example, assume you have this namespace in your project:&lt;/p&gt;  &lt;p&gt;&lt;code&gt;Namespace Acme.System.IO&lt;/code&gt;&lt;/p&gt;  &lt;p&gt;If you have Imported the Acme namespace this line becomes ambiguous:&lt;/p&gt; &lt;code&gt;Dim dataFile As System.IO.File &lt;/code&gt;  &lt;p&gt;The global keyword allows us to be explicit:&lt;/p&gt;  &lt;p&gt;&lt;code&gt;Dim dataFile As Global.System.IO.File &lt;/code&gt;&lt;/p&gt;  &lt;p&gt;In the next version of VB.NET we will also be able to use the Global keyword in namespace declarations (for exactly the same purpose). Kind of minor, but useful when you need it.&lt;/p&gt;  &lt;p&gt; &lt;/p&gt;  &lt;p&gt;There might be a few more language features announced, but that’s it for now…&lt;/p&gt; &lt;img src="http://geekswithblogs.net/DarrenFieldhouse/aggbug/147215.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>DarrenFieldhouse</dc:creator>
            <guid>http://geekswithblogs.net/DarrenFieldhouse/archive/2011/10/07/new-features-in-vb.net-11-.net-4.5.aspx</guid>
            <pubDate>Fri, 07 Oct 2011 01:33:48 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/DarrenFieldhouse/comments/147215.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/DarrenFieldhouse/archive/2011/10/07/new-features-in-vb.net-11-.net-4.5.aspx#feedback</comments>
            <wfw:commentRss>http://geekswithblogs.net/DarrenFieldhouse/comments/commentRss/147215.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/DarrenFieldhouse/services/trackbacks/147215.aspx</trackback:ping>
        </item>
        <item>
            <title>Reversing assignment statements with Find and Replace in VS 2010</title>
            <link>http://geekswithblogs.net/DarrenFieldhouse/archive/2010/09/15/reversing-assignment-statements-with-find-and-replace-in-vs-2010.aspx</link>
            <description>&lt;p&gt;Originally posted on: &lt;a href='http://geekswithblogs.net/DarrenFieldhouse/archive/2010/09/15/reversing-assignment-statements-with-find-and-replace-in-vs-2010.aspx'&gt;http://geekswithblogs.net/DarrenFieldhouse/archive/2010/09/15/reversing-assignment-statements-with-find-and-replace-in-vs-2010.aspx&lt;/a&gt;&lt;/p&gt;&lt;p&gt;One of the blogs I read is &lt;a href="http://blogs.msdn.com/b/zainnab/"&gt;Zain Naboulsi’s Visual Studio Tips and Tricks&lt;/a&gt;. In a recent post he discussed the power of using Find and Replace with regular expressions and it gave me an idea about how to quickly reverse a set of assignment statements.&lt;/p&gt;  &lt;p&gt;Lets say you have the following code:&lt;/p&gt;  &lt;pre&gt;Me.FirstNameTextBox.Text = customer.FirstName
Me.LastNameTextBox.Text = customer.LastName
Me.TelephoneTextBox.Text = customer.Telephone
Me.EmailTextBox.Text = customer.Email &lt;/pre&gt;

&lt;p&gt;And you want to reverse the assignments so that you are writing the textboxes back into the customer object (generally the next thing you would want to do). Rather than doing it by hand, or using some macro, you can use the find and replace window with a regular expression:&lt;/p&gt;

&lt;p&gt;&lt;a href="http://gwb.blob.core.windows.net/darrenfieldhouse/WindowsLiveWriter/ReversingassignmentstatementswithFindand_9497/FindAndReplace_2.png"&gt;&lt;img style="border-right-width: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto" title="FindAndReplace" border="0" alt="FindAndReplace" src="http://gwb.blob.core.windows.net/darrenfieldhouse/WindowsLiveWriter/ReversingassignmentstatementswithFindand_9497/FindAndReplace_thumb.png" width="367" height="428" /&gt;&lt;/a&gt; &lt;/p&gt;

&lt;p&gt;This works because the expression matches any character (.) zero or more times (*), followed by an equals sign then any character zero or more times. In other words, anything followed by “=” followed by anything. The two &lt;em&gt;anythings&lt;/em&gt; in the expression are enclosed with curly brackets to make them tagged expressions, which means they can be used in the replace expression. \1 will be the first tagged expression, \2 then next and so on. So our &lt;em&gt;replace with&lt;/em&gt; expression just says replace a=b with b=a.&lt;/p&gt;

&lt;p&gt;So what do you end up with? Well, this of course:&lt;/p&gt;

&lt;pre&gt;customer.FirstName = Me.FirstNameTextBox.Text
customer.LastName = Me.LastNameTextBox.Text
customer.Telephone = Me.TelephoneTextBox.Text
customer.Email = Me.EmailTextBox.Text&lt;/pre&gt;

&lt;p&gt;&lt;/p&gt;
&lt;a href="http://www.dotnetkicks.com/kick/?url=http%3a%2f%2fblog.dotnettech.net%2farchive%2f2010%2f09%2f15%2freversing-assignment-statements-with-find-and-replace-in-vs-2010.aspx"&gt;&lt;img border="0" alt="kick it on DotNetKicks.com" src="http://www.dotnetkicks.com/Services/Images/KickItImageGenerator.ashx?url=http%3a%2f%2fblog.dotnettech.net%2farchive%2f2010%2f09%2f15%2freversing-assignment-statements-with-find-and-replace-in-vs-2010.aspx&amp;amp;border=d0eb55&amp;amp;fgcolor=d0eb55&amp;amp;bgcolor=393939&amp;amp;cfgcolor=d0eb55&amp;amp;cbgcolor=393939" /&gt;&lt;/a&gt; &lt;img src="http://geekswithblogs.net/DarrenFieldhouse/aggbug/141814.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>DarrenFieldhouse</dc:creator>
            <guid>http://geekswithblogs.net/DarrenFieldhouse/archive/2010/09/15/reversing-assignment-statements-with-find-and-replace-in-vs-2010.aspx</guid>
            <pubDate>Wed, 15 Sep 2010 03:34:10 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/DarrenFieldhouse/comments/141814.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/DarrenFieldhouse/archive/2010/09/15/reversing-assignment-statements-with-find-and-replace-in-vs-2010.aspx#feedback</comments>
            <slash:comments>5</slash:comments>
            <wfw:commentRss>http://geekswithblogs.net/DarrenFieldhouse/comments/commentRss/141814.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/DarrenFieldhouse/services/trackbacks/141814.aspx</trackback:ping>
        </item>
        <item>
            <title>Designer resources for Developers</title>
            <link>http://geekswithblogs.net/DarrenFieldhouse/archive/2010/05/21/designer-resources-for-developers-again.aspx</link>
            <description>&lt;p&gt;Originally posted on: &lt;a href='http://geekswithblogs.net/DarrenFieldhouse/archive/2010/05/21/designer-resources-for-developers-again.aspx'&gt;http://geekswithblogs.net/DarrenFieldhouse/archive/2010/05/21/designer-resources-for-developers-again.aspx&lt;/a&gt;&lt;/p&gt;&lt;p&gt;If like me, you have to turn your hand to design every now and then, you might find some of these useful:&lt;/p&gt;  &lt;p&gt; &lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Fonts&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;Free for commercial use fonts.&lt;/p&gt;  &lt;p&gt;&lt;a title="http://www.fontsquirrel.com/" href="http://www.fontsquirrel.com/"&gt;http://www.fontsquirrel.com/&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;More free fonts&lt;/p&gt;  &lt;p&gt;&lt;a title="http://www.1001freefonts.com" href="http://www.1001freefonts.com"&gt;http://www.1001freefonts.com&lt;/a&gt;&lt;/p&gt;  &lt;p&gt; &lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Colours&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;A very cool flash based colour picker.&lt;/p&gt;  &lt;p&gt;&lt;a title="http://kuler.adobe.com/#create/fromacolor" href="http://kuler.adobe.com/#create/fromacolor"&gt;http://kuler.adobe.com/#create/fromacolor&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Another colour scheme design – all HTML this time…&lt;/p&gt;  &lt;p&gt;&lt;a title="http://colorschemedesigner.com/" href="http://colorschemedesigner.com/"&gt;http://colorschemedesigner.com/&lt;/a&gt;&lt;/p&gt;  &lt;p&gt; &lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Icons&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;A library of icons with various licences.&lt;/p&gt;  &lt;p&gt;&lt;a title="http://www.iconlet.com/" href="http://www.iconlet.com/"&gt;http://www.iconlet.com/&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Another library&lt;/p&gt;  &lt;p&gt;&lt;a title="http://www.iconfinder.com" href="http://www.iconfinder.com"&gt;http://www.iconfinder.com&lt;/a&gt;&lt;/p&gt;  &lt;p&gt; &lt;/p&gt;  &lt;p&gt;Hope you find some of these useful… leave a comment if you have any other suggestions.&lt;/p&gt;   &lt;a href="http://www.dotnetkicks.com/kick/?url=http%3a%2f%2fblog.dotnettech.net%2farchive%2f2010%2f05%2f21%2fdesigner-resources-for-developers-again.aspx"&gt;&lt;img border="0" alt="kick it on DotNetKicks.com" src="http://www.dotnetkicks.com/Services/Images/KickItImageGenerator.ashx?url=http%3a%2f%2fblog.dotnettech.net%2farchive%2f2010%2f05%2f21%2fdesigner-resources-for-developers-again.aspx&amp;amp;border=d0eb55&amp;amp;fgcolor=d0eb55&amp;amp;bgcolor=393939&amp;amp;cfgcolor=d0eb55&amp;amp;cbgcolor=393939" /&gt;&lt;/a&gt; &lt;img src="http://geekswithblogs.net/DarrenFieldhouse/aggbug/139992.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>DarrenFieldhouse</dc:creator>
            <guid>http://geekswithblogs.net/DarrenFieldhouse/archive/2010/05/21/designer-resources-for-developers-again.aspx</guid>
            <pubDate>Fri, 21 May 2010 05:05:52 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/DarrenFieldhouse/comments/139992.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/DarrenFieldhouse/archive/2010/05/21/designer-resources-for-developers-again.aspx#feedback</comments>
            <slash:comments>2</slash:comments>
            <wfw:commentRss>http://geekswithblogs.net/DarrenFieldhouse/comments/commentRss/139992.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/DarrenFieldhouse/services/trackbacks/139992.aspx</trackback:ping>
        </item>
        <item>
            <title>The evils of #region</title>
            <link>http://geekswithblogs.net/DarrenFieldhouse/archive/2010/05/21/the-evils-of-region.aspx</link>
            <description>&lt;p&gt;Originally posted on: &lt;a href='http://geekswithblogs.net/DarrenFieldhouse/archive/2010/05/21/the-evils-of-region.aspx'&gt;http://geekswithblogs.net/DarrenFieldhouse/archive/2010/05/21/the-evils-of-region.aspx&lt;/a&gt;&lt;/p&gt;&lt;p&gt;I’m not a big fan of #region, I use it occasionally but generally try to avoid it. It’s always frustrating to open a code file and be presented with nothing but collapsed regions – sure, it looks neat (and lets face, more than a few programmers are a little &lt;a href="http://en.wikipedia.org/wiki/OCD"&gt;OCD&lt;/a&gt;) but I want to see the code, that’s why I opened the file in the first place!&lt;/p&gt;  &lt;p&gt;Don’t worry, I’m not going off on a rant, I just want to direct you to a much more level headed explanation of &lt;a href="http://www.codinghorror.com/blog/2008/07/the-problem-with-code-folding.html"&gt;The Problem With Code Folding&lt;/a&gt;. I couldn’t agree more.&lt;/p&gt; &lt;img src="http://geekswithblogs.net/DarrenFieldhouse/aggbug/139991.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>DarrenFieldhouse</dc:creator>
            <guid>http://geekswithblogs.net/DarrenFieldhouse/archive/2010/05/21/the-evils-of-region.aspx</guid>
            <pubDate>Fri, 21 May 2010 05:03:48 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/DarrenFieldhouse/comments/139991.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/DarrenFieldhouse/archive/2010/05/21/the-evils-of-region.aspx#feedback</comments>
            <slash:comments>2</slash:comments>
            <wfw:commentRss>http://geekswithblogs.net/DarrenFieldhouse/comments/commentRss/139991.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/DarrenFieldhouse/services/trackbacks/139991.aspx</trackback:ping>
        </item>
        <item>
            <title>How Geeky?</title>
            <link>http://geekswithblogs.net/DarrenFieldhouse/archive/2010/03/22/how-geeky.aspx</link>
            <description>&lt;p&gt;Originally posted on: &lt;a href='http://geekswithblogs.net/DarrenFieldhouse/archive/2010/03/22/how-geeky.aspx'&gt;http://geekswithblogs.net/DarrenFieldhouse/archive/2010/03/22/how-geeky.aspx&lt;/a&gt;&lt;/p&gt;&lt;p&gt;I saw this on &lt;a href="http://thedatafarm.com/blog/just-rambling/how-geeky-am-i/"&gt;Julie Lerman’s blog&lt;/a&gt; and had to give it a go. I’m quite relieved to say:&lt;/p&gt; &lt;a style="width: 268px; display: block; background: url(http://www.oneplusyou.com/bb/css/img/quiz/geek_badge.jpg) no-repeat; height: 82px; text-decoration: none" href="http://www.oneplusyou.com/bb/geek"&gt;&lt;span style="padding-left: 125px; display: block; font-family: arial; color: #000; font-size: 22px; padding-top: 28px"&gt;54% Geek&lt;/span&gt;&lt;/a&gt;   &lt;p&gt;I’m glad to be a bit geeky, but wouldn’t want to score too high!!!&lt;/p&gt; &lt;img src="http://geekswithblogs.net/DarrenFieldhouse/aggbug/138711.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>DarrenFieldhouse</dc:creator>
            <guid>http://geekswithblogs.net/DarrenFieldhouse/archive/2010/03/22/how-geeky.aspx</guid>
            <pubDate>Mon, 22 Mar 2010 07:59:09 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/DarrenFieldhouse/comments/138711.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/DarrenFieldhouse/archive/2010/03/22/how-geeky.aspx#feedback</comments>
            <wfw:commentRss>http://geekswithblogs.net/DarrenFieldhouse/comments/commentRss/138711.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/DarrenFieldhouse/services/trackbacks/138711.aspx</trackback:ping>
        </item>
        <item>
            <title>Microsoft hasn&amp;rsquo;t set CustomErrors to RemoteOnly</title>
            <link>http://geekswithblogs.net/DarrenFieldhouse/archive/2010/01/05/microsoft-hasnrsquot-set-customerrors-to-remoteonly.aspx</link>
            <description>&lt;p&gt;Originally posted on: &lt;a href='http://geekswithblogs.net/DarrenFieldhouse/archive/2010/01/05/microsoft-hasnrsquot-set-customerrors-to-remoteonly.aspx'&gt;http://geekswithblogs.net/DarrenFieldhouse/archive/2010/01/05/microsoft-hasnrsquot-set-customerrors-to-remoteonly.aspx&lt;/a&gt;&lt;/p&gt;&lt;p&gt;I ran into a page on the Microsoft web site that was showing a compile error. It’s fairly unusual but the developers over at MS are only human and they are going to make mistakes sometimes. What I thought was particularly interesting was that the CustomErrors option in their web.config was set to Off, showing the full source code of the page.&lt;/p&gt;  &lt;p&gt;The page is at &lt;a href="http://lab.msdn.microsoft.com/"&gt;http://lab.msdn.microsoft.com/&lt;/a&gt; but I’m sure they will have fixed it by the time you read this so here is a screen shot.&lt;/p&gt;  &lt;p&gt; &lt;/p&gt;  &lt;p&gt;&lt;a href="http://gwb.blob.core.windows.net/darrenfieldhouse/WindowsLiveWriter/MicrosofthasntsetCustomErrorstoRemoteOnl_DC9C/MicrosoftPage_2.jpg"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: block; float: none; margin-left: auto; border-top: 0px; margin-right: auto; border-right: 0px" title="MicrosoftPage" border="0" alt="MicrosoftPage" src="http://gwb.blob.core.windows.net/darrenfieldhouse/WindowsLiveWriter/MicrosofthasntsetCustomErrorstoRemoteOnl_DC9C/MicrosoftPage_thumb.jpg" width="550" height="440" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt; &lt;/p&gt;  &lt;p&gt;I wish I could report some shocking fact gleaned from their source code, but it was all mundane C#…&lt;/p&gt; &lt;img src="http://geekswithblogs.net/DarrenFieldhouse/aggbug/137346.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>DarrenFieldhouse</dc:creator>
            <guid>http://geekswithblogs.net/DarrenFieldhouse/archive/2010/01/05/microsoft-hasnrsquot-set-customerrors-to-remoteonly.aspx</guid>
            <pubDate>Tue, 05 Jan 2010 09:41:53 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/DarrenFieldhouse/comments/137346.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/DarrenFieldhouse/archive/2010/01/05/microsoft-hasnrsquot-set-customerrors-to-remoteonly.aspx#feedback</comments>
            <wfw:commentRss>http://geekswithblogs.net/DarrenFieldhouse/comments/commentRss/137346.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/DarrenFieldhouse/services/trackbacks/137346.aspx</trackback:ping>
        </item>
        <item>
            <title>Checking if a user has access to a URL in ASP.NET</title>
            <link>http://geekswithblogs.net/DarrenFieldhouse/archive/2009/09/14/checking-if-a-user-has-access-to-a-url-in.aspx</link>
            <description>&lt;p&gt;Originally posted on: &lt;a href='http://geekswithblogs.net/DarrenFieldhouse/archive/2009/09/14/checking-if-a-user-has-access-to-a-url-in.aspx'&gt;http://geekswithblogs.net/DarrenFieldhouse/archive/2009/09/14/checking-if-a-user-has-access-to-a-url-in.aspx&lt;/a&gt;&lt;/p&gt;&lt;p&gt;I spent ages this morning trying to find a way to determine if a user has permission to access a page before navigating to it. I knew it was possible, the SiteMapProvider has a property called “SecurityTrimmingEnabled” that hides pages that the user cannot access.&lt;/p&gt;  &lt;p&gt;In the end I found a really useful object called UrlAuthorizationModule in the System.Web.Security namespace that has a method called CheckUrlAccessForPrincipal(). Pass in the url and get a Boolean return value indicating whether the resource is accessible. Easy when you know how!&lt;/p&gt; &lt;img src="http://geekswithblogs.net/DarrenFieldhouse/aggbug/134798.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>DarrenFieldhouse</dc:creator>
            <guid>http://geekswithblogs.net/DarrenFieldhouse/archive/2009/09/14/checking-if-a-user-has-access-to-a-url-in.aspx</guid>
            <pubDate>Mon, 14 Sep 2009 07:34:31 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/DarrenFieldhouse/comments/134798.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/DarrenFieldhouse/archive/2009/09/14/checking-if-a-user-has-access-to-a-url-in.aspx#feedback</comments>
            <slash:comments>1</slash:comments>
            <wfw:commentRss>http://geekswithblogs.net/DarrenFieldhouse/comments/commentRss/134798.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/DarrenFieldhouse/services/trackbacks/134798.aspx</trackback:ping>
        </item>
        <item>
            <title>A new interface for mobile phones</title>
            <link>http://geekswithblogs.net/DarrenFieldhouse/archive/2009/06/25/a-new-interface-for-mobile-phones.aspx</link>
            <description>&lt;p&gt;Originally posted on: &lt;a href='http://geekswithblogs.net/DarrenFieldhouse/archive/2009/06/25/a-new-interface-for-mobile-phones.aspx'&gt;http://geekswithblogs.net/DarrenFieldhouse/archive/2009/06/25/a-new-interface-for-mobile-phones.aspx&lt;/a&gt;&lt;/p&gt;&lt;p&gt;A while ago (in fact, it was two mobile phones ago) I had a non-touch phone. Most apps worked well but every now and again I wished I had a point and click interface. As I was trying to scroll around a particularly large web page I had an idea: What if the phone screen was a window and you scrolled it around by moving the phone itself? Almost all phones have a camera on the back, surely it could be used in the same way as an optical mouse to track movements on a surface. All you need to do is put your phone on the table and you could look at a large document as though it was stuck to the table itself!&lt;/p&gt;  &lt;p&gt;I’ve tried to illustrate how it would work with the image of the bing home page below, except you would only be able to see the page through the phones screen (obviously).&lt;/p&gt;  &lt;p&gt; &lt;/p&gt;  &lt;p&gt;&lt;a href="http://gwb.blob.core.windows.net/darrenfieldhouse/WindowsLiveWriter/Anewinterfaceformobilephones_E58C/PhoneAsMouse_2.jpg"&gt;&lt;img style="border-right-width: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto" title="PhoneAsMouse" border="0" alt="PhoneAsMouse" src="http://gwb.blob.core.windows.net/darrenfieldhouse/WindowsLiveWriter/Anewinterfaceformobilephones_E58C/PhoneAsMouse_thumb.jpg" width="244" height="162" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt; &lt;/p&gt;  &lt;p&gt;I’m about to get a new phone and I’m going back to using a keypad (in fact I’m getting the Samsung from the image above). This has reminded me of my idea from years ago so I thought I’d search to see if anything like it has been done. It seems somebody has turned their &lt;a href="http://www.youtube.com/watch?v=yT1h_ITR0G0"&gt;Nokia mobile into a Bluetooth mouse&lt;/a&gt; for their pc, so it must be possible – come on Microsoft, this would be a great feature in Windows Mobile 7!!!&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.dotnetkicks.com/kick/?url=http%3a%2f%2fblog.dotnettech.net%2farchive%2f2009%2f06%2f25%2fa-new-interface-for-mobile-phones.aspx"&gt;&lt;img border="0" alt="kick it on DotNetKicks.com" src="http://www.dotnetkicks.com/Services/Images/KickItImageGenerator.ashx?url=http%3a%2f%2fblog.dotnettech.net%2farchive%2f2009%2f06%2f25%2fa-new-interface-for-mobile-phones.aspx&amp;amp;border=d0eb55&amp;amp;fgcolor=d0eb55&amp;amp;bgcolor=393939&amp;amp;cfgcolor=d0eb55&amp;amp;cbgcolor=393939" /&gt;&lt;/a&gt;&lt;/p&gt; &lt;img src="http://geekswithblogs.net/DarrenFieldhouse/aggbug/133049.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>DarrenFieldhouse</dc:creator>
            <guid>http://geekswithblogs.net/DarrenFieldhouse/archive/2009/06/25/a-new-interface-for-mobile-phones.aspx</guid>
            <pubDate>Thu, 25 Jun 2009 09:20:10 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/DarrenFieldhouse/comments/133049.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/DarrenFieldhouse/archive/2009/06/25/a-new-interface-for-mobile-phones.aspx#feedback</comments>
            <wfw:commentRss>http://geekswithblogs.net/DarrenFieldhouse/comments/commentRss/133049.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/DarrenFieldhouse/services/trackbacks/133049.aspx</trackback:ping>
        </item>
        <item>
            <title>New Features in ASP.NET 4.0</title>
            <link>http://geekswithblogs.net/DarrenFieldhouse/archive/2009/05/08/new-features-in-asp.net-4.0.aspx</link>
            <description>&lt;p&gt;Originally posted on: &lt;a href='http://geekswithblogs.net/DarrenFieldhouse/archive/2009/05/08/new-features-in-asp.net-4.0.aspx'&gt;http://geekswithblogs.net/DarrenFieldhouse/archive/2009/05/08/new-features-in-asp.net-4.0.aspx&lt;/a&gt;&lt;/p&gt;&lt;p&gt;Having written about the &lt;a href="http://blog.dotnettech.net/archive/2008/12/01/new-features-in-vb.net-10-.net-4.0.aspx"&gt;new features planned for VB.NET 10&lt;/a&gt;, I’ve been meaning to write about what to expect in ASP.NET 4.0, specifically what is happening around webforms. Well, &lt;a href="http://blogs.msdn.com/mikeormond/default.aspx"&gt;Mike Ormond&lt;/a&gt; has written an excellent blog post on just that subject so I like to him instead:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/mikeormond/archive/2009/05/06/asp-net-4-0-webforms-enhancements.aspx"&gt;ASP.NET 4.0 Webforms Enhancements&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Enjoy!&lt;/p&gt; &lt;img src="http://geekswithblogs.net/DarrenFieldhouse/aggbug/131899.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>DarrenFieldhouse</dc:creator>
            <guid>http://geekswithblogs.net/DarrenFieldhouse/archive/2009/05/08/new-features-in-asp.net-4.0.aspx</guid>
            <pubDate>Fri, 08 May 2009 09:40:43 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/DarrenFieldhouse/comments/131899.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/DarrenFieldhouse/archive/2009/05/08/new-features-in-asp.net-4.0.aspx#feedback</comments>
            <wfw:commentRss>http://geekswithblogs.net/DarrenFieldhouse/comments/commentRss/131899.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/DarrenFieldhouse/services/trackbacks/131899.aspx</trackback:ping>
        </item>
    </channel>
</rss>