<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:pingback="http://madskills.com/public/xml/rss/module/pingback/" 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:dc="http://purl.org/dc/elements/1.1/" version="2.0">
  <channel>
    <title>Tim</title>
    <link>http://blogs.thesitedoctor.co.uk/tim/</link>
    <description>Footprints in the snow of a warped mind</description>
    <language>en-gb</language>
    <copyright>Tim Gaunt</copyright>
    <lastBuildDate>Sat, 27 Feb 2010 12:22:48 GMT</lastBuildDate>
    <generator>newtelligence dasBlog 2.2.8279.16125</generator>
    <managingEditor>timgaunt@gmail.com</managingEditor>
    <webMaster>timgaunt@gmail.com</webMaster>
    <item>
      <trackback:ping>http://blogs.thesitedoctor.co.uk/tim/Trackback.aspx?guid=07139039-07ca-4b5a-8cc7-c9a9f62f9a32</trackback:ping>
      <pingback:server>http://blogs.thesitedoctor.co.uk/tim/pingback.aspx</pingback:server>
      <pingback:target>http://blogs.thesitedoctor.co.uk/tim/PermaLink,guid,07139039-07ca-4b5a-8cc7-c9a9f62f9a32.aspx</pingback:target>
      <dc:creator>Tim</dc:creator>
      <wfw:comment>http://blogs.thesitedoctor.co.uk/tim/CommentView,guid,07139039-07ca-4b5a-8cc7-c9a9f62f9a32.aspx</wfw:comment>
      <wfw:commentRss>http://blogs.thesitedoctor.co.uk/tim/SyndicationService.asmx/GetEntryCommentsRss?guid=07139039-07ca-4b5a-8cc7-c9a9f62f9a32</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Ever wanted to be able to collapse all items within Visual Studio's solution window?
This is a nifty little Visual Studio macro that I came across a few years ago and
have been using successfully in Visual Studio 2005, Visual Studio 2008 and now in
the Visual Studio 2010 RC.
</p>
        <p>
I'll overview how to install it below in case you're unsure how to do it but I have
this bound to the key combination Ctrl+Shift+` as ReSharper now uses my previous key
combination of Ctrl+` for it's new bookmark explorer.
</p>
        <p>
Anyway, here's the Visual Studio Solution Explorer item Collapse All macro:
</p>
        <div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:f32c3428-b7e9-4f15-a8ea-c502c7ff2e88:509f3fe6-631a-4dea-9434-fbeaed4328bf" class="wlWriterEditableSmartContent">
          <pre class="brush: vb">Imports System
Imports EnvDTE
Imports EnvDTE80
Imports EnvDTE90
Imports System.Diagnostics
'-----------------------------------------------------------
' CollapseAll Module
'-----------------------------------------------------------
' Simple macro that fully collapses all items in the 
' Solution Explorer rather than just the top level node
'
' To make live easier, bind it to a keyboard setting such
' as Ctrl+Shift+` which by default has no bindings (Ctrl+` is
' now used by Resharper
'
' Tested and works with:
' Visual Studio 2005
' Visual Studio 2008
' Visual Studio 2010
'
' Originally from: http://bit.ly/bmRu3W
'-----------------------------------------------------------
Public Module CollapseAll

    Sub CollapseTree()
        ' Get the the Solution Explorer tree
        Dim solutionExplorer As UIHierarchy
        solutionExplorer = DTE.Windows.Item(Constants.vsext_wk_SProjectWindow).Object()

        ' Check if there is any open solution
        If (solutionExplorer.UIHierarchyItems.Count = 0) Then
            Return
        End If

        ' Get the top node (the name of the solution)
        Dim rootNode As UIHierarchyItem = solutionExplorer.UIHierarchyItems.Item(1)
        rootNode.DTE.SuppressUI = True

        ' Collapse each project node
        Collapse(rootNode, solutionExplorer)

        ' Select the solution node, or else when you click 
        ' on the solution window
        ' scrollbar, it will synchronize the open document 
        ' with the tree and pop
        ' out the corresponding node which is probably not what you want.
        rootNode.Select(vsUISelectionType.vsUISelectionTypeSelect)
        rootNode.DTE.SuppressUI = False
    End Sub

    Private Sub Collapse(ByVal item As UIHierarchyItem, ByRef solutionExplorer As UIHierarchy)
        For Each innerItem As UIHierarchyItem In item.UIHierarchyItems
            If innerItem.UIHierarchyItems.Count &gt; 0 Then
                ' Re-cursive call
                Collapse(innerItem, solutionExplorer)
                ' Collapse
                If innerItem.UIHierarchyItems.Expanded Then
                    innerItem.UIHierarchyItems.Expanded = False
                    If innerItem.UIHierarchyItems.Expanded = True Then
                        ' Bug in VS 2005
                        innerItem.Select(vsUISelectionType.vsUISelectionTypeSelect)
                        solutionExplorer.DoDefaultAction()
                    End If
                End If

            End If
        Next
    End Sub
End Module</pre>
        </div>
        <p>
 
</p>
        <p>
In case you've never installed a Visual Studio macro before, here's a couple of instructions:
</p>
        <ol>
          <li>
In Visual Studio, press Alt+F11 to load up the Visual Studio Macro editor (or View
&gt; Other Windows &gt; Macro Explorer &gt; Double Click on "Module1" in "My Macros")</li>
          <li>
Either create a new module of it it's not in use, you can edit Module1 and past in
the code above</li>
          <li>
Save and close the Visual Studio Macro editor</li>
          <li>
You should be back in Visual Studio so click "Tools &gt; Options &gt; Environment
&gt; Keyboard"</li>
          <li>
In the "Show commands containing" text box, enter "CollapseTree" and the macro you
just created should be shown.</li>
          <li>
Make sure "Global" is selected in the "Use new shortcut in:" drop down list</li>
          <li>
Press Ctrl+Shift+` in the "Press shortcut keys:" text box</li>
          <li>
Click Assign</li>
          <li>
Click OK</li>
        </ol>
        <p>
You're done :)
</p>
        <img width="0" height="0" src="http://blogs.thesitedoctor.co.uk/tim/aggbug.ashx?id=07139039-07ca-4b5a-8cc7-c9a9f62f9a32" />
      </body>
      <title>Collapse all Solution Explorer items in Visual Studio 2010</title>
      <guid isPermaLink="false">http://blogs.thesitedoctor.co.uk/tim/PermaLink,guid,07139039-07ca-4b5a-8cc7-c9a9f62f9a32.aspx</guid>
      <link>http://blogs.thesitedoctor.co.uk/tim/2010/02/27/Collapse+All+Solution+Explorer+Items+In+Visual+Studio+2010.aspx</link>
      <pubDate>Sat, 27 Feb 2010 12:22:48 GMT</pubDate>
      <description>&lt;p&gt;
Ever wanted to be able to collapse all items within Visual Studio's solution window?
This is a nifty little Visual Studio macro that I came across a few years ago and
have been using successfully in Visual Studio 2005, Visual Studio 2008 and now in
the Visual Studio 2010 RC.
&lt;/p&gt;
&lt;p&gt;
I'll overview how to install it below in case you're unsure how to do it but I have
this bound to the key combination Ctrl+Shift+` as ReSharper now uses my previous key
combination of Ctrl+` for it's new bookmark explorer.
&lt;/p&gt;
&lt;p&gt;
Anyway, here's the Visual Studio Solution Explorer item Collapse All macro:
&lt;/p&gt;
&lt;div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:f32c3428-b7e9-4f15-a8ea-c502c7ff2e88:509f3fe6-631a-4dea-9434-fbeaed4328bf" class="wlWriterEditableSmartContent"&gt;&lt;pre class="brush: vb"&gt;Imports System
Imports EnvDTE
Imports EnvDTE80
Imports EnvDTE90
Imports System.Diagnostics
'-----------------------------------------------------------
' CollapseAll Module
'-----------------------------------------------------------
' Simple macro that fully collapses all items in the 
' Solution Explorer rather than just the top level node
'
' To make live easier, bind it to a keyboard setting such
' as Ctrl+Shift+` which by default has no bindings (Ctrl+` is
' now used by Resharper
'
' Tested and works with:
' Visual Studio 2005
' Visual Studio 2008
' Visual Studio 2010
'
' Originally from: http://bit.ly/bmRu3W
'-----------------------------------------------------------
Public Module CollapseAll

    Sub CollapseTree()
        ' Get the the Solution Explorer tree
        Dim solutionExplorer As UIHierarchy
        solutionExplorer = DTE.Windows.Item(Constants.vsext_wk_SProjectWindow).Object()

        ' Check if there is any open solution
        If (solutionExplorer.UIHierarchyItems.Count = 0) Then
            Return
        End If

        ' Get the top node (the name of the solution)
        Dim rootNode As UIHierarchyItem = solutionExplorer.UIHierarchyItems.Item(1)
        rootNode.DTE.SuppressUI = True

        ' Collapse each project node
        Collapse(rootNode, solutionExplorer)

        ' Select the solution node, or else when you click 
        ' on the solution window
        ' scrollbar, it will synchronize the open document 
        ' with the tree and pop
        ' out the corresponding node which is probably not what you want.
        rootNode.Select(vsUISelectionType.vsUISelectionTypeSelect)
        rootNode.DTE.SuppressUI = False
    End Sub

    Private Sub Collapse(ByVal item As UIHierarchyItem, ByRef solutionExplorer As UIHierarchy)
        For Each innerItem As UIHierarchyItem In item.UIHierarchyItems
            If innerItem.UIHierarchyItems.Count &amp;gt; 0 Then
                ' Re-cursive call
                Collapse(innerItem, solutionExplorer)
                ' Collapse
                If innerItem.UIHierarchyItems.Expanded Then
                    innerItem.UIHierarchyItems.Expanded = False
                    If innerItem.UIHierarchyItems.Expanded = True Then
                        ' Bug in VS 2005
                        innerItem.Select(vsUISelectionType.vsUISelectionTypeSelect)
                        solutionExplorer.DoDefaultAction()
                    End If
                End If

            End If
        Next
    End Sub
End Module&lt;/pre&gt;
&lt;/div&gt;
&lt;p&gt;
&amp;#160;
&lt;/p&gt;
&lt;p&gt;
In case you've never installed a Visual Studio macro before, here's a couple of instructions:
&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
In Visual Studio, press Alt+F11 to load up the Visual Studio Macro editor (or View
&amp;gt; Other Windows &amp;gt; Macro Explorer &amp;gt; Double Click on "Module1" in "My Macros")&lt;/li&gt;
&lt;li&gt;
Either create a new module of it it's not in use, you can edit Module1 and past in
the code above&lt;/li&gt;
&lt;li&gt;
Save and close the Visual Studio Macro editor&lt;/li&gt;
&lt;li&gt;
You should be back in Visual Studio so click "Tools &amp;gt; Options &amp;gt; Environment
&amp;gt; Keyboard"&lt;/li&gt;
&lt;li&gt;
In the "Show commands containing" text box, enter "CollapseTree" and the macro you
just created should be shown.&lt;/li&gt;
&lt;li&gt;
Make sure "Global" is selected in the "Use new shortcut in:" drop down list&lt;/li&gt;
&lt;li&gt;
Press Ctrl+Shift+` in the "Press shortcut keys:" text box&lt;/li&gt;
&lt;li&gt;
Click Assign&lt;/li&gt;
&lt;li&gt;
Click OK&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;
You're done :)
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blogs.thesitedoctor.co.uk/tim/aggbug.ashx?id=07139039-07ca-4b5a-8cc7-c9a9f62f9a32" /&gt;</description>
      <comments>http://blogs.thesitedoctor.co.uk/tim/CommentView,guid,07139039-07ca-4b5a-8cc7-c9a9f62f9a32.aspx</comments>
      <category>Development</category>
      <category>Productivity</category>
      <category>Software/Visual Studio</category>
    </item>
    <item>
      <trackback:ping>http://blogs.thesitedoctor.co.uk/tim/Trackback.aspx?guid=cf028a1d-0399-4388-82ad-dacfa9a673c2</trackback:ping>
      <pingback:server>http://blogs.thesitedoctor.co.uk/tim/pingback.aspx</pingback:server>
      <pingback:target>http://blogs.thesitedoctor.co.uk/tim/PermaLink,guid,cf028a1d-0399-4388-82ad-dacfa9a673c2.aspx</pingback:target>
      <dc:creator>Tim</dc:creator>
      <wfw:comment>http://blogs.thesitedoctor.co.uk/tim/CommentView,guid,cf028a1d-0399-4388-82ad-dacfa9a673c2.aspx</wfw:comment>
      <wfw:commentRss>http://blogs.thesitedoctor.co.uk/tim/SyndicationService.asmx/GetEntryCommentsRss?guid=cf028a1d-0399-4388-82ad-dacfa9a673c2</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
As some of my blog posts are a little out of date, I thought I would spend some time
updating the most popular ones. As I use this script on a regular basis and there
was an error with the original posting, I thought I'd update it with a "corrected"
version to get things started.
</p>
        <p>
If you want to see the original script, you can refer to <a href="http://blogs.thesitedoctor.co.uk/tim/2007/11/02/How+To+Search+Every+Table+And+Field+In+A+SQL+Server+Database.aspx">How
to search every table and field in a SQL Server Database</a>. This one's just fixed
:)
</p>
        <pre class="brush: sql;" name="code">CREATE PROC SearchAllTables
(
    @SearchStr nvarchar(100)
)
AS

BEGIN
DECLARE @SearchStr nvarchar(100)
SET @SearchStr = 'test'
    -- Copyright © 2002 Narayana Vyas Kondreddi. All rights reserved.
    -- Purpose: To search all columns of all tables for a given search string
    -- Written by: Narayana Vyas Kondreddi
    -- Site: http://vyaskn.tripod.com
    -- Tested on: SQL Server 7.0 and SQL Server 2000
    -- Date modified: 28th July 2002 22:50 GMT
    CREATE TABLE #Results (ColumnName nvarchar(370), ColumnValue nvarchar(3630))

    SET NOCOUNT ON

    DECLARE @TableName nvarchar(256), @ColumnName nvarchar(128), @SearchStr2 nvarchar(110)
    SET  @TableName = ''
    SET @SearchStr2 = QUOTENAME('%' + @SearchStr + '%','''')

    WHILE @TableName IS NOT NULL
    
    BEGIN
        SET @ColumnName = ''
        SET @TableName = 
        (
            SELECT MIN(QUOTENAME(TABLE_SCHEMA) + '.' + QUOTENAME(TABLE_NAME))
            FROM     INFORMATION_SCHEMA.TABLES
            WHERE         TABLE_TYPE = 'BASE TABLE'
                AND    QUOTENAME(TABLE_SCHEMA) + '.' + QUOTENAME(TABLE_NAME) &gt; @TableName
                AND    OBJECTPROPERTY(
                        OBJECT_ID(
                            QUOTENAME(TABLE_SCHEMA) + '.' + QUOTENAME(TABLE_NAME)
                             ), 'IsMSShipped'
                               ) = 0
        )

        WHILE (@TableName IS NOT NULL) AND (@ColumnName IS NOT NULL)
            
        BEGIN
            SET @ColumnName =
            (
                SELECT MIN(QUOTENAME(COLUMN_NAME))
                FROM     INFORMATION_SCHEMA.COLUMNS
                WHERE         TABLE_SCHEMA    = PARSENAME(@TableName, 2)
                    AND    TABLE_NAME    = PARSENAME(@TableName, 1)
                    AND    DATA_TYPE IN ('char', 'varchar', 'nchar', 'nvarchar', 'int', 'decimal')
                    AND    QUOTENAME(COLUMN_NAME) &gt; @ColumnName
            )
    
            IF @ColumnName IS NOT NULL
            
            BEGIN
                INSERT INTO #Results
                EXEC
                (
                    'SELECT ''' + @TableName + '.' + @ColumnName + ''', LEFT(' + @ColumnName + ', 3630) FROM ' + @TableName + ' (NOLOCK) ' +
                    ' WHERE ' + @ColumnName + ' LIKE ' + @SearchStr2
                )
            END
        END    
    END

    SELECT ColumnName, ColumnValue FROM #Results
END

DROP TABLE #Results</pre>
        <img width="0" height="0" src="http://blogs.thesitedoctor.co.uk/tim/aggbug.ashx?id=cf028a1d-0399-4388-82ad-dacfa9a673c2" />
      </body>
      <title>Search every table and field in a SQL Server Database Updated</title>
      <guid isPermaLink="false">http://blogs.thesitedoctor.co.uk/tim/PermaLink,guid,cf028a1d-0399-4388-82ad-dacfa9a673c2.aspx</guid>
      <link>http://blogs.thesitedoctor.co.uk/tim/2010/02/19/Search+Every+Table+And+Field+In+A+SQL+Server+Database+Updated.aspx</link>
      <pubDate>Fri, 19 Feb 2010 12:07:28 GMT</pubDate>
      <description>&lt;p&gt;
As some of my blog posts are a little out of date, I thought I would spend some time
updating the most popular ones. As I use this script on a regular basis and there
was an error with the original posting, I thought I'd update it with a &amp;quot;corrected&amp;quot;
version to get things started.
&lt;/p&gt;
&lt;p&gt;
If you want to see the original script, you can refer to &lt;a href="http://blogs.thesitedoctor.co.uk/tim/2007/11/02/How+To+Search+Every+Table+And+Field+In+A+SQL+Server+Database.aspx"&gt;How
to search every table and field in a SQL Server Database&lt;/a&gt;. This one's just fixed
:)
&lt;/p&gt;
&lt;pre class="brush: sql;" name="code"&gt;CREATE PROC SearchAllTables
(
    @SearchStr nvarchar(100)
)
AS

BEGIN
DECLARE @SearchStr nvarchar(100)
SET @SearchStr = 'test'
    -- Copyright © 2002 Narayana Vyas Kondreddi. All rights reserved.
    -- Purpose: To search all columns of all tables for a given search string
    -- Written by: Narayana Vyas Kondreddi
    -- Site: http://vyaskn.tripod.com
    -- Tested on: SQL Server 7.0 and SQL Server 2000
    -- Date modified: 28th July 2002 22:50 GMT
    CREATE TABLE #Results (ColumnName nvarchar(370), ColumnValue nvarchar(3630))

    SET NOCOUNT ON

    DECLARE @TableName nvarchar(256), @ColumnName nvarchar(128), @SearchStr2 nvarchar(110)
    SET  @TableName = ''
    SET @SearchStr2 = QUOTENAME('%' + @SearchStr + '%','''')

    WHILE @TableName IS NOT NULL
    
    BEGIN
        SET @ColumnName = ''
        SET @TableName = 
        (
            SELECT MIN(QUOTENAME(TABLE_SCHEMA) + '.' + QUOTENAME(TABLE_NAME))
            FROM     INFORMATION_SCHEMA.TABLES
            WHERE         TABLE_TYPE = 'BASE TABLE'
                AND    QUOTENAME(TABLE_SCHEMA) + '.' + QUOTENAME(TABLE_NAME) &amp;gt; @TableName
                AND    OBJECTPROPERTY(
                        OBJECT_ID(
                            QUOTENAME(TABLE_SCHEMA) + '.' + QUOTENAME(TABLE_NAME)
                             ), 'IsMSShipped'
                               ) = 0
        )

        WHILE (@TableName IS NOT NULL) AND (@ColumnName IS NOT NULL)
            
        BEGIN
            SET @ColumnName =
            (
                SELECT MIN(QUOTENAME(COLUMN_NAME))
                FROM     INFORMATION_SCHEMA.COLUMNS
                WHERE         TABLE_SCHEMA    = PARSENAME(@TableName, 2)
                    AND    TABLE_NAME    = PARSENAME(@TableName, 1)
                    AND    DATA_TYPE IN ('char', 'varchar', 'nchar', 'nvarchar', 'int', 'decimal')
                    AND    QUOTENAME(COLUMN_NAME) &amp;gt; @ColumnName
            )
    
            IF @ColumnName IS NOT NULL
            
            BEGIN
                INSERT INTO #Results
                EXEC
                (
                    'SELECT ''' + @TableName + '.' + @ColumnName + ''', LEFT(' + @ColumnName + ', 3630) FROM ' + @TableName + ' (NOLOCK) ' +
                    ' WHERE ' + @ColumnName + ' LIKE ' + @SearchStr2
                )
            END
        END    
    END

    SELECT ColumnName, ColumnValue FROM #Results
END

DROP TABLE #Results&lt;/pre&gt;&lt;img width="0" height="0" src="http://blogs.thesitedoctor.co.uk/tim/aggbug.ashx?id=cf028a1d-0399-4388-82ad-dacfa9a673c2" /&gt;</description>
      <comments>http://blogs.thesitedoctor.co.uk/tim/CommentView,guid,cf028a1d-0399-4388-82ad-dacfa9a673c2.aspx</comments>
      <category>SQL</category>
      <category>SQL Server</category>
      <category>Stored Procedure</category>
    </item>
    <item>
      <trackback:ping>http://blogs.thesitedoctor.co.uk/tim/Trackback.aspx?guid=409b9297-7d3e-4698-83cd-376d34bc553b</trackback:ping>
      <pingback:server>http://blogs.thesitedoctor.co.uk/tim/pingback.aspx</pingback:server>
      <pingback:target>http://blogs.thesitedoctor.co.uk/tim/PermaLink,guid,409b9297-7d3e-4698-83cd-376d34bc553b.aspx</pingback:target>
      <dc:creator>Tim</dc:creator>
      <wfw:comment>http://blogs.thesitedoctor.co.uk/tim/CommentView,guid,409b9297-7d3e-4698-83cd-376d34bc553b.aspx</wfw:comment>
      <wfw:commentRss>http://blogs.thesitedoctor.co.uk/tim/SyndicationService.asmx/GetEntryCommentsRss?guid=409b9297-7d3e-4698-83cd-376d34bc553b</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
It's taken some time to get here and there's still more to add as I think this is
a pretty big topic but I thought I'd get started. I wanted to keep the session more
focused on the selling points of Umbraco and how people pitch Umbraco to the clients
than selling techniques which on the whole we managed to do.
</p>
        <p>
The first thing I stressed was that I wasn't going to teach you how to sell or selling
techniques as I've never found that hard selling works -though I'm not saying it doesn't,
I just prefer to educate the client into the most suitable solution (even if that
isn't us).
</p>
        <p>
There were a number of questions that were raised and I'll answer what I can here,
if you were at the session and I've missed something, please let me know and I'll
get it added:
</p>
        <ol>
          <li>
What are the key selling points of Umbraco 
</li>
          <li>
How do you pitch Umbraco 
</li>
          <li>
Do you tell clients it's open source (or use that as a sales point)? 
</li>
          <li>
How do you price Umbraco 
</li>
          <li>
Once you've won, what do you ask your client 
</li>
          <li>
How do you support Umbraco 
</li>
          <li>
How do you get around the question of "What happens if you get hit by a bus?" 
</li>
        </ol>
        <h2>What are the key selling points of Umbraco
</h2>
        <p>
A couple of the attendees came up with better 30second sales pitches so I'm sure they'll
post those up shortly but here's a few I remember:
</p>
        <ul>
          <li>
It's easy to use -you don't need any previous computer experience 
</li>
          <li>
You can edit any page's content yourself at any time 
</li>
          <li>
It's highly flexible and lightweight 
</li>
          <li>
It's search engine friendly 
</li>
          <li>
It's open source (this really can be a selling point at the right time) 
</li>
        </ul>
        <h2>Do you tell clients it's open source (or use that as a sales point)?
</h2>
        <p>
We do and we don't. Again it really comes down to who you're pitching Umbraco to.
Where the client has had issues with developers not releasing source etc then it's
clearly a selling point. 
</p>
        <p>
Generally we do tend to explain to clients that we will base their website on an open
source project that we then build on and customise further to suit their needs and
that by using best practice methodologies, any developer can in theory pick up the
system and continue to develop it (even if they have no experience of Umbraco).
</p>
        <h2>How do you price Umbraco
</h2>
        <p>
This question was asked in a couple of different ways throughout the session and it's
a topic in itself (see the article I wrote a while ago about pricing your work).
</p>
        <p>
If you look at Umbraco in the right way you'll see that it's actually rather easy
to price as there are a few components that you can sell either individually or together:
</p>
        <ul>
          <li>
Installation and configuration 
</li>
          <li>
Customisation 
</li>
          <li>
Hosting 
</li>
          <li>
Support 
</li>
        </ul>
        <p>
All you need to do is work out a minimum cost for each component and then that will
give you a core system cost. 
</p>
        <p>
Once you have your core Umbraco costs (don't forget to factor in your license costs)
you can then alter the costs accordingly for your client -and this has to be on a
case-by-case basis.  
</p>
        <h2>How do you pitch Umbraco
</h2>
        <p>
This is easy, there are so many selling points to Umbraco that regardless of what
the client is looking for, as long as it's CMS based, Umbraco will have some benefit
you can overview to the client.
</p>
        <p>
When pitching Umbraco, we have found educating the user as to the benefits and what
the client should be looking for in other systems. If you do this, then the majority
of the time, the rest of the competition falls by the wayside.
</p>
        <p>
If the client is a large corporate it's always worth mentioning that it offers much
of the functionality that SharePoint does but with little of the cost (or setup pain!).
</p>
        <h2>Once you've won the contract, what do you ask your client
</h2>
        <p>
The first thing to do is to get all the information you need to complete your contract
(or at least tell your client what you'll need and when). You should know what you'll
need already but we tend to ask for:
</p>
        <ul>
          <li>
Design inspiration (websites the client does and doesn't like -and why) 
</li>
          <li>
Logos and other source imagery 
</li>
          <li>
Text for the website (you'd be best to load the initial content during training but
get the client to think about it while you're developing or you'll never get there!) 
</li>
        </ul>
        <p>
Next, you'll need to make sure your paperwork is in order. Once you have agreed the
general premise of your contract, it's important that you confirm all deliverables
(what you'll be doing for the client) in a work order with the client. This avoids
an ambiguity on what you'll be delivering and when. This doesn't need to be pages
of text (though sometimes it needs to be) but avoids disagreements later.
</p>
        <p>
You should <strong>always</strong> request signed work order and deposit (we request
a minimum of 20% regardless of project spend) at a minimum before starting any work.
</p>
        <p>
Once you have the signed work order (you sign one for the client to keep and keep
one yourself), you can start thinking about the project. If it'll take longer than
a week to deliver, I recommend you provide the client with rough timescales, this
will have the added benefit of helping you focus your mind.
</p>
        <h2>How do you support Umbraco
</h2>
        <p>
This is something that Paul Sterling addressed through another session and if he doesn't
write up his notes I'll make a few notes in another post.
</p>
        <h2>How do you get around the question of "What happens if you get hit by a bus?"
</h2>
        <p>
Although this was asked a couple of times throughout the session, I avoided answering
it a little due to a conflict of interest. For the past few months we've been working
hard on a new system called <a title="Crisis Cover - Protecting your business against the unforeseen" href="http://www.crisiscover.co.uk/">Crisis
Cover</a> which has been designed to help you with this exact question.
</p>
        <p>
          <a title="Crisis Cover - Protecting your business against the unforeseen" href="http://www.crisiscover.co.uk/">
            <img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; margin-left: 0px; border-left-width: 0px; margin-right: 0px" title="apple-touch-icon[1]" border="0" alt="apple-touch-icon[1]" align="left" src="http://blogs.thesitedoctor.co.uk/tim/content/binary/WindowsLiveWriter/CodeGarden09OpenSpaceMinutesSpace1Howtos_130B7/apple-touch-icon%5B1%5D_c94f9aed-e4e5-4f09-b0d5-b691d2e1c62d.png" width="61" height="61" /> Crisis
Cover</a> monitors you to ensure that you're still around and if you don't respond
to a number of alerts, it will contact your clients informing there's something wrong. 
</p>
        <p>
I'll post more information about <a title="Crisis Cover - Protecting your business against the unforeseen" href="http://www.crisiscover.co.uk/">Crisis
Cover</a>, but if you're interested in getting involved with the beta, leave me your
email and I'll get one sent out.
</p>
        <h2>In Closing
</h2>
        <p>
There is a lot of information about selling and business in general in my previous
post "<a href="http://blogs.thesitedoctor.co.uk/tim/2007/01/29/Business+Startup+Advice.aspx">Business
start-up advice</a>" which if you're starting out, I really recommend you reading
as it should give you a really good start (and includes example Service Level Agreements,
Contracts and other useful documents).
</p>
        <img width="0" height="0" src="http://blogs.thesitedoctor.co.uk/tim/aggbug.ashx?id=409b9297-7d3e-4698-83cd-376d34bc553b" />
      </body>
      <title>CodeGarden 09 Open Space Minutes - Space 1: How to sell Umbraco</title>
      <guid isPermaLink="false">http://blogs.thesitedoctor.co.uk/tim/PermaLink,guid,409b9297-7d3e-4698-83cd-376d34bc553b.aspx</guid>
      <link>http://blogs.thesitedoctor.co.uk/tim/2009/07/27/CodeGarden+09+Open+Space+Minutes+Space+1+How+To+Sell+Umbraco.aspx</link>
      <pubDate>Mon, 27 Jul 2009 21:53:28 GMT</pubDate>
      <description>&lt;p&gt;
It's taken some time to get here and there's still more to add as I think this is
a pretty big topic but I thought I'd get started. I wanted to keep the session more
focused on the selling points of Umbraco and how people pitch Umbraco to the clients
than selling techniques which on the whole we managed to do.
&lt;/p&gt;
&lt;p&gt;
The first thing I stressed was that I wasn't going to teach you how to sell or selling
techniques as I've never found that hard selling works -though I'm not saying it doesn't,
I just prefer to educate the client into the most suitable solution (even if that
isn't us).
&lt;/p&gt;
&lt;p&gt;
There were a number of questions that were raised and I'll answer what I can here,
if you were at the session and I've missed something, please let me know and I'll
get it added:
&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
What are the key selling points of Umbraco 
&lt;/li&gt;
&lt;li&gt;
How do you pitch Umbraco 
&lt;/li&gt;
&lt;li&gt;
Do you tell clients it's open source (or use that as a sales point)? 
&lt;/li&gt;
&lt;li&gt;
How do you price Umbraco 
&lt;/li&gt;
&lt;li&gt;
Once you've won, what do you ask your client 
&lt;/li&gt;
&lt;li&gt;
How do you support Umbraco 
&lt;/li&gt;
&lt;li&gt;
How do you get around the question of "What happens if you get hit by a bus?" 
&lt;/li&gt;
&lt;/ol&gt;
&lt;h2&gt;What are the key selling points of Umbraco
&lt;/h2&gt;
&lt;p&gt;
A couple of the attendees came up with better 30second sales pitches so I'm sure they'll
post those up shortly but here's a few I remember:
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
It's easy to use -you don't need any previous computer experience 
&lt;/li&gt;
&lt;li&gt;
You can edit any page's content yourself at any time 
&lt;/li&gt;
&lt;li&gt;
It's highly flexible and lightweight 
&lt;/li&gt;
&lt;li&gt;
It's search engine friendly 
&lt;/li&gt;
&lt;li&gt;
It's open source (this really can be a selling point at the right time) 
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Do you tell clients it's open source (or use that as a sales point)?
&lt;/h2&gt;
&lt;p&gt;
We do and we don't. Again it really comes down to who you're pitching Umbraco to.
Where the client has had issues with developers not releasing source etc then it's
clearly a selling point. 
&lt;/p&gt;
&lt;p&gt;
Generally we do tend to explain to clients that we will base their website on an open
source project that we then build on and customise further to suit their needs and
that by using best practice methodologies, any developer can in theory pick up the
system and continue to develop it (even if they have no experience of Umbraco).
&lt;/p&gt;
&lt;h2&gt;How do you price Umbraco
&lt;/h2&gt;
&lt;p&gt;
This question was asked in a couple of different ways throughout the session and it's
a topic in itself (see the article I wrote a while ago about pricing your work).
&lt;/p&gt;
&lt;p&gt;
If you look at Umbraco in the right way you'll see that it's actually rather easy
to price as there are a few components that you can sell either individually or together:
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
Installation and configuration 
&lt;/li&gt;
&lt;li&gt;
Customisation 
&lt;/li&gt;
&lt;li&gt;
Hosting 
&lt;/li&gt;
&lt;li&gt;
Support 
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
All you need to do is work out a minimum cost for each component and then that will
give you a core system cost. 
&lt;/p&gt;
&lt;p&gt;
Once you have your core Umbraco costs (don't forget to factor in your license costs)
you can then alter the costs accordingly for your client -and this has to be on a
case-by-case basis.&amp;#160; 
&lt;/p&gt;
&lt;h2&gt;How do you pitch Umbraco
&lt;/h2&gt;
&lt;p&gt;
This is easy, there are so many selling points to Umbraco that regardless of what
the client is looking for, as long as it's CMS based, Umbraco will have some benefit
you can overview to the client.
&lt;/p&gt;
&lt;p&gt;
When pitching Umbraco, we have found educating the user as to the benefits and what
the client should be looking for in other systems. If you do this, then the majority
of the time, the rest of the competition falls by the wayside.
&lt;/p&gt;
&lt;p&gt;
If the client is a large corporate it's always worth mentioning that it offers much
of the functionality that SharePoint does but with little of the cost (or setup pain!).
&lt;/p&gt;
&lt;h2&gt;Once you've won the contract, what do you ask your client
&lt;/h2&gt;
&lt;p&gt;
The first thing to do is to get all the information you need to complete your contract
(or at least tell your client what you'll need and when). You should know what you'll
need already but we tend to ask for:
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
Design inspiration (websites the client does and doesn't like -and why) 
&lt;/li&gt;
&lt;li&gt;
Logos and other source imagery 
&lt;/li&gt;
&lt;li&gt;
Text for the website (you'd be best to load the initial content during training but
get the client to think about it while you're developing or you'll never get there!) 
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
Next, you'll need to make sure your paperwork is in order. Once you have agreed the
general premise of your contract, it's important that you confirm all deliverables
(what you'll be doing for the client) in a work order with the client. This avoids
an ambiguity on what you'll be delivering and when. This doesn't need to be pages
of text (though sometimes it needs to be) but avoids disagreements later.
&lt;/p&gt;
&lt;p&gt;
You should &lt;strong&gt;always&lt;/strong&gt; request signed work order and deposit (we request
a minimum of 20% regardless of project spend) at a minimum before starting any work.
&lt;/p&gt;
&lt;p&gt;
Once you have the signed work order (you sign one for the client to keep and keep
one yourself), you can start thinking about the project. If it'll take longer than
a week to deliver, I recommend you provide the client with rough timescales, this
will have the added benefit of helping you focus your mind.
&lt;/p&gt;
&lt;h2&gt;How do you support Umbraco
&lt;/h2&gt;
&lt;p&gt;
This is something that Paul Sterling addressed through another session and if he doesn't
write up his notes I'll make a few notes in another post.
&lt;/p&gt;
&lt;h2&gt;How do you get around the question of "What happens if you get hit by a bus?"
&lt;/h2&gt;
&lt;p&gt;
Although this was asked a couple of times throughout the session, I avoided answering
it a little due to a conflict of interest. For the past few months we've been working
hard on a new system called &lt;a title="Crisis Cover - Protecting your business against the unforeseen" href="http://www.crisiscover.co.uk/"&gt;Crisis
Cover&lt;/a&gt; which has been designed to help you with this exact question.
&lt;/p&gt;
&lt;p&gt;
&lt;a title="Crisis Cover - Protecting your business against the unforeseen" href="http://www.crisiscover.co.uk/"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; margin-left: 0px; border-left-width: 0px; margin-right: 0px" title="apple-touch-icon[1]" border="0" alt="apple-touch-icon[1]" align="left" src="http://blogs.thesitedoctor.co.uk/tim/content/binary/WindowsLiveWriter/CodeGarden09OpenSpaceMinutesSpace1Howtos_130B7/apple-touch-icon%5B1%5D_c94f9aed-e4e5-4f09-b0d5-b691d2e1c62d.png" width="61" height="61" /&gt; Crisis
Cover&lt;/a&gt; monitors you to ensure that you're still around and if you don't respond
to a number of alerts, it will contact your clients informing there's something wrong. 
&lt;/p&gt;
&lt;p&gt;
I'll post more information about &lt;a title="Crisis Cover - Protecting your business against the unforeseen" href="http://www.crisiscover.co.uk/"&gt;Crisis
Cover&lt;/a&gt;, but if you're interested in getting involved with the beta, leave me your
email and I'll get one sent out.
&lt;/p&gt;
&lt;h2&gt;In Closing
&lt;/h2&gt;
&lt;p&gt;
There is a lot of information about selling and business in general in my previous
post "&lt;a href="http://blogs.thesitedoctor.co.uk/tim/2007/01/29/Business+Startup+Advice.aspx"&gt;Business
start-up advice&lt;/a&gt;" which if you're starting out, I really recommend you reading
as it should give you a really good start (and includes example Service Level Agreements,
Contracts and other useful documents).
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blogs.thesitedoctor.co.uk/tim/aggbug.ashx?id=409b9297-7d3e-4698-83cd-376d34bc553b" /&gt;</description>
      <comments>http://blogs.thesitedoctor.co.uk/tim/CommentView,guid,409b9297-7d3e-4698-83cd-376d34bc553b.aspx</comments>
      <category>Business</category>
      <category>Business/Business Start-up Advice</category>
      <category>Business/Client</category>
      <category>Business/Expanding Your Business</category>
      <category>Marketing</category>
      <category>The Site Doctor</category>
      <category>Umbraco</category>
      <category>Umbraco/CodeGarden/2009</category>
      <category>Web Development</category>
    </item>
    <item>
      <trackback:ping>http://blogs.thesitedoctor.co.uk/tim/Trackback.aspx?guid=bd1cc28f-f7b4-4f09-b096-6091ccfa43d7</trackback:ping>
      <pingback:server>http://blogs.thesitedoctor.co.uk/tim/pingback.aspx</pingback:server>
      <pingback:target>http://blogs.thesitedoctor.co.uk/tim/PermaLink,guid,bd1cc28f-f7b4-4f09-b096-6091ccfa43d7.aspx</pingback:target>
      <dc:creator>Tim</dc:creator>
      <wfw:comment>http://blogs.thesitedoctor.co.uk/tim/CommentView,guid,bd1cc28f-f7b4-4f09-b096-6091ccfa43d7.aspx</wfw:comment>
      <wfw:commentRss>http://blogs.thesitedoctor.co.uk/tim/SyndicationService.asmx/GetEntryCommentsRss?guid=bd1cc28f-f7b4-4f09-b096-6091ccfa43d7</wfw:commentRss>
      <slash:comments>2</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Those of you lucky enough to go to CodeGarden '09 you'll know the format of the Open
Space already but for those of you who didn't, Open Space is the time that the attendees
are invited to talk about something they're interested in so I proposed two:
</p>
        <ol>
          <li>
Space 1: Selling Umbraco 
</li>
          <li>
Space 2: Exception handing and error reporting in Umbraco (and other .net websites/applications) 
</li>
        </ol>
        <p>
I'll write up the Selling Umbraco talk shortly but I wanted to put a few resources
together for it first so decided to write this one up first.
</p>
        <p>
First of all we had a brief chat about how everyone handles errors in their applications
and the various error handling options available. We discussed three options:
</p>
        <ol>
          <li>
            <a href="http://blogs.thesitedoctor.co.uk/tim/2009/02/27/Advanced+Error+Reporting+In+Umbraco+DasBlog+And+Other+ASPNet+Sites.aspx">Error
Handler v2.0</a>
          </li>
          <li>
            <a href="http://code.google.com/p/elmah/">ELMAH</a>
          </li>
          <li>
            <a href="http://www.exceptioneer.com/">Exceptioneer</a>
          </li>
        </ol>
        <p>
I've only had a brief look at <a href="http://code.google.com/p/elmah/">ELMAH</a> and
found at the time it was a little too much in the way of RSS feeds etc and I just
want an email alert, that said, Lee Kelleher has written a good article about <a href="http://blog.leekelleher.com/2009/04/23/integrating-elmah-with-umbraco/">integrating
ELMAH with Umbraco here</a> and I've written another article about <a href="http://blogs.thesitedoctor.co.uk/tim/2009/02/27/Advanced+Error+Reporting+In+Umbraco+DasBlog+And+Other+ASPNet+Sites.aspx">integrating
Error Handler v2.0 into Umbraco here</a> so I'll overview how to integrate <a href="http://www.exceptioneer.com/">Exceptioneer</a> into
Umbraco here instead.
</p>
        <p>
Wiring up <a href="http://www.exceptioneer.com/">Exceptioneer</a> with your site couldn't
be easier, the best bit is that they do all the hard work for you with their "Integrate"
section of the site but to give you a quick snapshot of how easy it is, first of all, <a href="https://www.exceptioneer.com/Site/Downloads.aspx">download
the dll</a> and pop it into your bin folder. Then edit your web.config:
</p>
        <pre class="code">
          <code class="brush: xml; toolbar: false; auto-links: false;">&lt;?xml
version="1.0"?&gt; &lt;configuration&gt; &lt;configSections&gt; &lt;section name="Exceptioneer"
type="Exceptioneer.WebClient.ClientModuleConfiguration, Exceptioneer.WebClient" requirePermission="true"
/&gt; &lt;/configSections&gt; &lt;!-- This is where you get to specify your API Key
and Application Name --&gt; &lt;Exceptioneer ApiKey="XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX"
ApplicationName="YOUR APPLICATION NAME" /&gt; &lt;!-- If you're using IIS 6.0 or Visual
Studio's built in web server you'll need to add this bit --&gt; &lt;system.web&gt;
&lt;httpModules&gt; &lt;add name="Exceptioneer" type="Exceptioneer.WebClient.ClientModule,
Exceptioneer.WebClient" /&gt; &lt;/httpModules&gt; &lt;!-- If you want to use the
JavaScript handling then add the Http Handler as so --&gt; &lt;httpHandlers&gt; &lt;add
path="ExceptioneerJavaScript.axd" verb="GET,POST" type="Exceptioneer.WebClient.JavaScriptHandler,
Exceptioneer.WebClient" /&gt; &lt;/httpHandlers&gt; &lt;/system.web&gt; &lt;!-- If
you're using IIS 7.0 you'll need to add this bit too --&gt; &lt;system.webServer&gt;
&lt;validation validateIntegratedModeConfiguration="false"/&gt; &lt;modules&gt; &lt;add
name="Exceptioneer" preCondition="managedHandler" type="Exceptioneer.WebClient.ClientModule,
Exceptioneer.WebClient" /&gt; &lt;/modules&gt; &lt;handlers&gt; &lt;add name="ExceptioneerJavaScript"
path="ExceptioneerJavaScript.axd" verb="GET,POST" type="Exceptioneer.WebClient.JavaScriptHandler,
Exceptioneer.WebClient" /&gt; &lt;/handlers&gt; &lt;/system.webServer&gt; &lt;/configuration&gt;</code>
        </pre>
        <p>
Now, one of the coolest things about <a href="http://www.exceptioneer.com/">Exceptioneer</a> is
that you can now also debug JavaScript errors! To debug the javascript errors, just
include this script in your templates:
</p>
        <pre class="brush: xml; toolbar: false; auto-links: false;" name="code">&lt;script src="/ExceptioneerJavaScript.axd?Reporter=true" type="text/javascript"&gt;&lt;/script&gt;</pre>
        <p>
That's it, you're done. Easy eh? If you want to know more about what it can do, Phil's
put together this "lovely" <a href="https://www.exceptioneer.com/Public/Demonstration.aspx">video
overview</a>. Exceptioneer have done a great comparison of the main features of <a href="https://www.exceptioneer.com/Public/ExceptioneerAndELMAH.aspx">comparison
Exceptioneer and ELMAH here</a>, the downside though is <a href="http://www.exceptioneer.com/">Exceptioneer</a> is
still in beta. 
</p>
        <p>
Remember, regardless of how good you think your code is, you should always integrate
some form of error handling in your website even if it is just an email to alert you
to the fact. 
</p>
        <img width="0" height="0" src="http://blogs.thesitedoctor.co.uk/tim/aggbug.ashx?id=bd1cc28f-f7b4-4f09-b096-6091ccfa43d7" />
      </body>
      <title>CodeGarden 09 Open Space Minutes -Space 2: Exception Handling in Umbraco</title>
      <guid isPermaLink="false">http://blogs.thesitedoctor.co.uk/tim/PermaLink,guid,bd1cc28f-f7b4-4f09-b096-6091ccfa43d7.aspx</guid>
      <link>http://blogs.thesitedoctor.co.uk/tim/2009/07/09/CodeGarden+09+Open+Space+Minutes+Space+2+Exception+Handling+In+Umbraco.aspx</link>
      <pubDate>Thu, 09 Jul 2009 00:23:38 GMT</pubDate>
      <description>&lt;p&gt;
Those of you lucky enough to go to CodeGarden '09 you'll know the format of the Open
Space already but for those of you who didn't, Open Space is the time that the attendees
are invited to talk about something they're interested in so I proposed two:
&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
Space 1: Selling Umbraco 
&lt;li&gt;
Space 2: Exception handing and error reporting in Umbraco (and other .net websites/applications) 
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;
I'll write up the Selling Umbraco talk shortly but I wanted to put a few resources
together for it first so decided to write this one up first.
&lt;/p&gt;
&lt;p&gt;
First of all we had a brief chat about how everyone handles errors in their applications
and the various error handling options available. We discussed three options:
&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;a href="http://blogs.thesitedoctor.co.uk/tim/2009/02/27/Advanced+Error+Reporting+In+Umbraco+DasBlog+And+Other+ASPNet+Sites.aspx"&gt;Error
Handler v2.0&lt;/a&gt; 
&lt;li&gt;
&lt;a href="http://code.google.com/p/elmah/"&gt;ELMAH&lt;/a&gt; 
&lt;li&gt;
&lt;a href="http://www.exceptioneer.com/"&gt;Exceptioneer&lt;/a&gt; 
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;
I've only had a brief look at &lt;a href="http://code.google.com/p/elmah/"&gt;ELMAH&lt;/a&gt; and
found at the time it was a little too much in the way of RSS feeds etc and I just
want an email alert, that said, Lee Kelleher has written a good article about &lt;a href="http://blog.leekelleher.com/2009/04/23/integrating-elmah-with-umbraco/"&gt;integrating
ELMAH with Umbraco here&lt;/a&gt; and I've written another article about &lt;a href="http://blogs.thesitedoctor.co.uk/tim/2009/02/27/Advanced+Error+Reporting+In+Umbraco+DasBlog+And+Other+ASPNet+Sites.aspx"&gt;integrating
Error Handler v2.0 into Umbraco here&lt;/a&gt; so I'll overview how to integrate &lt;a href="http://www.exceptioneer.com/"&gt;Exceptioneer&lt;/a&gt; into
Umbraco here instead.
&lt;/p&gt;
&lt;p&gt;
Wiring up &lt;a href="http://www.exceptioneer.com/"&gt;Exceptioneer&lt;/a&gt; with your site couldn't
be easier, the best bit is that they do all the hard work for you with their "Integrate"
section of the site but to give you a quick snapshot of how easy it is, first of all, &lt;a href="https://www.exceptioneer.com/Site/Downloads.aspx"&gt;download
the dll&lt;/a&gt; and pop it into your bin folder. Then edit your web.config:
&lt;/p&gt;
&lt;pre class="code"&gt;
&lt;code class="brush: xml; toolbar: false; auto-links: false;"&gt;&amp;lt;?xml
version="1.0"?&amp;gt; &amp;lt;configuration&amp;gt; &amp;lt;configSections&amp;gt; &amp;lt;section name="Exceptioneer"
type="Exceptioneer.WebClient.ClientModuleConfiguration, Exceptioneer.WebClient" requirePermission="true"
/&amp;gt; &amp;lt;/configSections&amp;gt; &amp;lt;!-- This is where you get to specify your API Key
and Application Name --&amp;gt; &amp;lt;Exceptioneer ApiKey="XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX"
ApplicationName="YOUR APPLICATION NAME" /&amp;gt; &amp;lt;!-- If you're using IIS 6.0 or Visual
Studio's built in web server you'll need to add this bit --&amp;gt; &amp;lt;system.web&amp;gt;
&amp;lt;httpModules&amp;gt; &amp;lt;add name="Exceptioneer" type="Exceptioneer.WebClient.ClientModule,
Exceptioneer.WebClient" /&amp;gt; &amp;lt;/httpModules&amp;gt; &amp;lt;!-- If you want to use the
JavaScript handling then add the Http Handler as so --&amp;gt; &amp;lt;httpHandlers&amp;gt; &amp;lt;add
path="ExceptioneerJavaScript.axd" verb="GET,POST" type="Exceptioneer.WebClient.JavaScriptHandler,
Exceptioneer.WebClient" /&amp;gt; &amp;lt;/httpHandlers&amp;gt; &amp;lt;/system.web&amp;gt; &amp;lt;!-- If
you're using IIS 7.0 you'll need to add this bit too --&amp;gt; &amp;lt;system.webServer&amp;gt;
&amp;lt;validation validateIntegratedModeConfiguration="false"/&amp;gt; &amp;lt;modules&amp;gt; &amp;lt;add
name="Exceptioneer" preCondition="managedHandler" type="Exceptioneer.WebClient.ClientModule,
Exceptioneer.WebClient" /&amp;gt; &amp;lt;/modules&amp;gt; &amp;lt;handlers&amp;gt; &amp;lt;add name="ExceptioneerJavaScript"
path="ExceptioneerJavaScript.axd" verb="GET,POST" type="Exceptioneer.WebClient.JavaScriptHandler,
Exceptioneer.WebClient" /&amp;gt; &amp;lt;/handlers&amp;gt; &amp;lt;/system.webServer&amp;gt; &amp;lt;/configuration&amp;gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;
Now, one of the coolest things about &lt;a href="http://www.exceptioneer.com/"&gt;Exceptioneer&lt;/a&gt; is
that you can now also debug JavaScript errors! To debug the javascript errors, just
include this script in your templates:
&lt;/p&gt;
&lt;pre class="brush: xml; toolbar: false; auto-links: false;" name="code"&gt;&amp;lt;script src="/ExceptioneerJavaScript.axd?Reporter=true" type="text/javascript"&amp;gt;&amp;lt;/script&amp;gt;&lt;/pre&gt;
&lt;p&gt;
That's it, you're done. Easy eh? If you want to know more about what it can do, Phil's
put together this "lovely" &lt;a href="https://www.exceptioneer.com/Public/Demonstration.aspx"&gt;video
overview&lt;/a&gt;. Exceptioneer have done a great comparison of the main features of &lt;a href="https://www.exceptioneer.com/Public/ExceptioneerAndELMAH.aspx"&gt;comparison
Exceptioneer and ELMAH here&lt;/a&gt;, the downside though is &lt;a href="http://www.exceptioneer.com/"&gt;Exceptioneer&lt;/a&gt; is
still in beta. 
&lt;/p&gt;
&lt;p&gt;
Remember, regardless of how good you think your code is, you should always integrate
some form of error handling in your website even if it is just an email to alert you
to the fact. 
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blogs.thesitedoctor.co.uk/tim/aggbug.ashx?id=bd1cc28f-f7b4-4f09-b096-6091ccfa43d7" /&gt;</description>
      <comments>http://blogs.thesitedoctor.co.uk/tim/CommentView,guid,bd1cc28f-f7b4-4f09-b096-6091ccfa43d7.aspx</comments>
      <category>ASP.Net</category>
      <category>ASP.Net/Error Reporting</category>
      <category>Umbraco</category>
    </item>
    <item>
      <trackback:ping>http://blogs.thesitedoctor.co.uk/tim/Trackback.aspx?guid=85926b92-9252-42bc-a240-3facb471656d</trackback:ping>
      <pingback:server>http://blogs.thesitedoctor.co.uk/tim/pingback.aspx</pingback:server>
      <pingback:target>http://blogs.thesitedoctor.co.uk/tim/PermaLink,guid,85926b92-9252-42bc-a240-3facb471656d.aspx</pingback:target>
      <dc:creator>Tim</dc:creator>
      <wfw:comment>http://blogs.thesitedoctor.co.uk/tim/CommentView,guid,85926b92-9252-42bc-a240-3facb471656d.aspx</wfw:comment>
      <wfw:commentRss>http://blogs.thesitedoctor.co.uk/tim/SyndicationService.asmx/GetEntryCommentsRss?guid=85926b92-9252-42bc-a240-3facb471656d</wfw:commentRss>
      <slash:comments>1</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
I've started using <a href="http://www.west-wind.com/presentations/configurationclass/configurationclass.asp">Rick
Strahl's wwAppConfiguration</a> to allow easier access to application constants and
one thing that's been bugging me is that it doesn't play nice with configSource -which
we update with web deployment projects to specify Development/Staging/Live settings.
</p>
        <p>
The issue is that when you set configSource on the appSettigns node, wwAppConfiguration
doesn't correctly set the file's path and instead (when using the default settings)
writes the new values within the &lt;appSettings&gt; node. The problem is then that
ASP.Net complains that you cannot specify configSource and settings inside the &lt;appSettings&gt;
node.
</p>
        <p>
After a little digging, it turns out that you can use "file" in place of "configSource"
for the appSettings node (and sadly only the appSettings node) and it allows you to
define values within the &lt;appsettings&gt; node and then override them with your
external file. This is fantastic because you can store your "default" values in the
web.config and then override some or all of them for your various environments.
</p>
        <p>
The next issue you may run into is if you use web deployment projects, in which case
you may get the following error: 
</p>
        <p>
web.config(2): error WDP00001: section appSettings in "web.config" has 7
elements but "config\STAGING-appSettings.config" has 19 elements. 
</p>
        <p>
To work around this, you just need to untick the "Enforce matching section replacements"
checkbox within the properties section and you're good to go!
</p>
        <p>
          <img src="http://blogs.sitedoc.co.uk/tim/img/20090627-WebDeploymentProject.png" width="656" height="403" />
        </p>
        <p>
I hope that helps someone!
</p>
        <img width="0" height="0" src="http://blogs.thesitedoctor.co.uk/tim/aggbug.ashx?id=85926b92-9252-42bc-a240-3facb471656d" />
      </body>
      <title>Store common AppSettings in the web.config and an external file (configSource vs. file)</title>
      <guid isPermaLink="false">http://blogs.thesitedoctor.co.uk/tim/PermaLink,guid,85926b92-9252-42bc-a240-3facb471656d.aspx</guid>
      <link>http://blogs.thesitedoctor.co.uk/tim/2009/06/27/Store+Common+AppSettings+In+The+Webconfig+And+An+External+File+ConfigSource+Vs+File.aspx</link>
      <pubDate>Sat, 27 Jun 2009 07:19:19 GMT</pubDate>
      <description>&lt;p&gt;
I've started using &lt;a href="http://www.west-wind.com/presentations/configurationclass/configurationclass.asp"&gt;Rick
Strahl's wwAppConfiguration&lt;/a&gt; to allow easier access to application constants and
one thing that's been bugging me is that it doesn't play nice with configSource -which
we update with web deployment projects to specify Development/Staging/Live settings.
&lt;/p&gt;
&lt;p&gt;
The issue is that when you set configSource on the appSettigns node, wwAppConfiguration
doesn't correctly set the file's path and instead (when using the default settings)
writes the new values within the &amp;lt;appSettings&amp;gt; node. The problem is then that
ASP.Net complains that you cannot specify configSource and settings inside the &amp;lt;appSettings&amp;gt;
node.
&lt;/p&gt;
&lt;p&gt;
After a little digging, it turns out that you can use "file" in place of "configSource"
for the appSettings node (and sadly only the appSettings node) and it allows you to
define values within the &amp;lt;appsettings&amp;gt; node and then override them with your
external file. This is fantastic because you can store your "default" values in the
web.config and then override some or all of them for your various environments.
&lt;/p&gt;
&lt;p&gt;
The next issue you may run into is if you use web deployment projects, in which case
you may get the following error: 
&lt;/p&gt;
&lt;p&gt;
web.config(2): error WDP00001: section appSettings in &amp;quot;web.config&amp;quot; has 7
elements but &amp;quot;config\STAGING-appSettings.config&amp;quot; has 19 elements. 
&lt;/p&gt;
&lt;p&gt;
To work around this, you just need to untick the &amp;quot;Enforce matching section replacements&amp;quot;
checkbox within the properties section and you're good to go!
&lt;/p&gt;
&lt;p&gt;
&lt;img src="http://blogs.sitedoc.co.uk/tim/img/20090627-WebDeploymentProject.png" width="656" height="403" /&gt;
&lt;/p&gt;
&lt;p&gt;
I hope that helps someone!
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blogs.thesitedoctor.co.uk/tim/aggbug.ashx?id=85926b92-9252-42bc-a240-3facb471656d" /&gt;</description>
      <comments>http://blogs.thesitedoctor.co.uk/tim/CommentView,guid,85926b92-9252-42bc-a240-3facb471656d.aspx</comments>
      <category>ASP.Net</category>
      <category>Software/Visual Studio</category>
      <category>Web Development</category>
    </item>
    <item>
      <trackback:ping>http://blogs.thesitedoctor.co.uk/tim/Trackback.aspx?guid=10ba51a5-14c9-47ac-a2f3-8b28e981103d</trackback:ping>
      <pingback:server>http://blogs.thesitedoctor.co.uk/tim/pingback.aspx</pingback:server>
      <pingback:target>http://blogs.thesitedoctor.co.uk/tim/PermaLink,guid,10ba51a5-14c9-47ac-a2f3-8b28e981103d.aspx</pingback:target>
      <dc:creator>Tim</dc:creator>
      <wfw:comment>http://blogs.thesitedoctor.co.uk/tim/CommentView,guid,10ba51a5-14c9-47ac-a2f3-8b28e981103d.aspx</wfw:comment>
      <wfw:commentRss>http://blogs.thesitedoctor.co.uk/tim/SyndicationService.asmx/GetEntryCommentsRss?guid=10ba51a5-14c9-47ac-a2f3-8b28e981103d</wfw:commentRss>
      <slash:comments>2</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
This was one of those irritating errors that you get when you're trying to do something
quickly before you go home and you can't for the life of you fathom the issue. 
</p>
        <p>
I had the following code (simple enough):
</p>
        <div class="code">
          <img align="top" src="http://blogs.sitedoc.co.uk/img/sc/clear.gif" />FileInfo
f = <span style="color: #0000ff">new</span> FileInfo(<span style="color: #800000">"</span><span style="color: #800000">##</span> <span style="color: #800000">File's</span> <span style="color: #800000">Path</span> <span style="color: #800000">"</span>); 
<br /><img align="top" src="http://blogs.sitedoc.co.uk/img/sc/clear.gif" /><span style="color: #0000ff">try</span><br /><div style="display: none" id="closed633777574815880680_3"><img onclick="showHideCodeDiv('633777574815880680_3', false)" align="top" src="http://blogs.sitedoc.co.uk/img/sc/PlusNoLines.gif" /><b><span style="color: #00008b">{...}</span></b></div><div style="display: block" id="open633777574815880680_3"><img onclick="showHideCodeDiv('633777574815880680_3', true)" align="top" src="http://blogs.sitedoc.co.uk/img/sc/minusNoTopLine.gif" />{ 
<br /><img align="top" src="http://blogs.sitedoc.co.uk/img/sc/I.gif" />   
f.MoveTo(<span style="color: #800000">"</span><span style="color: #800000">##</span> <span style="color: #800000">DROP</span> <span style="color: #800000">OFF</span> <span style="color: #800000">DIRECTORY</span> <span style="color: #800000">##</span><span style="color: #800000">"</span>)); 
<br /><img align="top" src="http://blogs.sitedoc.co.uk/img/sc/L.gif" />}
</div><img align="top" src="http://blogs.sitedoc.co.uk/img/sc/clear.gif" /><span style="color: #0000ff">catch</span> (<span style="color: #008b8b">Exception</span> e) 
<br /><div style="display: none" id="closed633777574815880680_7"><img onclick="showHideCodeDiv('633777574815880680_7', false)" align="top" src="http://blogs.sitedoc.co.uk/img/sc/PlusNoLines.gif" /><b><span style="color: #00008b">{...}</span></b></div><div style="display: block" id="open633777574815880680_7"><img onclick="showHideCodeDiv('633777574815880680_7', true)" align="top" src="http://blogs.sitedoc.co.uk/img/sc/minusNoTopLine.gif" />{ 
<br /><img align="top" src="http://blogs.sitedoc.co.uk/img/sc/I.gif" />    <span style="color: #008000">//</span><span style="color: #008000">Log</span> <span style="color: #008000">the</span> <span style="color: #008000">exception</span> <span style="color: #008000">here</span><br /><img align="top" src="http://blogs.sitedoc.co.uk/img/sc/L.gif" />}
</div></div>
        <p>
The fix was simple, you just have to remember to specify the new filename too. (DOH!).
Here's the "correct" code.
</p>
        <div class="code">
          <img align="top" src="http://blogs.sitedoc.co.uk/img/sc/clear.gif" />FileInfo
f = <span style="color: #0000ff">new</span> FileInfo(<span style="color: #800000">"##
File's Path</span> <span style="color: #800000">"</span>); 
<br /><img align="top" src="http://blogs.sitedoc.co.uk/img/sc/clear.gif" /><span style="color: #0000ff">try</span><br /><div style="display: none" id="closed633777574273676465_3"><img onclick="showHideCodeDiv('633777574273676465_3', false)" align="top" src="http://blogs.sitedoc.co.uk/img/sc/PlusNoLines.gif" /><b><span style="color: #00008b">{...}</span></b></div><div style="display: block" id="open633777574273676465_3"><img onclick="showHideCodeDiv('633777574273676465_3', true)" align="top" src="http://blogs.sitedoc.co.uk/img/sc/minusNoTopLine.gif" />{ 
<br /><img align="top" src="http://blogs.sitedoc.co.uk/img/sc/I.gif" />   
f.MoveTo(Path.Combine(<span style="color: #800000">"## DROP OFF DIRECTORY ##"</span>,
f.Name)); 
<br /><img align="top" src="http://blogs.sitedoc.co.uk/img/sc/L.gif" />}
</div><img align="top" src="http://blogs.sitedoc.co.uk/img/sc/clear.gif" /><span style="color: #0000ff">catch</span> (<span style="color: #008b8b">Exception</span> e) 
<br /><div style="display: none" id="closed633777574273676465_7"><img onclick="showHideCodeDiv('633777574273676465_7', false)" align="top" src="http://blogs.sitedoc.co.uk/img/sc/PlusNoLines.gif" /><b><span style="color: #00008b">{...}</span></b></div><div style="display: block" id="open633777574273676465_7"><img onclick="showHideCodeDiv('633777574273676465_7', true)" align="top" src="http://blogs.sitedoc.co.uk/img/sc/minusNoTopLine.gif" />{ 
<br /><img align="top" src="http://blogs.sitedoc.co.uk/img/sc/I.gif" />    <span style="color: #008000">//Log
the exception here</span><br /><img align="top" src="http://blogs.sitedoc.co.uk/img/sc/L.gif" />}
</div></div>
        <p>
Hope that helps you out ;)
</p>
        <img width="0" height="0" src="http://blogs.thesitedoctor.co.uk/tim/aggbug.ashx?id=10ba51a5-14c9-47ac-a2f3-8b28e981103d" />
      </body>
      <title>C# FileInfo.MoveTo Cannot create a file when that file already exists exception</title>
      <guid isPermaLink="false">http://blogs.thesitedoctor.co.uk/tim/PermaLink,guid,10ba51a5-14c9-47ac-a2f3-8b28e981103d.aspx</guid>
      <link>http://blogs.thesitedoctor.co.uk/tim/2009/05/12/C+FileInfoMoveTo+Cannot+Create+A+File+When+That+File+Already+Exists+Exception.aspx</link>
      <pubDate>Tue, 12 May 2009 19:39:35 GMT</pubDate>
      <description>&lt;p&gt;
This was one of those irritating errors that you get when you're trying to do something
quickly before you go home and you can't for the life of you fathom the issue. 
&lt;/p&gt;
&lt;p&gt;
I had the following code (simple enough):
&lt;/p&gt;
&lt;div class="code"&gt;&lt;img align="top" src="http://blogs.sitedoc.co.uk/img/sc/clear.gif" /&gt;FileInfo
f = &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; FileInfo(&lt;span style="color: #800000"&gt;&amp;quot;&lt;/span&gt;&lt;span style="color: #800000"&gt;##&lt;/span&gt;&amp;#160;&lt;span style="color: #800000"&gt;File's&lt;/span&gt;&amp;#160;&lt;span style="color: #800000"&gt;Path&lt;/span&gt;&amp;#160;&lt;span style="color: #800000"&gt;&amp;quot;&lt;/span&gt;); 
&lt;br /&gt;
&lt;img align="top" src="http://blogs.sitedoc.co.uk/img/sc/clear.gif" /&gt;&lt;span style="color: #0000ff"&gt;try&lt;/span&gt; 
&lt;br /&gt;
&lt;div style="display: none" id="closed633777574815880680_3"&gt;&lt;img onclick="showHideCodeDiv(&amp;#39;633777574815880680_3&amp;#39;, false)" align="top" src="http://blogs.sitedoc.co.uk/img/sc/PlusNoLines.gif" /&gt;&lt;b&gt;&lt;span style="color: #00008b"&gt;{...}&lt;/span&gt;&lt;/b&gt;
&lt;/div&gt;
&lt;div style="display: block" id="open633777574815880680_3"&gt;&lt;img onclick="showHideCodeDiv(&amp;#39;633777574815880680_3&amp;#39;, true)" align="top" src="http://blogs.sitedoc.co.uk/img/sc/minusNoTopLine.gif" /&gt;{ 
&lt;br /&gt;
&lt;img align="top" src="http://blogs.sitedoc.co.uk/img/sc/I.gif" /&gt;&amp;#160;&amp;#160;&amp;#160;
f.MoveTo(&lt;span style="color: #800000"&gt;&amp;quot;&lt;/span&gt;&lt;span style="color: #800000"&gt;##&lt;/span&gt;&amp;#160;&lt;span style="color: #800000"&gt;DROP&lt;/span&gt;&amp;#160;&lt;span style="color: #800000"&gt;OFF&lt;/span&gt;&amp;#160;&lt;span style="color: #800000"&gt;DIRECTORY&lt;/span&gt;&amp;#160;&lt;span style="color: #800000"&gt;##&lt;/span&gt;&lt;span style="color: #800000"&gt;&amp;quot;&lt;/span&gt;)); 
&lt;br /&gt;
&lt;img align="top" src="http://blogs.sitedoc.co.uk/img/sc/L.gif" /&gt;}
&lt;/div&gt;
&lt;img align="top" src="http://blogs.sitedoc.co.uk/img/sc/clear.gif" /&gt;&lt;span style="color: #0000ff"&gt;catch&lt;/span&gt; (&lt;span style="color: #008b8b"&gt;Exception&lt;/span&gt; e) 
&lt;br /&gt;
&lt;div style="display: none" id="closed633777574815880680_7"&gt;&lt;img onclick="showHideCodeDiv(&amp;#39;633777574815880680_7&amp;#39;, false)" align="top" src="http://blogs.sitedoc.co.uk/img/sc/PlusNoLines.gif" /&gt;&lt;b&gt;&lt;span style="color: #00008b"&gt;{...}&lt;/span&gt;&lt;/b&gt;
&lt;/div&gt;
&lt;div style="display: block" id="open633777574815880680_7"&gt;&lt;img onclick="showHideCodeDiv(&amp;#39;633777574815880680_7&amp;#39;, true)" align="top" src="http://blogs.sitedoc.co.uk/img/sc/minusNoTopLine.gif" /&gt;{ 
&lt;br /&gt;
&lt;img align="top" src="http://blogs.sitedoc.co.uk/img/sc/I.gif" /&gt;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color: #008000"&gt;//&lt;/span&gt;&lt;span style="color: #008000"&gt;Log&lt;/span&gt;&amp;#160;&lt;span style="color: #008000"&gt;the&lt;/span&gt;&amp;#160;&lt;span style="color: #008000"&gt;exception&lt;/span&gt;&amp;#160;&lt;span style="color: #008000"&gt;here&lt;/span&gt; 
&lt;br /&gt;
&lt;img align="top" src="http://blogs.sitedoc.co.uk/img/sc/L.gif" /&gt;}
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;
The fix was simple, you just have to remember to specify the new filename too. (DOH!).
Here's the "correct" code.
&lt;/p&gt;
&lt;div class="code"&gt;&lt;img align="top" src="http://blogs.sitedoc.co.uk/img/sc/clear.gif" /&gt;FileInfo
f = &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; FileInfo(&lt;span style="color: #800000"&gt;&amp;quot;##
File's Path&lt;/span&gt;&amp;#160;&lt;span style="color: #800000"&gt;&amp;quot;&lt;/span&gt;); 
&lt;br /&gt;
&lt;img align="top" src="http://blogs.sitedoc.co.uk/img/sc/clear.gif" /&gt;&lt;span style="color: #0000ff"&gt;try&lt;/span&gt; 
&lt;br /&gt;
&lt;div style="display: none" id="closed633777574273676465_3"&gt;&lt;img onclick="showHideCodeDiv(&amp;#39;633777574273676465_3&amp;#39;, false)" align="top" src="http://blogs.sitedoc.co.uk/img/sc/PlusNoLines.gif" /&gt;&lt;b&gt;&lt;span style="color: #00008b"&gt;{...}&lt;/span&gt;&lt;/b&gt;
&lt;/div&gt;
&lt;div style="display: block" id="open633777574273676465_3"&gt;&lt;img onclick="showHideCodeDiv(&amp;#39;633777574273676465_3&amp;#39;, true)" align="top" src="http://blogs.sitedoc.co.uk/img/sc/minusNoTopLine.gif" /&gt;{ 
&lt;br /&gt;
&lt;img align="top" src="http://blogs.sitedoc.co.uk/img/sc/I.gif" /&gt;&amp;#160;&amp;#160;&amp;#160;
f.MoveTo(Path.Combine(&lt;span style="color: #800000"&gt;&amp;quot;## DROP OFF DIRECTORY ##&amp;quot;&lt;/span&gt;,
f.Name)); 
&lt;br /&gt;
&lt;img align="top" src="http://blogs.sitedoc.co.uk/img/sc/L.gif" /&gt;}
&lt;/div&gt;
&lt;img align="top" src="http://blogs.sitedoc.co.uk/img/sc/clear.gif" /&gt;&lt;span style="color: #0000ff"&gt;catch&lt;/span&gt; (&lt;span style="color: #008b8b"&gt;Exception&lt;/span&gt; e) 
&lt;br /&gt;
&lt;div style="display: none" id="closed633777574273676465_7"&gt;&lt;img onclick="showHideCodeDiv(&amp;#39;633777574273676465_7&amp;#39;, false)" align="top" src="http://blogs.sitedoc.co.uk/img/sc/PlusNoLines.gif" /&gt;&lt;b&gt;&lt;span style="color: #00008b"&gt;{...}&lt;/span&gt;&lt;/b&gt;
&lt;/div&gt;
&lt;div style="display: block" id="open633777574273676465_7"&gt;&lt;img onclick="showHideCodeDiv(&amp;#39;633777574273676465_7&amp;#39;, true)" align="top" src="http://blogs.sitedoc.co.uk/img/sc/minusNoTopLine.gif" /&gt;{ 
&lt;br /&gt;
&lt;img align="top" src="http://blogs.sitedoc.co.uk/img/sc/I.gif" /&gt;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color: #008000"&gt;//Log
the exception here&lt;/span&gt; 
&lt;br /&gt;
&lt;img align="top" src="http://blogs.sitedoc.co.uk/img/sc/L.gif" /&gt;}
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;
Hope that helps you out ;)
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blogs.thesitedoctor.co.uk/tim/aggbug.ashx?id=10ba51a5-14c9-47ac-a2f3-8b28e981103d" /&gt;</description>
      <comments>http://blogs.thesitedoctor.co.uk/tim/CommentView,guid,10ba51a5-14c9-47ac-a2f3-8b28e981103d.aspx</comments>
      <category>ASP.Net</category>
      <category>C#</category>
      <category>Development</category>
    </item>
    <item>
      <trackback:ping>http://blogs.thesitedoctor.co.uk/tim/Trackback.aspx?guid=cf6f0226-db49-460d-8de9-7ab3075d6e84</trackback:ping>
      <pingback:server>http://blogs.thesitedoctor.co.uk/tim/pingback.aspx</pingback:server>
      <pingback:target>http://blogs.thesitedoctor.co.uk/tim/PermaLink,guid,cf6f0226-db49-460d-8de9-7ab3075d6e84.aspx</pingback:target>
      <dc:creator>Tim</dc:creator>
      <wfw:comment>http://blogs.thesitedoctor.co.uk/tim/CommentView,guid,cf6f0226-db49-460d-8de9-7ab3075d6e84.aspx</wfw:comment>
      <wfw:commentRss>http://blogs.thesitedoctor.co.uk/tim/SyndicationService.asmx/GetEntryCommentsRss?guid=cf6f0226-db49-460d-8de9-7ab3075d6e84</wfw:commentRss>
      <slash:comments>3</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <h2>The Error
</h2>
        <p>
For those of you who have tried to rename your Umbraco installation directory to something
other than the default /umbraco/ you'll have found that TreeInit.aspx throws a JavaScript
error along the lines of:
</p>
        <p>
Message: Object expected 
<br />
Line: 1 
<br />
Char: 4236 
<br />
Code: 0 
<br />
URI: http://www.yourdomain.co.uk/youradmindirector/js/xloadtree.js
</p>
        <p>
As this only really affects the refresh of the tree/close of a couple of dialogues
I've not bothered fixing it but basically the issue is outlined well here: <a href="http://tinyurl.com/cx9atv">http://tinyurl.com/cx9atv</a></p>
        <h2>The Fix
</h2>
        <p>
If you're using extension less URLs already then it's easy as pie to sort:
</p>
        <ol>
          <li>
Open your UrlRewriting config file (/config/UrlRewriting.config) 
</li>
          <li>
Add this above "&lt;/rewrites&gt;": 
</li>
        </ol>
        <div class="code">
          <div style="display: none">
            <img onclick="showHideCodeDiv('633765388075525066_1', false)" align="top" src="http://blogs.sitedoc.co.uk/img/sc/PlusNoLines.gif" />
            <b>
              <span style="color: #00008b">&lt;...&gt;</span>
            </b>
          </div>
          <div style="display: block" id="open633765388075525066_1">
            <img onclick="showHideCodeDiv('633765388075525066_1', true)" align="top" src="http://blogs.sitedoc.co.uk/img/sc/minusNoTopLine.gif" />
            <span style="color: #0000ff">&lt;</span>
            <span style="color: #8b0000">add</span>
            <span style="color: #ff0000"> name</span>
            <span style="color: #8b0000">=</span>
            <span style="color: #0000ff">"missingjs"</span>  
<br /><img align="top" src="http://blogs.sitedoc.co.uk/img/sc/I.gif" /><span style="color: #ff0000">   
virtualUrl</span><span style="color: #8b0000">=</span><span style="color: #0000ff">"^~/##
YOUR ADMIN DIRECTORY GOES HERE ##_client/ui/(.*).js"</span>  
<br /><img align="top" src="http://blogs.sitedoc.co.uk/img/sc/I.gif" /><span style="color: #ff0000">   
rewriteUrlParameter</span><span style="color: #8b0000">=</span><span style="color: #0000ff">"ExcludeFromClientQueryString"</span>  
<br /><img align="top" src="http://blogs.sitedoc.co.uk/img/sc/I.gif" /><span style="color: #ff0000">   
destinationUrl</span><span style="color: #8b0000">=</span><span style="color: #0000ff">"~/umbraco_client/ui/$1.js"</span>  
<br /><img align="top" src="http://blogs.sitedoc.co.uk/img/sc/L.gif" /><span style="color: #ff0000">   
ignoreCase</span><span style="color: #8b0000">=</span><span style="color: #0000ff">"true"</span> <span style="color: #8b0000">/</span><span style="color: #0000ff">&gt;</span></div>
        </div>
        <p>
If you've not already using extension less URLs don't panic, that's easy to setup
you can <a href="http://www.urlrewriting.net/160/en/documentation.html">read all about
it here</a>. Alternatively you could just copy the js files from one folder to another
;)
</p>
        <h2>The Why
</h2>
        <p>
I don't know how many people already rename their admin dir from something else but
as Umbraco becomes a more popular choice of 
<abbr title="Content Management System">
CMS
</abbr>
you really should consider hiding the folder (the more popular it becomes, the more
people will become more familiar with the default admin directory of /umbraco/).
</p>
        <p>
Although there hasn't yet been a breach (<abbr title="As Far As I Am Aware">
AFAIAA
</abbr>
) if a vulnerability is found, the first step in prevention is obfuscation -hide your
admin directory! A <a href="http://www.google.co.uk/search?q=username+login+inurl%3Aadmin.asp">quick
Google search</a> will show you how easy some developers have made it for you to <a href="http://www.google.co.uk/search?q=username+login+inurl%3Aadmin.asp">find
their admin sites</a>.
</p>
        <img width="0" height="0" src="http://blogs.thesitedoctor.co.uk/tim/aggbug.ashx?id=cf6f0226-db49-460d-8de9-7ab3075d6e84" />
      </body>
      <title>Fix missing JavaScript file when you rename the Umbraco admin directory</title>
      <guid isPermaLink="false">http://blogs.thesitedoctor.co.uk/tim/PermaLink,guid,cf6f0226-db49-460d-8de9-7ab3075d6e84.aspx</guid>
      <link>http://blogs.thesitedoctor.co.uk/tim/2009/04/28/Fix+Missing+JavaScript+File+When+You+Rename+The+Umbraco+Admin+Directory.aspx</link>
      <pubDate>Tue, 28 Apr 2009 17:49:48 GMT</pubDate>
      <description>&lt;h2&gt;The Error
&lt;/h2&gt;
&lt;p&gt;
For those of you who have tried to rename your Umbraco installation directory to something
other than the default /umbraco/ you'll have found that TreeInit.aspx throws a JavaScript
error along the lines of:
&lt;/p&gt;
&lt;p&gt;
Message: Object expected 
&lt;br /&gt;
Line: 1 
&lt;br /&gt;
Char: 4236 
&lt;br /&gt;
Code: 0 
&lt;br /&gt;
URI: http://www.yourdomain.co.uk/youradmindirector/js/xloadtree.js
&lt;/p&gt;
&lt;p&gt;
As this only really affects the refresh of the tree/close of a couple of dialogues
I've not bothered fixing it but basically the issue is outlined well here: &lt;a href="http://tinyurl.com/cx9atv"&gt;http://tinyurl.com/cx9atv&lt;/a&gt; 
&lt;/p&gt;
&lt;h2&gt;The Fix
&lt;/h2&gt;
&lt;p&gt;
If you're using extension less URLs already then it's easy as pie to sort:
&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
Open your UrlRewriting config file (/config/UrlRewriting.config) 
&lt;/li&gt;
&lt;li&gt;
Add this above &amp;quot;&amp;lt;/rewrites&amp;gt;&amp;quot;: 
&lt;/li&gt;
&lt;/ol&gt;
&lt;div class="code"&gt;
&lt;div style="display: none"&gt;&lt;img onclick="showHideCodeDiv(&amp;#39;633765388075525066_1&amp;#39;, false)" align="top" src="http://blogs.sitedoc.co.uk/img/sc/PlusNoLines.gif" /&gt;&lt;b&gt;&lt;span style="color: #00008b"&gt;&amp;lt;...&amp;gt;&lt;/span&gt;&lt;/b&gt;
&lt;/div&gt;
&lt;div style="display: block" id="open633765388075525066_1"&gt;&lt;img onclick="showHideCodeDiv(&amp;#39;633765388075525066_1&amp;#39;, true)" align="top" src="http://blogs.sitedoc.co.uk/img/sc/minusNoTopLine.gif" /&gt;&lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #8b0000"&gt;add&lt;/span&gt;&lt;span style="color: #ff0000"&gt; name&lt;/span&gt;&lt;span style="color: #8b0000"&gt;=&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;quot;missingjs&amp;quot;&lt;/span&gt;&amp;#160; 
&lt;br /&gt;
&lt;img align="top" src="http://blogs.sitedoc.co.uk/img/sc/I.gif" /&gt;&lt;span style="color: #ff0000"&gt;&amp;#160;&amp;#160;&amp;#160;
virtualUrl&lt;/span&gt;&lt;span style="color: #8b0000"&gt;=&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;quot;^~/##
YOUR ADMIN DIRECTORY GOES HERE ##_client/ui/(.*).js&amp;quot;&lt;/span&gt;&amp;#160; 
&lt;br /&gt;
&lt;img align="top" src="http://blogs.sitedoc.co.uk/img/sc/I.gif" /&gt;&lt;span style="color: #ff0000"&gt;&amp;#160;&amp;#160;&amp;#160;
rewriteUrlParameter&lt;/span&gt;&lt;span style="color: #8b0000"&gt;=&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;quot;ExcludeFromClientQueryString&amp;quot;&lt;/span&gt;&amp;#160; 
&lt;br /&gt;
&lt;img align="top" src="http://blogs.sitedoc.co.uk/img/sc/I.gif" /&gt;&lt;span style="color: #ff0000"&gt;&amp;#160;&amp;#160;&amp;#160;
destinationUrl&lt;/span&gt;&lt;span style="color: #8b0000"&gt;=&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;quot;~/umbraco_client/ui/$1.js&amp;quot;&lt;/span&gt;&amp;#160; 
&lt;br /&gt;
&lt;img align="top" src="http://blogs.sitedoc.co.uk/img/sc/L.gif" /&gt;&lt;span style="color: #ff0000"&gt;&amp;#160;&amp;#160;&amp;#160;
ignoreCase&lt;/span&gt;&lt;span style="color: #8b0000"&gt;=&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;quot;true&amp;quot;&lt;/span&gt;&amp;#160;&lt;span style="color: #8b0000"&gt;/&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;
If you've not already using extension less URLs don't panic, that's easy to setup
you can &lt;a href="http://www.urlrewriting.net/160/en/documentation.html"&gt;read all about
it here&lt;/a&gt;. Alternatively you could just copy the js files from one folder to another
;)
&lt;/p&gt;
&lt;h2&gt;The Why
&lt;/h2&gt;
&lt;p&gt;
I don't know how many people already rename their admin dir from something else but
as Umbraco becomes a more popular choice of 
&lt;abbr title="Content Management System"&gt;
CMS
&lt;/abbr&gt;
you really should consider hiding the folder (the more popular it becomes, the more
people will become more familiar with the default admin directory of /umbraco/).
&lt;/p&gt;
&lt;p&gt;
Although there hasn't yet been a breach (&lt;abbr title="As Far As I Am Aware"&gt;
AFAIAA
&lt;/abbr&gt;
) if a vulnerability is found, the first step in prevention is obfuscation -hide your
admin directory! A &lt;a href="http://www.google.co.uk/search?q=username+login+inurl%3Aadmin.asp"&gt;quick
Google search&lt;/a&gt; will show you how easy some developers have made it for you to &lt;a href="http://www.google.co.uk/search?q=username+login+inurl%3Aadmin.asp"&gt;find
their admin sites&lt;/a&gt;.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blogs.thesitedoctor.co.uk/tim/aggbug.ashx?id=cf6f0226-db49-460d-8de9-7ab3075d6e84" /&gt;</description>
      <comments>http://blogs.thesitedoctor.co.uk/tim/CommentView,guid,cf6f0226-db49-460d-8de9-7ab3075d6e84.aspx</comments>
      <category>ASP.Net</category>
      <category>Security</category>
      <category>The Site Doctor</category>
      <category>Umbraco</category>
      <category>Web Development</category>
    </item>
    <item>
      <trackback:ping>http://blogs.thesitedoctor.co.uk/tim/Trackback.aspx?guid=bfd673af-acda-4a77-ab28-5ac32f49164d</trackback:ping>
      <pingback:server>http://blogs.thesitedoctor.co.uk/tim/pingback.aspx</pingback:server>
      <pingback:target>http://blogs.thesitedoctor.co.uk/tim/PermaLink,guid,bfd673af-acda-4a77-ab28-5ac32f49164d.aspx</pingback:target>
      <dc:creator>Tim</dc:creator>
      <wfw:comment>http://blogs.thesitedoctor.co.uk/tim/CommentView,guid,bfd673af-acda-4a77-ab28-5ac32f49164d.aspx</wfw:comment>
      <wfw:commentRss>http://blogs.thesitedoctor.co.uk/tim/SyndicationService.asmx/GetEntryCommentsRss?guid=bfd673af-acda-4a77-ab28-5ac32f49164d</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
This came through in my email today and it made me smile:
</p>
        <p>
          <img src="http://blogs.sitedoc.co.uk/tim/img/2009-04-25_1211.png" width="280" height="317" />
        </p>
        <img width="0" height="0" src="http://blogs.thesitedoctor.co.uk/tim/aggbug.ashx?id=bfd673af-acda-4a77-ab28-5ac32f49164d" />
      </body>
      <title>Maplin loses it’s way with it’s GPS</title>
      <guid isPermaLink="false">http://blogs.thesitedoctor.co.uk/tim/PermaLink,guid,bfd673af-acda-4a77-ab28-5ac32f49164d.aspx</guid>
      <link>http://blogs.thesitedoctor.co.uk/tim/2009/04/25/Maplin+Loses+Its+Way+With+Its+GPS.aspx</link>
      <pubDate>Sat, 25 Apr 2009 11:17:48 GMT</pubDate>
      <description>&lt;p&gt;
This came through in my email today and it made me smile:
&lt;/p&gt;
&lt;p&gt;
&lt;img src="http://blogs.sitedoc.co.uk/tim/img/2009-04-25_1211.png" width="280" height="317" /&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blogs.thesitedoctor.co.uk/tim/aggbug.ashx?id=bfd673af-acda-4a77-ab28-5ac32f49164d" /&gt;</description>
      <comments>http://blogs.thesitedoctor.co.uk/tim/CommentView,guid,bfd673af-acda-4a77-ab28-5ac32f49164d.aspx</comments>
      <category>Business</category>
      <category>Marketing</category>
      <category>Marketing/Email</category>
    </item>
    <item>
      <trackback:ping>http://blogs.thesitedoctor.co.uk/tim/Trackback.aspx?guid=d1197af5-d41e-4cc0-85d5-8b12289fa009</trackback:ping>
      <pingback:server>http://blogs.thesitedoctor.co.uk/tim/pingback.aspx</pingback:server>
      <pingback:target>http://blogs.thesitedoctor.co.uk/tim/PermaLink,guid,d1197af5-d41e-4cc0-85d5-8b12289fa009.aspx</pingback:target>
      <dc:creator>Tim</dc:creator>
      <wfw:comment>http://blogs.thesitedoctor.co.uk/tim/CommentView,guid,d1197af5-d41e-4cc0-85d5-8b12289fa009.aspx</wfw:comment>
      <wfw:commentRss>http://blogs.thesitedoctor.co.uk/tim/SyndicationService.asmx/GetEntryCommentsRss?guid=d1197af5-d41e-4cc0-85d5-8b12289fa009</wfw:commentRss>
      <slash:comments>4</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Ok it might be a little less than half side but it's near enough. I've been sitting
on this for a while and needed to reference it for someone so I thought I'd post quickly
about it. One of the most common complaints about .Net is that you have a lot of hidden
"content" by the way of hidden inputs and the likes throughout your site. This can
easily get corrupt on postback/slowdown the page load times etc.
</p>
        <p>
Really you should be optimising each control on the page (enabling/disabling where
relevant) but if you want to cheat (lets face it, we all do):
</p>
        <ol>
          <li>
Download the files: <a href="http://blogs.thesitedoctor.co.uk/tim/files/PageStateAdapterv1.0.zip">PageStateAdapterv1.0.zip
(3KB)</a></li>
          <li>
Put PageStateAdapter.browser into your /App_Browsers/ folder (or create one and add
it) 
</li>
          <li>
Put TSDPageStateAdapter.dll into your website's /bin/ folder 
</li>
          <li>
Load up your website and checkout your ViewState :) 
</li>
        </ol>
        <p>
Incase you're interested in the source for it:
</p>
        <div class="code">
          <h2>PageStateAdapter.browser
</h2>
          <img align="top" src="http://blogs.sitedoc.co.uk/img/sc/clear.gif" />
          <span style="color: #0000ff">&lt;</span>
          <span style="color: #8b0000">browsers</span>
          <span style="color: #0000ff">&gt;</span>
          <br />
          <img align="top" src="http://blogs.sitedoc.co.uk/img/sc/clear.gif" />    <span style="color: #0000ff">&lt;</span><span style="color: #8b0000">browser</span><span style="color: #ff0000"> refID</span><span style="color: #8b0000">=</span><span style="color: #0000ff">"</span><span style="color: #0000ff">Default</span><span style="color: #0000ff">"</span><span style="color: #0000ff">&gt;</span><br /><img align="top" src="http://blogs.sitedoc.co.uk/img/sc/clear.gif" />        <span style="color: #0000ff">&lt;</span><span style="color: #8b0000">controlAdapters</span><span style="color: #0000ff">&gt;</span><br /><img align="top" src="http://blogs.sitedoc.co.uk/img/sc/clear.gif" />            <span style="color: #0000ff">&lt;</span><span style="color: #8b0000">adapter</span><span style="color: #ff0000"> controlType</span><span style="color: #8b0000">=</span><span style="color: #0000ff">"</span><span style="color: #0000ff">System.Web.UI.Page</span><span style="color: #0000ff">"</span><span style="color: #ff0000"> adapterType</span><span style="color: #8b0000">=</span><span style="color: #0000ff">"</span><span style="color: #0000ff">TheSiteDoctor.PageStateAdapter.PageStateAdapter</span><span style="color: #0000ff">"</span> <span style="color: #8b0000">/</span><span style="color: #0000ff">&gt;</span><br /><img align="top" src="http://blogs.sitedoc.co.uk/img/sc/clear.gif" />        <span style="color: #0000ff">&lt;</span><span style="color: #8b0000">/controlAdapters</span><span style="color: #0000ff">&gt;</span><br /><img align="top" src="http://blogs.sitedoc.co.uk/img/sc/clear.gif" />        <span style="color: #0000ff">&lt;</span><span style="color: #8b0000">capabilities</span><span style="color: #0000ff">&gt;</span><br /><img align="top" src="http://blogs.sitedoc.co.uk/img/sc/clear.gif" />            <span style="color: #0000ff">&lt;</span><span style="color: #8b0000">capability</span><span style="color: #ff0000"> name</span><span style="color: #8b0000">=</span><span style="color: #0000ff">"</span><span style="color: #0000ff">requiresControlStateInSession</span><span style="color: #0000ff">"</span><span style="color: #ff0000"> value</span><span style="color: #8b0000">=</span><span style="color: #0000ff">"</span><span style="color: #0000ff">true</span><span style="color: #0000ff">"</span> <span style="color: #8b0000">/</span><span style="color: #0000ff">&gt;</span><br /><img align="top" src="http://blogs.sitedoc.co.uk/img/sc/clear.gif" />        <span style="color: #0000ff">&lt;</span><span style="color: #8b0000">/capabilities</span><span style="color: #0000ff">&gt;</span><br /><img align="top" src="http://blogs.sitedoc.co.uk/img/sc/clear.gif" />    <span style="color: #0000ff">&lt;</span><span style="color: #8b0000">/browser</span><span style="color: #0000ff">&gt;</span><br /><img align="top" src="http://blogs.sitedoc.co.uk/img/sc/clear.gif" /><span style="color: #0000ff">&lt;</span><span style="color: #8b0000">/browsers</span><span style="color: #0000ff">&gt;</span></div>
        <div class="code">
          <h2>PageStateAdapter.cs
</h2>
          <img align="top" src="http://blogs.sitedoc.co.uk/img/sc/clear.gif" />
          <span style="color: #0000ff">using</span> System.Web.UI; 
<br /><img align="top" src="http://blogs.sitedoc.co.uk/img/sc/clear.gif" /><br /><img align="top" src="http://blogs.sitedoc.co.uk/img/sc/clear.gif" /><span style="color: #0000ff">namespace</span> TheSiteDoctor.PageStateAdapter 
<br /><div style="display: none" id="closed633755787600153334_4"><img onclick="showHideCodeDiv('633755787600153334_4', false)" align="top" src="http://blogs.sitedoc.co.uk/img/sc/PlusNoLines.gif" /><b><span style="color: #00008b">{...}</span></b></div><div style="display: block" id="open633755787600153334_4"><img onclick="showHideCodeDiv('633755787600153334_4', true)" align="top" src="http://blogs.sitedoc.co.uk/img/sc/minusNoTopLine.gif" />{ 
<br /><img align="top" src="http://blogs.sitedoc.co.uk/img/sc/I.gif" />    <span style="color: #0000ff">public
class</span> PageStateAdapter : System.Web.UI.Adapters.PageAdapter 
<br /><div style="display: none" id="closed633755787600153334_6"><img onclick="showHideCodeDiv('633755787600153334_6', false)" align="top" src="http://blogs.sitedoc.co.uk/img/sc/plus.gif" />    <b><span style="color: #00008b">{...}</span></b></div><div style="display: block" id="open633755787600153334_6"><img onclick="showHideCodeDiv('633755787600153334_6', true)" align="top" src="http://blogs.sitedoc.co.uk/img/sc/minus.gif" />   
{ 
<br /><img align="top" src="http://blogs.sitedoc.co.uk/img/sc/I.gif" />        <span style="color: #0000ff">public
override</span> PageStatePersister GetStatePersister() 
<br /><div style="display: none" id="closed633755787600153334_8"><img onclick="showHideCodeDiv('633755787600153334_8', false)" align="top" src="http://blogs.sitedoc.co.uk/img/sc/plus.gif" />        <b><span style="color: #00008b">{...}</span></b></div><div style="display: block" id="open633755787600153334_8"><img onclick="showHideCodeDiv('633755787600153334_8', true)" align="top" src="http://blogs.sitedoc.co.uk/img/sc/minus.gif" />       
{ 
<br /><img align="top" src="http://blogs.sitedoc.co.uk/img/sc/I.gif" />            <span style="color: #0000ff">return
new</span> SessionPageStatePersister(<span style="color: #0000ff">this</span>.Page); 
<br /><img align="top" src="http://blogs.sitedoc.co.uk/img/sc/L.gif" />       
}
</div><img align="top" src="http://blogs.sitedoc.co.uk/img/sc/L.gif" />   
}
</div><img align="top" src="http://blogs.sitedoc.co.uk/img/sc/L.gif" />}
</div></div>
        <p>
The best example of how much this reduces ViewState by is when you add a large DataGrid
to your site.
</p>
        <p>
Post files: <a href="http://blogs.thesitedoctor.co.uk/tim/files/PageStateAdapterv1.0.zip">PageStateAdapterv1.0.zip
(3KB)</a></p>
        <p>
          <strong>Update:</strong> Apologies to those of you who downloaded and found it wouldn't
compile, the .browser file was a little off (missing the second "PageStateAdapter").
I've updated it and changed the zip file download. Enjoy!
</p>
        <img width="0" height="0" src="http://blogs.thesitedoctor.co.uk/tim/aggbug.ashx?id=d1197af5-d41e-4cc0-85d5-8b12289fa009" />
      </body>
      <title>Quick ASP.Net tip: Half your page size in ASP.Net instantly</title>
      <guid isPermaLink="false">http://blogs.thesitedoctor.co.uk/tim/PermaLink,guid,d1197af5-d41e-4cc0-85d5-8b12289fa009.aspx</guid>
      <link>http://blogs.thesitedoctor.co.uk/tim/2009/04/17/Quick+ASPNet+Tip+Half+Your+Page+Size+In+ASPNet+Instantly.aspx</link>
      <pubDate>Fri, 17 Apr 2009 14:53:05 GMT</pubDate>
      <description>&lt;p&gt;
Ok it might be a little less than half side but it's near enough. I've been sitting
on this for a while and needed to reference it for someone so I thought I'd post quickly
about it. One of the most common complaints about .Net is that you have a lot of hidden
"content" by the way of hidden inputs and the likes throughout your site. This can
easily get corrupt on postback/slowdown the page load times etc.
&lt;/p&gt;
&lt;p&gt;
Really you should be optimising each control on the page (enabling/disabling where
relevant) but if you want to cheat (lets face it, we all do):
&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
Download the files: &lt;a href="http://blogs.thesitedoctor.co.uk/tim/files/PageStateAdapterv1.0.zip"&gt;PageStateAdapterv1.0.zip
(3KB)&lt;/a&gt; 
&lt;/li&gt;
&lt;li&gt;
Put PageStateAdapter.browser into your /App_Browsers/ folder (or create one and add
it) 
&lt;/li&gt;
&lt;li&gt;
Put TSDPageStateAdapter.dll into your website's /bin/ folder 
&lt;/li&gt;
&lt;li&gt;
Load up your website and checkout your ViewState :) 
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;
Incase you're interested in the source for it:
&lt;/p&gt;
&lt;div class="code"&gt;
&lt;h2&gt;PageStateAdapter.browser
&lt;/h2&gt;
&lt;img align="top" src="http://blogs.sitedoc.co.uk/img/sc/clear.gif" /&gt;&lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #8b0000"&gt;browsers&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt; 
&lt;br /&gt;
&lt;img align="top" src="http://blogs.sitedoc.co.uk/img/sc/clear.gif" /&gt;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #8b0000"&gt;browser&lt;/span&gt;&lt;span style="color: #ff0000"&gt; refID&lt;/span&gt;&lt;span style="color: #8b0000"&gt;=&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;quot;&lt;/span&gt;&lt;span style="color: #0000ff"&gt;Default&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;quot;&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt; 
&lt;br /&gt;
&lt;img align="top" src="http://blogs.sitedoc.co.uk/img/sc/clear.gif" /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #8b0000"&gt;controlAdapters&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt; 
&lt;br /&gt;
&lt;img align="top" src="http://blogs.sitedoc.co.uk/img/sc/clear.gif" /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #8b0000"&gt;adapter&lt;/span&gt;&lt;span style="color: #ff0000"&gt; controlType&lt;/span&gt;&lt;span style="color: #8b0000"&gt;=&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;quot;&lt;/span&gt;&lt;span style="color: #0000ff"&gt;System.Web.UI.Page&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;quot;&lt;/span&gt;&lt;span style="color: #ff0000"&gt; adapterType&lt;/span&gt;&lt;span style="color: #8b0000"&gt;=&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;quot;&lt;/span&gt;&lt;span style="color: #0000ff"&gt;TheSiteDoctor.PageStateAdapter.PageStateAdapter&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;quot;&lt;/span&gt;&amp;#160;&lt;span style="color: #8b0000"&gt;/&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt; 
&lt;br /&gt;
&lt;img align="top" src="http://blogs.sitedoc.co.uk/img/sc/clear.gif" /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #8b0000"&gt;/controlAdapters&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt; 
&lt;br /&gt;
&lt;img align="top" src="http://blogs.sitedoc.co.uk/img/sc/clear.gif" /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #8b0000"&gt;capabilities&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt; 
&lt;br /&gt;
&lt;img align="top" src="http://blogs.sitedoc.co.uk/img/sc/clear.gif" /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #8b0000"&gt;capability&lt;/span&gt;&lt;span style="color: #ff0000"&gt; name&lt;/span&gt;&lt;span style="color: #8b0000"&gt;=&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;quot;&lt;/span&gt;&lt;span style="color: #0000ff"&gt;requiresControlStateInSession&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;quot;&lt;/span&gt;&lt;span style="color: #ff0000"&gt; value&lt;/span&gt;&lt;span style="color: #8b0000"&gt;=&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;quot;&lt;/span&gt;&lt;span style="color: #0000ff"&gt;true&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;quot;&lt;/span&gt;&amp;#160;&lt;span style="color: #8b0000"&gt;/&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt; 
&lt;br /&gt;
&lt;img align="top" src="http://blogs.sitedoc.co.uk/img/sc/clear.gif" /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #8b0000"&gt;/capabilities&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt; 
&lt;br /&gt;
&lt;img align="top" src="http://blogs.sitedoc.co.uk/img/sc/clear.gif" /&gt;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #8b0000"&gt;/browser&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt; 
&lt;br /&gt;
&lt;img align="top" src="http://blogs.sitedoc.co.uk/img/sc/clear.gif" /&gt;&lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #8b0000"&gt;/browsers&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt; 
&lt;/div&gt;
&lt;div class="code"&gt;
&lt;h2&gt;PageStateAdapter.cs
&lt;/h2&gt;
&lt;img align="top" src="http://blogs.sitedoc.co.uk/img/sc/clear.gif" /&gt;&lt;span style="color: #0000ff"&gt;using&lt;/span&gt; System.Web.UI; 
&lt;br /&gt;
&lt;img align="top" src="http://blogs.sitedoc.co.uk/img/sc/clear.gif" /&gt; 
&lt;br /&gt;
&lt;img align="top" src="http://blogs.sitedoc.co.uk/img/sc/clear.gif" /&gt;&lt;span style="color: #0000ff"&gt;namespace&lt;/span&gt; TheSiteDoctor.PageStateAdapter 
&lt;br /&gt;
&lt;div style="display: none" id="closed633755787600153334_4"&gt;&lt;img onclick="showHideCodeDiv(&amp;#39;633755787600153334_4&amp;#39;, false)" align="top" src="http://blogs.sitedoc.co.uk/img/sc/PlusNoLines.gif" /&gt;&lt;b&gt;&lt;span style="color: #00008b"&gt;{...}&lt;/span&gt;&lt;/b&gt;
&lt;/div&gt;
&lt;div style="display: block" id="open633755787600153334_4"&gt;&lt;img onclick="showHideCodeDiv(&amp;#39;633755787600153334_4&amp;#39;, true)" align="top" src="http://blogs.sitedoc.co.uk/img/sc/minusNoTopLine.gif" /&gt;{ 
&lt;br /&gt;
&lt;img align="top" src="http://blogs.sitedoc.co.uk/img/sc/I.gif" /&gt;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color: #0000ff"&gt;public
class&lt;/span&gt; PageStateAdapter : System.Web.UI.Adapters.PageAdapter 
&lt;br /&gt;
&lt;div style="display: none" id="closed633755787600153334_6"&gt;&lt;img onclick="showHideCodeDiv(&amp;#39;633755787600153334_6&amp;#39;, false)" align="top" src="http://blogs.sitedoc.co.uk/img/sc/plus.gif" /&gt;&amp;#160;&amp;#160;&amp;#160; &lt;b&gt;&lt;span style="color: #00008b"&gt;{...}&lt;/span&gt;&lt;/b&gt;
&lt;/div&gt;
&lt;div style="display: block" id="open633755787600153334_6"&gt;&lt;img onclick="showHideCodeDiv(&amp;#39;633755787600153334_6&amp;#39;, true)" align="top" src="http://blogs.sitedoc.co.uk/img/sc/minus.gif" /&gt;&amp;#160;&amp;#160;&amp;#160;
{ 
&lt;br /&gt;
&lt;img align="top" src="http://blogs.sitedoc.co.uk/img/sc/I.gif" /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color: #0000ff"&gt;public
override&lt;/span&gt; PageStatePersister GetStatePersister() 
&lt;br /&gt;
&lt;div style="display: none" id="closed633755787600153334_8"&gt;&lt;img onclick="showHideCodeDiv(&amp;#39;633755787600153334_8&amp;#39;, false)" align="top" src="http://blogs.sitedoc.co.uk/img/sc/plus.gif" /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;b&gt;&lt;span style="color: #00008b"&gt;{...}&lt;/span&gt;&lt;/b&gt;
&lt;/div&gt;
&lt;div style="display: block" id="open633755787600153334_8"&gt;&lt;img onclick="showHideCodeDiv(&amp;#39;633755787600153334_8&amp;#39;, true)" align="top" src="http://blogs.sitedoc.co.uk/img/sc/minus.gif" /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;
{ 
&lt;br /&gt;
&lt;img align="top" src="http://blogs.sitedoc.co.uk/img/sc/I.gif" /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color: #0000ff"&gt;return
new&lt;/span&gt; SessionPageStatePersister(&lt;span style="color: #0000ff"&gt;this&lt;/span&gt;.Page); 
&lt;br /&gt;
&lt;img align="top" src="http://blogs.sitedoc.co.uk/img/sc/L.gif" /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;
}
&lt;/div&gt;
&lt;img align="top" src="http://blogs.sitedoc.co.uk/img/sc/L.gif" /&gt;&amp;#160;&amp;#160;&amp;#160;
}
&lt;/div&gt;
&lt;img align="top" src="http://blogs.sitedoc.co.uk/img/sc/L.gif" /&gt;}
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;
The best example of how much this reduces ViewState by is when you add a large DataGrid
to your site.
&lt;/p&gt;
&lt;p&gt;
Post files: &lt;a href="http://blogs.thesitedoctor.co.uk/tim/files/PageStateAdapterv1.0.zip"&gt;PageStateAdapterv1.0.zip
(3KB)&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;Update:&lt;/strong&gt; Apologies to those of you who downloaded and found it wouldn't
compile, the .browser file was a little off (missing the second "PageStateAdapter").
I've updated it and changed the zip file download. Enjoy!
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blogs.thesitedoctor.co.uk/tim/aggbug.ashx?id=d1197af5-d41e-4cc0-85d5-8b12289fa009" /&gt;</description>
      <comments>http://blogs.thesitedoctor.co.uk/tim/CommentView,guid,d1197af5-d41e-4cc0-85d5-8b12289fa009.aspx</comments>
      <category>ASP.Net</category>
      <category>C#</category>
      <category>Development</category>
      <category>The Site Doctor</category>
    </item>
    <item>
      <trackback:ping>http://blogs.thesitedoctor.co.uk/tim/Trackback.aspx?guid=f5dcc54e-dfbc-4f79-8bfa-0deeb31902d2</trackback:ping>
      <pingback:server>http://blogs.thesitedoctor.co.uk/tim/pingback.aspx</pingback:server>
      <pingback:target>http://blogs.thesitedoctor.co.uk/tim/PermaLink,guid,f5dcc54e-dfbc-4f79-8bfa-0deeb31902d2.aspx</pingback:target>
      <dc:creator>Tim</dc:creator>
      <wfw:comment>http://blogs.thesitedoctor.co.uk/tim/CommentView,guid,f5dcc54e-dfbc-4f79-8bfa-0deeb31902d2.aspx</wfw:comment>
      <wfw:commentRss>http://blogs.thesitedoctor.co.uk/tim/SyndicationService.asmx/GetEntryCommentsRss?guid=f5dcc54e-dfbc-4f79-8bfa-0deeb31902d2</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
A little irritation/time consuming process when you're working with multiple projects
on multiple drives/SVN repos/directories is to open the current file's location within
Windows Explorer. If you weren't already aware, you can do this from most projects/files
by right clicking on the project in the solution browser:
</p>
        <img height="95" src="http://blogs.thesitedoctor.co.uk/tim/img/OpenWindowsExplorerContext.png" width="236" />
        <p>
Problem for me (and my mate Chris) is that not only is it just for the Project Item
but more importantly it means using the mouse -which is something I'm trying to avoid
as much as possible. Then I stumbled across a couple of posts which suggested <a href="http://www.neilpullinger.co.uk/2008/03/open-visual-studio-project-folder-in.html">opening
Windows Explorer</a><a href="http://www.beyondweblogs.com/post/Open-Windows-Explorer-(with-current-project-files)-in-Visual-Studio-Tools-menu.aspx">with
Visual Studio's</a> External Tools dialog.
</p>
        <p>
They're both great ideas but you still need to use the mouse so I thought I'd take
the final step and wire up some keyboard shortcuts. I'll recap the process here as
I've added/grouped a few of their settings.
</p>
        <h2>Creating the "External Tools"
</h2>
        <p>
There's a little productivity tip here for setting the folder in question the root
of Windows Explorer, this encourages you to focus on just the work in question (though
it can be a little irritating sometimes so I may "undo" this change later.
</p>
        <h3>Custom #1: Open the current solution item in Windows Explorer
</h3>
        <p>
          <strong>Title:</strong> Windows Explorer - Item 
<br /><strong>Command:</strong> explorer.exe 
<br /><strong>Arguments:</strong> /select,"$(ItemPath)"
</p>
        <h3>Custom #2: Open the current Visual Studio project in Windows Explorer
</h3>
        <p>
          <strong>Title:</strong> Windows Explorer - Project Directory 
<br /><strong>Command:</strong> explorer.exe 
<br /><strong>Arguments:</strong> /root,"$(ProjectDir)"
</p>
        <h3>Custom #3: Open the current Visual Studio solution in Windows Explorer
</h3>
        <p>
We've got a number of projects that have useful files/folders stored in the same folder
as the solution file so this one's useful to get quick access to them, I think I'll
use this one a lot when dealing with SVN.
</p>
        <p>
          <strong>Title:</strong> Windows Explorer - Solution Directory 
<br /><strong>Command:</strong> explorer.exe 
<br /><strong>Arguments:</strong> /root,"$(SolutionDir)"
</p>
        <h3>Custom #4: Open the current solution's binary (bin) directory in Windows Explorer
</h3>
        <p>
Useful when you want to get access to the dll i.e. to copy to another folder/upload
just the dll to a website.
</p>
        <p>
          <strong>Title:</strong> Windows Explorer - Binary Directory 
<br /><strong>Command:</strong> explorer.exe 
<br /><strong>Arguments:</strong> "$(TargetDir)"
</p>
        <h3>Custom #5: Open the current solution's target build directory in Windows Explorer
</h3>
        <p>
This is useful when you have a project that builds to another directory (i.e. a common
DLL directory, I'm not sure how many people do this but I've got a couple of projects
that do this so I thought I'd share it).
</p>
        <p>
          <strong>Title:</strong> Windows Explorer - Target Directory 
<br /><strong>Command:</strong> explorer.exe 
<br /><strong>Arguments:</strong> "$(BinDir)"
</p>
        <p>
In all instances you can leave the <strong>Initial Directory</strong> field empty.
</p>
        <p>
          <strong>Note:</strong> On a couple of the directory related commands I've set the
"/root" argument, this is a useful little productivity tip I learn a while ago to
stop you navigating away from your work. Irritatingly I've not found a way of using
the /select and /root commands together. It would also be nice to say "Open the bin
folder and set the root to the project folder" but again I've not found a way.
</p>
        <p>
If you're interested in the arguments I'm using there, check out the <a href="http://support.microsoft.com/kb/307856">Microsoft
Support article about How To Customize the Windows Explorer Views in Windows XP</a> (these
also work in Vista). Alternatively you can read more about the <a href="http://msdn.microsoft.com/en-us/library/c02as0cs.aspx">Visual
Studio macros for build commands here</a> (some of which are global I believe). I'm
interested to see the use of $(TargetDir) as although it'll be useful for non-web
projects, however using <a href="http://weblogs.asp.net/scottgu/archive/2008/01/28/vs-2008-web-deployment-project-support-released.aspx">Web
Deployment Projects</a> might make it irrelevant for you.
</p>
        <p>
You should now have 5 new items in your Tools' toolbar:
</p>
        <p>
          <img height="187" src="http://blogs.thesitedoctor.co.uk/tim/img/NewToolsMenu_001.png" width="290" />
        </p>
        <h2>Wire up the keyboard shortcuts
</h2>
        <p>
As mentioned earlier, I want keyboard shortcuts but if you want toolbar icons, you
should checkout the <a href="http://www.neilpullinger.co.uk/2008/03/open-visual-studio-project-folder-in.html">end
of this post</a>.
</p>
        <p>
Open up the Keyboard settings within the Visual Studio Option dialog (Tools -&gt;
Options -&gt; Environment -&gt; Keyboard) -you may need to select the "Show all settings"
checkbox in the bottom left of the Options dialog to see the Keyboard option.
</p>
        <p>
In the <strong>Show commands containing</strong> field enter "Tools.ExternalCommand"
to list the set of commands, irritatingly it just labels each command as "Tools.ExternalCommand#"
for each command so this bit will require a little thinking on your behalf. My commands
are #2-6 (#1 is the Dotfuscator Community Edition command).
</p>
        <p>
I would then wire up the following shortcuts (I've set them up Globally for convenience):
</p>
        <p>
          <strong>
            <em>Tools.ExternalCommand2</em> (Current Item):</strong> Ctrl+E, I 
<br /><strong><em>Tools.ExternalCommand3</em> (Current Project):</strong> Ctrl+E, P 
<br /><strong><em>Tools.ExternalCommand4</em> (Current Solution):</strong> Ctrl+E, S 
<br /><strong><em>Tools.ExternalCommand5</em> (Bin dir):</strong> Ctrl+E, B 
<br /><strong><em>Tools.ExternalCommand6</em> (Target dir):</strong> Ctrl+E, T
</p>
        <p>
          <img height="428" src="http://blogs.thesitedoctor.co.uk/tim/img/KeyboardShortcuts.png" width="747" />
        </p>
        <p>
To enter these shortcuts simply press the first combination (in this case Ctrl+E),
then press the second key (I -item, P -project, S -solution, B -binary, T -target).
I found that a couple of these were already wired up to ReSharper and Pex which is
a pain but I don't tend to use those particular shortcuts so I just overrode them
</p>
        <p>
Now you should be able to press Ctrl+E followed by I and get your current item in
Explorer.
</p>
        <p>
It'd be nice if I could get it to use a single instance of Explorer and just refocus
the items (on another key combo as that's not always the desired action).
</p>
        <strong>Update:</strong> After using it a little, I've noticed that in my projects,
I had the Bin/TargetDir the wrong way around (now corrected).<img width="0" height="0" src="http://blogs.thesitedoctor.co.uk/tim/aggbug.ashx?id=f5dcc54e-dfbc-4f79-8bfa-0deeb31902d2" /></body>
      <title>Visual Studio Tip of the day: Open files/folders in Windows Explorer</title>
      <guid isPermaLink="false">http://blogs.thesitedoctor.co.uk/tim/PermaLink,guid,f5dcc54e-dfbc-4f79-8bfa-0deeb31902d2.aspx</guid>
      <link>http://blogs.thesitedoctor.co.uk/tim/2009/03/02/Visual+Studio+Tip+Of+The+Day+Open+Filesfolders+In+Windows+Explorer.aspx</link>
      <pubDate>Mon, 02 Mar 2009 11:09:25 GMT</pubDate>
      <description>&lt;p&gt;
A little irritation/time consuming process when you're working with multiple projects
on multiple drives/SVN repos/directories is to open the current file's location within
Windows Explorer. If you weren't already aware, you can do this from most projects/files
by right clicking on the project in the solution browser:
&lt;/p&gt;
&lt;img height="95" src="http://blogs.thesitedoctor.co.uk/tim/img/OpenWindowsExplorerContext.png" width="236" /&gt; 
&lt;p&gt;
Problem for me (and my mate Chris) is that not only is it just for the Project Item
but more importantly it means using the mouse -which is something I'm trying to avoid
as much as possible. Then I stumbled across a couple of posts which suggested &lt;a href="http://www.neilpullinger.co.uk/2008/03/open-visual-studio-project-folder-in.html"&gt;opening
Windows Explorer&lt;/a&gt; &lt;a href="http://www.beyondweblogs.com/post/Open-Windows-Explorer-(with-current-project-files)-in-Visual-Studio-Tools-menu.aspx"&gt;with
Visual Studio's&lt;/a&gt; External Tools dialog.
&lt;/p&gt;
&lt;p&gt;
They're both great ideas but you still need to use the mouse so I thought I'd take
the final step and wire up some keyboard shortcuts. I'll recap the process here as
I've added/grouped a few of their settings.
&lt;/p&gt;
&lt;h2&gt;Creating the "External Tools"
&lt;/h2&gt;
&lt;p&gt;
There's a little productivity tip here for setting the folder in question the root
of Windows Explorer, this encourages you to focus on just the work in question (though
it can be a little irritating sometimes so I may "undo" this change later.
&lt;/p&gt;
&lt;h3&gt;Custom #1: Open the current solution item in Windows Explorer
&lt;/h3&gt;
&lt;p&gt;
&lt;strong&gt;Title:&lt;/strong&gt; Windows Explorer - Item 
&lt;br /&gt;
&lt;strong&gt;Command:&lt;/strong&gt; explorer.exe 
&lt;br /&gt;
&lt;strong&gt;Arguments:&lt;/strong&gt; /select,&amp;quot;$(ItemPath)&amp;quot;
&lt;/p&gt;
&lt;h3&gt;Custom #2: Open the current Visual Studio project in Windows Explorer
&lt;/h3&gt;
&lt;p&gt;
&lt;strong&gt;Title:&lt;/strong&gt; Windows Explorer - Project Directory 
&lt;br /&gt;
&lt;strong&gt;Command:&lt;/strong&gt; explorer.exe 
&lt;br /&gt;
&lt;strong&gt;Arguments:&lt;/strong&gt; /root,&amp;quot;$(ProjectDir)&amp;quot;
&lt;/p&gt;
&lt;h3&gt;Custom #3: Open the current Visual Studio solution in Windows Explorer
&lt;/h3&gt;
&lt;p&gt;
We've got a number of projects that have useful files/folders stored in the same folder
as the solution file so this one's useful to get quick access to them, I think I'll
use this one a lot when dealing with SVN.
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;Title:&lt;/strong&gt; Windows Explorer - Solution Directory 
&lt;br /&gt;
&lt;strong&gt;Command:&lt;/strong&gt; explorer.exe 
&lt;br /&gt;
&lt;strong&gt;Arguments:&lt;/strong&gt; /root,&amp;quot;$(SolutionDir)&amp;quot;
&lt;/p&gt;
&lt;h3&gt;Custom #4: Open the current solution's binary (bin) directory in Windows Explorer
&lt;/h3&gt;
&lt;p&gt;
Useful when you want to get access to the dll i.e. to copy to another folder/upload
just the dll to a website.
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;Title:&lt;/strong&gt; Windows Explorer - Binary Directory 
&lt;br /&gt;
&lt;strong&gt;Command:&lt;/strong&gt; explorer.exe 
&lt;br /&gt;
&lt;strong&gt;Arguments:&lt;/strong&gt; &amp;quot;$(TargetDir)&amp;quot;
&lt;/p&gt;
&lt;h3&gt;Custom #5: Open the current solution's target build directory in Windows Explorer
&lt;/h3&gt;
&lt;p&gt;
This is useful when you have a project that builds to another directory (i.e. a common
DLL directory, I'm not sure how many people do this but I've got a couple of projects
that do this so I thought I'd share it).
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;Title:&lt;/strong&gt; Windows Explorer - Target Directory 
&lt;br /&gt;
&lt;strong&gt;Command:&lt;/strong&gt; explorer.exe 
&lt;br /&gt;
&lt;strong&gt;Arguments:&lt;/strong&gt; &amp;quot;$(BinDir)&amp;quot;
&lt;/p&gt;
&lt;p&gt;
In all instances you can leave the &lt;strong&gt;Initial Directory&lt;/strong&gt; field empty.
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;Note:&lt;/strong&gt; On a couple of the directory related commands I've set the
"/root" argument, this is a useful little productivity tip I learn a while ago to
stop you navigating away from your work. Irritatingly I've not found a way of using
the /select and /root commands together. It would also be nice to say "Open the bin
folder and set the root to the project folder" but again I've not found a way.
&lt;/p&gt;
&lt;p&gt;
If you're interested in the arguments I'm using there, check out the &lt;a href="http://support.microsoft.com/kb/307856"&gt;Microsoft
Support article about How To Customize the Windows Explorer Views in Windows XP&lt;/a&gt; (these
also work in Vista). Alternatively you can read more about the &lt;a href="http://msdn.microsoft.com/en-us/library/c02as0cs.aspx"&gt;Visual
Studio macros for build commands here&lt;/a&gt; (some of which are global I believe). I'm
interested to see the use of $(TargetDir) as although it'll be useful for non-web
projects, however using &lt;a href="http://weblogs.asp.net/scottgu/archive/2008/01/28/vs-2008-web-deployment-project-support-released.aspx"&gt;Web
Deployment Projects&lt;/a&gt; might make it irrelevant for you.
&lt;/p&gt;
&lt;p&gt;
You should now have 5 new items in your Tools' toolbar:
&lt;/p&gt;
&lt;p&gt;
&lt;img height="187" src="http://blogs.thesitedoctor.co.uk/tim/img/NewToolsMenu_001.png" width="290" /&gt;
&lt;/p&gt;
&lt;h2&gt;Wire up the keyboard shortcuts
&lt;/h2&gt;
&lt;p&gt;
As mentioned earlier, I want keyboard shortcuts but if you want toolbar icons, you
should checkout the &lt;a href="http://www.neilpullinger.co.uk/2008/03/open-visual-studio-project-folder-in.html"&gt;end
of this post&lt;/a&gt;.
&lt;/p&gt;
&lt;p&gt;
Open up the Keyboard settings within the Visual Studio Option dialog (Tools -&amp;gt;
Options -&amp;gt; Environment -&amp;gt; Keyboard) -you may need to select the "Show all settings"
checkbox in the bottom left of the Options dialog to see the Keyboard option.
&lt;/p&gt;
&lt;p&gt;
In the &lt;strong&gt;Show commands containing&lt;/strong&gt; field enter "Tools.ExternalCommand"
to list the set of commands, irritatingly it just labels each command as "Tools.ExternalCommand#"
for each command so this bit will require a little thinking on your behalf. My commands
are #2-6 (#1 is the Dotfuscator Community Edition command).
&lt;/p&gt;
&lt;p&gt;
I would then wire up the following shortcuts (I've set them up Globally for convenience):
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;&lt;em&gt;Tools.ExternalCommand2&lt;/em&gt; (Current Item):&lt;/strong&gt; Ctrl+E, I 
&lt;br /&gt;
&lt;strong&gt;&lt;em&gt;Tools.ExternalCommand3&lt;/em&gt; (Current Project):&lt;/strong&gt; Ctrl+E, P 
&lt;br /&gt;
&lt;strong&gt;&lt;em&gt;Tools.ExternalCommand4&lt;/em&gt; (Current Solution):&lt;/strong&gt; Ctrl+E, S 
&lt;br /&gt;
&lt;strong&gt;&lt;em&gt;Tools.ExternalCommand5&lt;/em&gt; (Bin dir):&lt;/strong&gt; Ctrl+E, B 
&lt;br /&gt;
&lt;strong&gt;&lt;em&gt;Tools.ExternalCommand6&lt;/em&gt; (Target dir):&lt;/strong&gt; Ctrl+E, T
&lt;/p&gt;
&lt;p&gt;
&lt;img height="428" src="http://blogs.thesitedoctor.co.uk/tim/img/KeyboardShortcuts.png" width="747" /&gt;
&lt;/p&gt;
&lt;p&gt;
To enter these shortcuts simply press the first combination (in this case Ctrl+E),
then press the second key (I -item, P -project, S -solution, B -binary, T -target).
I found that a couple of these were already wired up to ReSharper and Pex which is
a pain but I don't tend to use those particular shortcuts so I just overrode them
&lt;/p&gt;
&lt;p&gt;
Now you should be able to press Ctrl+E followed by I and get your current item in
Explorer.
&lt;/p&gt;
&lt;p&gt;
It'd be nice if I could get it to use a single instance of Explorer and just refocus
the items (on another key combo as that's not always the desired action).
&lt;/p&gt;
&lt;strong&gt;Update:&lt;/strong&gt; After using it a little, I've noticed that in my projects,
I had the Bin/TargetDir the wrong way around (now corrected).&lt;img width="0" height="0" src="http://blogs.thesitedoctor.co.uk/tim/aggbug.ashx?id=f5dcc54e-dfbc-4f79-8bfa-0deeb31902d2" /&gt;</description>
      <comments>http://blogs.thesitedoctor.co.uk/tim/CommentView,guid,f5dcc54e-dfbc-4f79-8bfa-0deeb31902d2.aspx</comments>
      <category>Productivity</category>
      <category>Software/Visual Studio</category>
      <category>The Site Doctor</category>
      <category>Web Development</category>
    </item>
  </channel>
</rss>