<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-6463343857615764564</id><updated>2011-07-07T04:15:55.351-07:00</updated><category term='Dictionaries'/><title type='text'>Software Simians</title><subtitle type='html'>Ramblings in C#</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://simiansoftware.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6463343857615764564/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://simiansoftware.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>CodeMonkey</name><uri>http://www.blogger.com/profile/04940025489236520116</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>26</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-6463343857615764564.post-6962457910357725679</id><published>2009-05-02T14:58:00.001-07:00</published><updated>2009-05-02T14:58:31.459-07:00</updated><title type='text'>Google Chrome and XABP applications</title><content type='html'>&lt;p&gt;If like me you don’t use Internet Explorer you will need this little tip. In order to get WPF applications to work in Google Chrome; simply add this to your PATH environment variables.&lt;/p&gt;  &lt;p&gt;c:\Program Files\Mozilla Firefox&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6463343857615764564-6962457910357725679?l=simiansoftware.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://simiansoftware.blogspot.com/feeds/6962457910357725679/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6463343857615764564&amp;postID=6962457910357725679' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6463343857615764564/posts/default/6962457910357725679'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6463343857615764564/posts/default/6962457910357725679'/><link rel='alternate' type='text/html' href='http://simiansoftware.blogspot.com/2009/05/google-chrome-and-xabp-applications.html' title='Google Chrome and XABP applications'/><author><name>CodeMonkey</name><uri>http://www.blogger.com/profile/04940025489236520116</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6463343857615764564.post-906950787900136737</id><published>2009-04-30T03:47:00.001-07:00</published><updated>2009-04-30T03:47:20.963-07:00</updated><title type='text'>Fix to install .Net 3.5 on Windows Server 2008 - 80073712</title><content type='html'>&lt;p&gt;I have spent about four frustrating hours trying to get my Server 2008 to have the latest .Net on it. After trying to install the dontnetfx35.exe manually and it failing and reading the Microsoft blog that I should install a hot fox and if that failed I should repair my whole installation. So dutifully I did this; still the same problem!!&lt;/p&gt;  &lt;p&gt;So I stuck with it and followed the “&lt;a href="http://support.microsoft.com/kb/947821" target="_blank"&gt;System Update Readiness Tool&lt;/a&gt;” and let it scan my component store. Whilst it was doing this I learnt about the new way that Vista and Server 2008 handle OS updates &lt;a href="http://blogs.technet.com/askperf/archive/2008/04/23/understanding-component-based-servicing.aspx" target="_blank"&gt;here&lt;/a&gt;. After the tool had run I followed the instructions and looked in the log files for any errors and low and behold it told me that it was missing a manifest with wcf, which I thought would be the reason why it could not install the latest .Net.&lt;/p&gt;  &lt;p&gt;After reading Aaron’s blog “&lt;a href="http://blogs.msdn.com/astebner/archive/2009/03/12/9472695.aspx" target="_blank"&gt;Steps I use to narrow down an OS update installation failure on Windows Vista and higher&lt;/a&gt;”, I looked at all of the logs and found that mine was failing because it stated that&lt;/p&gt;  &lt;p&gt;&lt;em&gt;DepCheck indicates Microsoft .NET Framework 2.0SP1 (x86) (CBS) is not installed&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;So armed with this looking in the registry (from Aarons post), I find the missing package that should have installed the wcf manifest and it gives me a Microsoft Knowledge Base (KB958481). Now I need to install MSU into Windows 2008 as it is not liking the MSI’s as they have blocks in them in order to check what version they are being installed on. But if you look at this update for dotnetfx35 you will see that it is made up of three separate updates – one of them .Net 2.0 which I need. You can download this &lt;a href="http://www.microsoft.com/downloads/details.aspx?familyid=B9DE7937-2C12-4F16-AD66-A31B83931953&amp;amp;displaylang=en" target="_blank"&gt;here&lt;/a&gt;. So I install these two standalone patches and re-run the CRU check (1st stage). It has removed my six missing dotnet manifests, but added a whole bunch of new ones!&lt;/p&gt;  &lt;p&gt;I need .Net 3.5 on this machine as I want to put SQL Server on this machine and I am getting frustrated as this has been about 6 hours! Then a brainwave, what about the Visual Studio WCU (Windows Component Update), so I stick the Visual Studio 2008 DVD and navigate to &lt;/p&gt;  &lt;p&gt;The best resource I found for Server 2008 setup steps&lt;/p&gt;  &lt;p&gt;&lt;a href="http://technet.microsoft.com/en-us/library/cc753802.aspx"&gt;http://technet.microsoft.com/en-us/library/cc753802.aspx&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Ok – After all of this – the simple thing to prevent all of this is not to setup IIS before you have installed the dotnet3.5 service pack on Windows Update. I found the best way to solve all of this was to just re-install the operating system. Leave it running over night and INSTALL WINDOWS UPDATES as the very first thing&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6463343857615764564-906950787900136737?l=simiansoftware.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://simiansoftware.blogspot.com/feeds/906950787900136737/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6463343857615764564&amp;postID=906950787900136737' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6463343857615764564/posts/default/906950787900136737'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6463343857615764564/posts/default/906950787900136737'/><link rel='alternate' type='text/html' href='http://simiansoftware.blogspot.com/2009/04/fix-to-install-net-35-on-windows-server.html' title='Fix to install .Net 3.5 on Windows Server 2008 - 80073712'/><author><name>CodeMonkey</name><uri>http://www.blogger.com/profile/04940025489236520116</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6463343857615764564.post-2869374357578070289</id><published>2009-04-30T03:38:00.001-07:00</published><updated>2009-04-30T03:38:34.317-07:00</updated><title type='text'>TFS 2008 problem creating Team Project. TF30171</title><content type='html'>&lt;p&gt;I was attempting to create a new Team Project in TFS and it would not let me TF30177. So I realised I had an orphan project laying around.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://social.msdn.microsoft.com/Forums/en-US/tfsadmin/thread/8522cfdf-83de-4974-9496-88b9b0b0612f" target="_blank"&gt;How to delete a Team Project from TFS 2008 from TFS&lt;/a&gt; which was fine, but I still had the Sharepoint project. So &lt;a href="http://social.msdn.microsoft.com/Forums/en-US/tfsgeneral/thread/9ee1b6c3-c33f-4218-aa0d-e777cc293e70" target="_blank"&gt;here&lt;/a&gt; is how to get rid of that too.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6463343857615764564-2869374357578070289?l=simiansoftware.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://simiansoftware.blogspot.com/feeds/2869374357578070289/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6463343857615764564&amp;postID=2869374357578070289' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6463343857615764564/posts/default/2869374357578070289'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6463343857615764564/posts/default/2869374357578070289'/><link rel='alternate' type='text/html' href='http://simiansoftware.blogspot.com/2009/04/tfs-2008-problem-creating-team-project.html' title='TFS 2008 problem creating Team Project. TF30171'/><author><name>CodeMonkey</name><uri>http://www.blogger.com/profile/04940025489236520116</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6463343857615764564.post-3582196203890782517</id><published>2009-04-27T10:56:00.001-07:00</published><updated>2009-04-27T10:56:11.619-07:00</updated><title type='text'>TFS 2008 SP1, WSS3.0 SP1 and SQL Server Express 2008 on Windows 2008 – Won’t work!</title><content type='html'>&lt;ul&gt;   &lt;li&gt;TFS 2008 SP1 will not work with SQL Express 2008 as Express does not have Agent enabled.&lt;/li&gt;    &lt;li&gt;You cannot upgrade from Express 2008 to the Standard 2008 as the setup program uses the shell of the installed instance. Instead you have to remove all instances (you can leave the shared tools installed) and then re-run setup from you Standard 2008 setup program&lt;/li&gt;    &lt;li&gt;When TFS 2008 SP1 installs it assumes that your Analysis Service is on the default sql instance – mine wasn’t. You will need &lt;a href="http://blogs.msdn.com/sudhir/archive/2007/05/30/analysis-services-flexibility.aspx" target="_blank"&gt;this&lt;/a&gt; to change your TFS setup to work.&lt;/li&gt;    &lt;li&gt;It’s always wise to check that your client is Sql 2008 when you decide to install your server with no interface. I decided to have a light weight server and then had to upgrade my laptop as SQL Server 2005 obviously can’t connect to SQL Server 2008.&lt;/li&gt;    &lt;li&gt;SQL Server 2008 shared tools need SP1 of Visual Studio installed!&lt;/li&gt;    &lt;li&gt;You need over 3GB to install the Service Pack and that isn’t going to happen when you only have 2Gb free&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;What a bloody brilliant afternoon today has been!&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6463343857615764564-3582196203890782517?l=simiansoftware.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://simiansoftware.blogspot.com/feeds/3582196203890782517/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6463343857615764564&amp;postID=3582196203890782517' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6463343857615764564/posts/default/3582196203890782517'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6463343857615764564/posts/default/3582196203890782517'/><link rel='alternate' type='text/html' href='http://simiansoftware.blogspot.com/2009/04/tfs-2008-sp1-wss30-sp1-and-sql-server.html' title='TFS 2008 SP1, WSS3.0 SP1 and SQL Server Express 2008 on Windows 2008 – Won’t work!'/><author><name>CodeMonkey</name><uri>http://www.blogger.com/profile/04940025489236520116</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6463343857615764564.post-1672628342168720060</id><published>2009-04-25T16:21:00.001-07:00</published><updated>2009-04-25T16:21:49.375-07:00</updated><title type='text'>Sql Server 2008 and Windows Server Core 2008</title><content type='html'>&lt;p&gt;I have just spent a few happy days investigating Server Core and was looking forward to have a clean OS with no Internet Explorer. However I never realised that .Net would be able to be installed on this version of the Operating System. How crazy is that?!?! So you can have a nice IIS webserver running PHP, but then not run ASP.NET apps? That is ludicrous!&lt;/p&gt;  &lt;p&gt;For more info: &lt;a href="http://blog.namwarrizvi.com/?p=152"&gt;http://blog.namwarrizvi.com/?p=152&lt;/a&gt;&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6463343857615764564-1672628342168720060?l=simiansoftware.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://simiansoftware.blogspot.com/feeds/1672628342168720060/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6463343857615764564&amp;postID=1672628342168720060' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6463343857615764564/posts/default/1672628342168720060'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6463343857615764564/posts/default/1672628342168720060'/><link rel='alternate' type='text/html' href='http://simiansoftware.blogspot.com/2009/04/sql-server-2008-and-windows-server-core.html' title='Sql Server 2008 and Windows Server Core 2008'/><author><name>CodeMonkey</name><uri>http://www.blogger.com/profile/04940025489236520116</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6463343857615764564.post-7726352176332041795</id><published>2009-04-25T16:13:00.001-07:00</published><updated>2009-04-25T16:13:24.838-07:00</updated><title type='text'>Backing up new Server 2008 Core – missing wbadmin</title><content type='html'>&lt;p&gt;Whilst I was playing with this server, I was interested in having a baseline image of my server as I played with the new features. However everything I read said that I could use WBADMIN to run a backup. I typed it from the command line and it wasn’t there!&lt;/p&gt;  &lt;p&gt;So whilst doing some searching about IIS I came across the solution. I saw this &lt;a href="http://social.technet.microsoft.com/Forums/en-US/systemcenter/thread/a398ce20-1b76-4b72-a39d-7a1e8132902e" target="_blank"&gt;post&lt;/a&gt; about Role Management Tool. &lt;/p&gt;  &lt;p&gt;So I ran &lt;/p&gt;  &lt;pre class="csharpcode"&gt;ocsetup WindowsServerBackup&lt;/pre&gt;&lt;br /&gt;&lt;style type="text/css"&gt;&lt;br /&gt;.csharpcode, .csharpcode pre&lt;br /&gt;{&lt;br /&gt;	font-size: small;&lt;br /&gt;	color: black;&lt;br /&gt;	font-family: consolas, "Courier New", courier, monospace;&lt;br /&gt;	background-color: #ffffff;&lt;br /&gt;	/*white-space: pre;*/&lt;br /&gt;}&lt;br /&gt;.csharpcode pre { margin: 0em; }&lt;br /&gt;.csharpcode .rem { color: #008000; }&lt;br /&gt;.csharpcode .kwrd { color: #0000ff; }&lt;br /&gt;.csharpcode .str { color: #006080; }&lt;br /&gt;.csharpcode .op { color: #0000c0; }&lt;br /&gt;.csharpcode .preproc { color: #cc6633; }&lt;br /&gt;.csharpcode .asp { background-color: #ffff00; }&lt;br /&gt;.csharpcode .html { color: #800000; }&lt;br /&gt;.csharpcode .attr { color: #ff0000; }&lt;br /&gt;.csharpcode .alt &lt;br /&gt;{&lt;br /&gt;	background-color: #f4f4f4;&lt;br /&gt;	width: 100%;&lt;br /&gt;	margin: 0em;&lt;br /&gt;}&lt;br /&gt;.csharpcode .lnum { color: #606060; }&lt;/style&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;Once the Component setup has installed it you can now use &lt;a href="http://technet.microsoft.com/en-us/library/cc742070.aspx" target="_blank"&gt;WBADMIN&lt;/a&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre class="csharpcode"&gt;wbadmin start systemstatebackup –backuptarget:e&lt;/pre&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6463343857615764564-7726352176332041795?l=simiansoftware.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://simiansoftware.blogspot.com/feeds/7726352176332041795/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6463343857615764564&amp;postID=7726352176332041795' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6463343857615764564/posts/default/7726352176332041795'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6463343857615764564/posts/default/7726352176332041795'/><link rel='alternate' type='text/html' href='http://simiansoftware.blogspot.com/2009/04/backing-up-new-server-2008-core-missing.html' title='Backing up new Server 2008 Core – missing wbadmin'/><author><name>CodeMonkey</name><uri>http://www.blogger.com/profile/04940025489236520116</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6463343857615764564.post-8868515398645668064</id><published>2009-04-25T11:21:00.001-07:00</published><updated>2009-04-25T11:21:29.744-07:00</updated><title type='text'>Windows Server Core 2008: First steps - configuring for remote desktop</title><content type='html'>&lt;p&gt;From a previous post you will see that I destroyed all my servers and started to learn something about Windows 2008. So now my new 2x512Mb RAM sticks have arrived for my &lt;a href="http://simiansoftware.blogspot.com/2009/03/rebuilding-all-my-personal-computers.html" target="_blank"&gt;K7N420 Pro Motherboard&lt;/a&gt;. Now I could load Windows 2008 on it as the minimum is 512Mb RAM for this OS. I thought let’s install the new “Server Core System”, which to be fair was extremely quick to install and had me with a log on screen quite quickly.&lt;/p&gt;  &lt;p&gt;However, I log in, change the password (its blank as default) and then suddenly release I don’t even have a GUI. Cool I thought, I only want this server to run a DB and TFS Server. So let’s configure it.&lt;/p&gt;  &lt;p&gt;1) Let’s give it a name, type the following in the command window&lt;/p&gt;  &lt;div class="csharpcode"&gt;   &lt;pre class="alt"&gt;hostname&lt;/pre&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;style type="text/css"&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;.csharpcode, .csharpcode pre&lt;br /&gt;{&lt;br /&gt;	font-size: small;&lt;br /&gt;	color: black;&lt;br /&gt;	font-family: consolas, "Courier New", courier, monospace;&lt;br /&gt;	background-color: #ffffff;&lt;br /&gt;	/*white-space: pre;*/&lt;br /&gt;}&lt;br /&gt;.csharpcode pre { margin: 0em; }&lt;br /&gt;.csharpcode .rem { color: #008000; }&lt;br /&gt;.csharpcode .kwrd { color: #0000ff; }&lt;br /&gt;.csharpcode .str { color: #006080; }&lt;br /&gt;.csharpcode .op { color: #0000c0; }&lt;br /&gt;.csharpcode .preproc { color: #cc6633; }&lt;br /&gt;.csharpcode .asp { background-color: #ffff00; }&lt;br /&gt;.csharpcode .html { color: #800000; }&lt;br /&gt;.csharpcode .attr { color: #ff0000; }&lt;br /&gt;.csharpcode .alt &lt;br /&gt;{&lt;br /&gt;	background-color: #f4f4f4;&lt;br /&gt;	width: 100%;&lt;br /&gt;	margin: 0em;&lt;br /&gt;}&lt;br /&gt;.csharpcode .lnum { color: #606060; }&lt;/style&gt;which should give you something daft like&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="csharpcode"&gt;&lt;br /&gt;  &lt;pre class="alt"&gt;win-egmik5j3f4m&lt;/pre&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;style type="text/css"&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;.csharpcode, .csharpcode pre&lt;br /&gt;{&lt;br /&gt;	font-size: small;&lt;br /&gt;	color: black;&lt;br /&gt;	font-family: consolas, "Courier New", courier, monospace;&lt;br /&gt;	background-color: #ffffff;&lt;br /&gt;	/*white-space: pre;*/&lt;br /&gt;}&lt;br /&gt;.csharpcode pre { margin: 0em; }&lt;br /&gt;.csharpcode .rem { color: #008000; }&lt;br /&gt;.csharpcode .kwrd { color: #0000ff; }&lt;br /&gt;.csharpcode .str { color: #006080; }&lt;br /&gt;.csharpcode .op { color: #0000c0; }&lt;br /&gt;.csharpcode .preproc { color: #cc6633; }&lt;br /&gt;.csharpcode .asp { background-color: #ffff00; }&lt;br /&gt;.csharpcode .html { color: #800000; }&lt;br /&gt;.csharpcode .attr { color: #ff0000; }&lt;br /&gt;.csharpcode .alt &lt;br /&gt;{&lt;br /&gt;	background-color: #f4f4f4;&lt;br /&gt;	width: 100%;&lt;br /&gt;	margin: 0em;&lt;br /&gt;}&lt;br /&gt;.csharpcode .lnum { color: #606060; }&lt;/style&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;Not exactly the best machine name, so type the following (where Simain is going to be my machine name). I always like to reboot after a name change (old habits!)&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre class="csharpcode"&gt;netdom renamecomputer win-egmik5j3f4m /NewName:Simian /REBoot&lt;/pre&gt;&lt;br /&gt;&lt;style type="text/css"&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;.csharpcode, .csharpcode pre&lt;br /&gt;{&lt;br /&gt;	font-size: small;&lt;br /&gt;	color: black;&lt;br /&gt;	font-family: consolas, "Courier New", courier, monospace;&lt;br /&gt;	background-color: #ffffff;&lt;br /&gt;	/*white-space: pre;*/&lt;br /&gt;}&lt;br /&gt;.csharpcode pre { margin: 0em; }&lt;br /&gt;.csharpcode .rem { color: #008000; }&lt;br /&gt;.csharpcode .kwrd { color: #0000ff; }&lt;br /&gt;.csharpcode .str { color: #006080; }&lt;br /&gt;.csharpcode .op { color: #0000c0; }&lt;br /&gt;.csharpcode .preproc { color: #cc6633; }&lt;br /&gt;.csharpcode .asp { background-color: #ffff00; }&lt;br /&gt;.csharpcode .html { color: #800000; }&lt;br /&gt;.csharpcode .attr { color: #ff0000; }&lt;br /&gt;.csharpcode .alt &lt;br /&gt;{&lt;br /&gt;	background-color: #f4f4f4;&lt;br /&gt;	width: 100%;&lt;br /&gt;	margin: 0em;&lt;br /&gt;}&lt;br /&gt;.csharpcode .lnum { color: #606060; }&lt;/style&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;2) Next I check the network settings so that I can use the GUI of my laptop, so I check the settings&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre class="csharpcode"&gt;ipconfig /all&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;and notice that there are no IP addresses or no network configured at all. So next lets see what interfaces are defined.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre class="csharpcode"&gt;netsh interface ipv4 show interfaces&lt;/pre&gt;&lt;br /&gt;&lt;style type="text/css"&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;.csharpcode, .csharpcode pre&lt;br /&gt;{&lt;br /&gt;	font-size: small;&lt;br /&gt;	color: black;&lt;br /&gt;	font-family: consolas, "Courier New", courier, monospace;&lt;br /&gt;	background-color: #ffffff;&lt;br /&gt;	/*white-space: pre;*/&lt;br /&gt;}&lt;br /&gt;.csharpcode pre { margin: 0em; }&lt;br /&gt;.csharpcode .rem { color: #008000; }&lt;br /&gt;.csharpcode .kwrd { color: #0000ff; }&lt;br /&gt;.csharpcode .str { color: #006080; }&lt;br /&gt;.csharpcode .op { color: #0000c0; }&lt;br /&gt;.csharpcode .preproc { color: #cc6633; }&lt;br /&gt;.csharpcode .asp { background-color: #ffff00; }&lt;br /&gt;.csharpcode .html { color: #800000; }&lt;br /&gt;.csharpcode .attr { color: #ff0000; }&lt;br /&gt;.csharpcode .alt &lt;br /&gt;{&lt;br /&gt;	background-color: #f4f4f4;&lt;br /&gt;	width: 100%;&lt;br /&gt;	margin: 0em;&lt;br /&gt;}&lt;br /&gt;.csharpcode .lnum { color: #606060; }&lt;/style&gt;&lt;style type="text/css"&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;.csharpcode, .csharpcode pre&lt;br /&gt;{&lt;br /&gt;	font-size: small;&lt;br /&gt;	color: black;&lt;br /&gt;	font-family: consolas, "Courier New", courier, monospace;&lt;br /&gt;	background-color: #ffffff;&lt;br /&gt;	/*white-space: pre;*/&lt;br /&gt;}&lt;br /&gt;.csharpcode pre { margin: 0em; }&lt;br /&gt;.csharpcode .rem { color: #008000; }&lt;br /&gt;.csharpcode .kwrd { color: #0000ff; }&lt;br /&gt;.csharpcode .str { color: #006080; }&lt;br /&gt;.csharpcode .op { color: #0000c0; }&lt;br /&gt;.csharpcode .preproc { color: #cc6633; }&lt;br /&gt;.csharpcode .asp { background-color: #ffff00; }&lt;br /&gt;.csharpcode .html { color: #800000; }&lt;br /&gt;.csharpcode .attr { color: #ff0000; }&lt;br /&gt;.csharpcode .alt &lt;br /&gt;{&lt;br /&gt;	background-color: #f4f4f4;&lt;br /&gt;	width: 100%;&lt;br /&gt;	margin: 0em;&lt;br /&gt;}&lt;br /&gt;.csharpcode .lnum { color: #606060; }&lt;/style&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;So this tells me I have “Local Area Connection” and some Loopback pseudo interface. Make a note of the index of your interface as you will need it later&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;Now I assume that I need to configure the Local Area Connection as it states it is DHCP, and I wanted my server to have a static IP.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre class="csharpcode"&gt;netsh interface ipv4 set address name=&amp;quot;Local Area Connection&amp;quot; &lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre class="csharpcode"&gt;source=static address=192.168.2.2 mask=255.255.255.0 gateway=192.168.2.1&lt;/pre&gt;&lt;br /&gt;&lt;style type="text/css"&gt;&lt;br /&gt;.csharpcode, .csharpcode pre&lt;br /&gt;{&lt;br /&gt;	font-size: small;&lt;br /&gt;	color: black;&lt;br /&gt;	font-family: consolas, "Courier New", courier, monospace;&lt;br /&gt;	background-color: #ffffff;&lt;br /&gt;	/*white-space: pre;*/&lt;br /&gt;}&lt;br /&gt;.csharpcode pre { margin: 0em; }&lt;br /&gt;.csharpcode .rem { color: #008000; }&lt;br /&gt;.csharpcode .kwrd { color: #0000ff; }&lt;br /&gt;.csharpcode .str { color: #006080; }&lt;br /&gt;.csharpcode .op { color: #0000c0; }&lt;br /&gt;.csharpcode .preproc { color: #cc6633; }&lt;br /&gt;.csharpcode .asp { background-color: #ffff00; }&lt;br /&gt;.csharpcode .html { color: #800000; }&lt;br /&gt;.csharpcode .attr { color: #ff0000; }&lt;br /&gt;.csharpcode .alt &lt;br /&gt;{&lt;br /&gt;	background-color: #f4f4f4;&lt;br /&gt;	width: 100%;&lt;br /&gt;	margin: 0em;&lt;br /&gt;}&lt;br /&gt;.csharpcode .lnum { color: #606060; }&lt;/style&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;After this the ‘DHCP Enabled’ setting in ipconfig /all has changed to No. So the next step is to add the DNS, for this you need the index from earlier&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre class="csharpcode"&gt;netsh interface ipv4 add dnsserver name=&amp;quot;Local Area Connection&amp;quot; address=192.168.2.1 index=2&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;style type="text/css"&gt;&lt;br /&gt;.csharpcode, .csharpcode pre&lt;br /&gt;{&lt;br /&gt;	font-size: small;&lt;br /&gt;	color: black;&lt;br /&gt;	font-family: consolas, "Courier New", courier, monospace;&lt;br /&gt;	background-color: #ffffff;&lt;br /&gt;	/*white-space: pre;*/&lt;br /&gt;}&lt;br /&gt;.csharpcode pre { margin: 0em; }&lt;br /&gt;.csharpcode .rem { color: #008000; }&lt;br /&gt;.csharpcode .kwrd { color: #0000ff; }&lt;br /&gt;.csharpcode .str { color: #006080; }&lt;br /&gt;.csharpcode .op { color: #0000c0; }&lt;br /&gt;.csharpcode .preproc { color: #cc6633; }&lt;br /&gt;.csharpcode .asp { background-color: #ffff00; }&lt;br /&gt;.csharpcode .html { color: #800000; }&lt;br /&gt;.csharpcode .attr { color: #ff0000; }&lt;br /&gt;.csharpcode .alt &lt;br /&gt;{&lt;br /&gt;	background-color: #f4f4f4;&lt;br /&gt;	width: 100%;&lt;br /&gt;	margin: 0em;&lt;br /&gt;}&lt;br /&gt;.csharpcode .lnum { color: #606060; }&lt;/style&gt;Now all I have to do is change my DHCP server to give out IP from a range of 3 onwards, so that I never get a conflict.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;So, now I have a machine on the network, I want to unplug all the peripherals and connect to it via Remote Desktop (mstsc). Let’s tell the registry and the firewall to allow remote desktop connections.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre class="csharpcode"&gt;cscript C:'Windows'System32'Scregedit.wsf /ar 0&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre class="csharpcode"&gt;netsh advfirewall firewall set rule group=&amp;quot;Remote Desktop&amp;quot; new enable=yes&lt;/pre&gt;&lt;br /&gt;&lt;style type="text/css"&gt;&lt;br /&gt;.csharpcode, .csharpcode pre&lt;br /&gt;{&lt;br /&gt;	font-size: small;&lt;br /&gt;	color: black;&lt;br /&gt;	font-family: consolas, "Courier New", courier, monospace;&lt;br /&gt;	background-color: #ffffff;&lt;br /&gt;	/*white-space: pre;*/&lt;br /&gt;}&lt;br /&gt;.csharpcode pre { margin: 0em; }&lt;br /&gt;.csharpcode .rem { color: #008000; }&lt;br /&gt;.csharpcode .kwrd { color: #0000ff; }&lt;br /&gt;.csharpcode .str { color: #006080; }&lt;br /&gt;.csharpcode .op { color: #0000c0; }&lt;br /&gt;.csharpcode .preproc { color: #cc6633; }&lt;br /&gt;.csharpcode .asp { background-color: #ffff00; }&lt;br /&gt;.csharpcode .html { color: #800000; }&lt;br /&gt;.csharpcode .attr { color: #ff0000; }&lt;br /&gt;.csharpcode .alt &lt;br /&gt;{&lt;br /&gt;	background-color: #f4f4f4;&lt;br /&gt;	width: 100%;&lt;br /&gt;	margin: 0em;&lt;br /&gt;}&lt;br /&gt;.csharpcode .lnum { color: #606060; }&lt;/style&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;Now I can use my server like a true remote server on my network.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt; For further information please see &lt;a href="http://www.petri.co.il/understanding-windows-server-2008-core.htm" target="_blank"&gt;here&lt;/a&gt;.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6463343857615764564-8868515398645668064?l=simiansoftware.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://simiansoftware.blogspot.com/feeds/8868515398645668064/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6463343857615764564&amp;postID=8868515398645668064' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6463343857615764564/posts/default/8868515398645668064'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6463343857615764564/posts/default/8868515398645668064'/><link rel='alternate' type='text/html' href='http://simiansoftware.blogspot.com/2009/04/windows-server-core-2008-first-steps.html' title='Windows Server Core 2008: First steps - configuring for remote desktop'/><author><name>CodeMonkey</name><uri>http://www.blogger.com/profile/04940025489236520116</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6463343857615764564.post-2868672005895047084</id><published>2009-04-25T08:29:00.001-07:00</published><updated>2009-04-25T08:35:35.685-07:00</updated><title type='text'>Windows Server Core 2008 – 3Com NIC installation problem</title><content type='html'>&lt;p&gt;It appeared that my on-board NIC was not working as my new installation would not recognise it. So I took my “&lt;a href="http://www.microsoft.com/windows/compatibility/Details.aspx?type=Hardware&amp;amp;p=3C905C-TX-M%20Etherlink%2010/100BT%20PCI%20NIC%20w/Management&amp;amp;v=3Com&amp;amp;uid=3C905CTXM&amp;amp;pf=0&amp;amp;pi=0&amp;amp;os=32-bit" target="_blank"&gt;3C905C-TX-M Etherlink 10/100BT PCI NIC w/Management&lt;/a&gt;” from a server that was running Server 2003 and I knew was working. Plugged it in and it still did not recognise this one.&lt;/p&gt;  &lt;p&gt;Now the Vista drivers are different so I tried to &lt;a href="http://download.cnet.com/Network-3C905C-TXM-Ethernet-Adaptor-Driver/3000-2112_4-109002.html" target="_blank"&gt;download some drivers&lt;/a&gt; on the net, I copied them onto the new server and ran the exe. Still didn’t recognise the NIC after a reboot. So I went to the extracted location of the R41104.exe and navigated to&lt;/p&gt;  &lt;p&gt;Bare in mind that this exe tries to extract the drivers to a Dell Location. Mine is not a Dell, so I extracted them to a “Drivers” folder.&lt;/p&gt;  &lt;p&gt;x:\Drivers\R41104\Windows\Update\Source&lt;/p&gt;  &lt;p&gt;Then type in the following command.&lt;/p&gt;  &lt;p&gt;pnputil –i –a W9X90XBC.INF&lt;/p&gt;  &lt;p&gt;My network is all up and running. I might go and see if this works with the on board nForce NIC&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6463343857615764564-2868672005895047084?l=simiansoftware.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://simiansoftware.blogspot.com/feeds/2868672005895047084/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6463343857615764564&amp;postID=2868672005895047084' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6463343857615764564/posts/default/2868672005895047084'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6463343857615764564/posts/default/2868672005895047084'/><link rel='alternate' type='text/html' href='http://simiansoftware.blogspot.com/2009/04/windows-server-core-2008-3com-nic.html' title='Windows Server Core 2008 – 3Com NIC installation problem'/><author><name>CodeMonkey</name><uri>http://www.blogger.com/profile/04940025489236520116</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6463343857615764564.post-2509780456879757077</id><published>2009-04-25T08:11:00.001-07:00</published><updated>2009-04-25T08:11:14.826-07:00</updated><title type='text'>Windows 2008 Server install problems - 0x800706F8</title><content type='html'>&lt;p&gt;&lt;strong&gt;&lt;em&gt;“Windows cannot install required files. Make sure all files required for installation are available, and restart the installation. Error code: 0x800706F8”&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;I originally installed Server 2008 from XP and installed it on a different partition and everything worked fine. However, I nuked the machine as I wanted to get rid of the XP Partition and I accidently lost the MBR (Master Boot Record).&lt;/p&gt;  &lt;p&gt;So after trying to install Vista directly from the DVD. I kept getting the message above.&lt;/p&gt;  &lt;p&gt;After a lot of research it ended up being that a Samsung SD-604 DVD has problems without the correct device drivers. However it was not listed &lt;a href="http://support.microsoft.com/kb/930984" target="_blank"&gt;here&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt; So the trick is to boot off the DVD and get to Boot Strap to recognise all your drives. Then say that you are going to repair your machine and navigate to the Command Prompt. Copy the DVD onto a folder called E:\Windows2008Setup and then install it from this command prompt.&lt;/p&gt;  &lt;p&gt;Some other useful things I learnt were&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;a href="http://technet.microsoft.com/en-us/library/cc749177.aspx" target="_blank"&gt;Boot Sector commands&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://support.microsoft.com/kb/928902/" target="_blank"&gt;Microsoft’s&lt;/a&gt; instructions which only work if you have an OS in the first place&lt;/li&gt; &lt;/ul&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6463343857615764564-2509780456879757077?l=simiansoftware.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://simiansoftware.blogspot.com/feeds/2509780456879757077/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6463343857615764564&amp;postID=2509780456879757077' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6463343857615764564/posts/default/2509780456879757077'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6463343857615764564/posts/default/2509780456879757077'/><link rel='alternate' type='text/html' href='http://simiansoftware.blogspot.com/2009/04/windows-2008-server-install-problems.html' title='Windows 2008 Server install problems - 0x800706F8'/><author><name>CodeMonkey</name><uri>http://www.blogger.com/profile/04940025489236520116</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6463343857615764564.post-423820896363060937</id><published>2009-04-09T06:44:00.001-07:00</published><updated>2009-04-09T10:06:48.820-07:00</updated><title type='text'>Creating a backup plan for SQL Express</title><content type='html'>&lt;p&gt;Sql Server 2008 Express does not come with the built in agent that most servers do. I have a simple E-Commerce shopping cart system and I have decided to use SQL Server Express as it is free for single processor machines and I don’t need anything fancy – just a simple DB to be honest.&lt;/p&gt;  &lt;p&gt;So here is how to have a database backup plan.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://code.msdn.microsoft.com/SQLExamples/Wiki/View.aspx?title=ExpressMaintenance"&gt;http://code.msdn.microsoft.com/SQLExamples/Wiki/View.aspx?title=ExpressMaintenance&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;which was utter rubbish and his examples don’t even run!&lt;/p&gt;  &lt;p&gt;So try this&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.sqldbatips.com/showarticle.asp?ID=27"&gt;http://www.sqldbatips.com/showarticle.asp?ID=27&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Which is one stored procedure and then a Windows Task to call it every week. Prefect. Exactly what I needed. When I get a spare moment, I am going to look at this one as I want to learn PowerShell&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.databasejournal.com/features/mssql/article.php/3693606/Microsoft-Windows-PowerShell-and-SQL-Server-2005-SMO--Part-6.htm"&gt;http://www.databasejournal.com/features/mssql/article.php/3693606/Microsoft-Windows-PowerShell-and-SQL-Server-2005-SMO--Part-6.htm&lt;/a&gt;&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6463343857615764564-423820896363060937?l=simiansoftware.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://simiansoftware.blogspot.com/feeds/423820896363060937/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6463343857615764564&amp;postID=423820896363060937' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6463343857615764564/posts/default/423820896363060937'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6463343857615764564/posts/default/423820896363060937'/><link rel='alternate' type='text/html' href='http://simiansoftware.blogspot.com/2009/04/creating-backup-plan-for-sql-express.html' title='Creating a backup plan for SQL Express'/><author><name>CodeMonkey</name><uri>http://www.blogger.com/profile/04940025489236520116</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6463343857615764564.post-8914012039550405968</id><published>2009-03-28T06:21:00.001-07:00</published><updated>2009-03-28T06:21:29.059-07:00</updated><title type='text'>Getting rid of GoogleUpdater</title><content type='html'>&lt;p&gt;Google Updater is installed when you install any Google product. It then sits in the background and checks for updates. I don’t want it to on my server. I wanted a browser that wasn’t IE 6.0 and I didn’t want the bloat ware of IE 8.0. So I installed Google Chrome as a light weight browser, that would not constantly require Microsoft Updates.&lt;/p&gt;  &lt;p&gt;So how do you get rid of the Google Updater?&lt;/p&gt;  &lt;p&gt;1) Go to Scheduled Tasks.&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Either by Control Panel –&amp;gt; Scheduled Tasks&lt;/li&gt;    &lt;li&gt;Explorer –&amp;gt; Windows –&amp;gt; Tasks&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;2) You will see the Google Updater sat there. It will start a process when the processor is Idle for 10 mins. Just delete this task and Google wont update anymore.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6463343857615764564-8914012039550405968?l=simiansoftware.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://simiansoftware.blogspot.com/feeds/8914012039550405968/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6463343857615764564&amp;postID=8914012039550405968' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6463343857615764564/posts/default/8914012039550405968'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6463343857615764564/posts/default/8914012039550405968'/><link rel='alternate' type='text/html' href='http://simiansoftware.blogspot.com/2009/03/getting-rid-of-googleupdater.html' title='Getting rid of GoogleUpdater'/><author><name>CodeMonkey</name><uri>http://www.blogger.com/profile/04940025489236520116</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6463343857615764564.post-5780917989985781639</id><published>2009-03-19T17:12:00.001-07:00</published><updated>2009-03-19T17:12:47.038-07:00</updated><title type='text'>Rebuilding all my Personal Computers</title><content type='html'>&lt;p&gt;I had some time off work, so I decided to rebuild all those old machines I had in the spare room. I had the following: -&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;P6DBS Motherboard with a Pentium II and 350Mhz, 5 HDD strung together on SCSI leads running Windows 2003. But no RAM!! installed (&lt;a href="http://www.supermicro.com/manuals/motherboard/440BX/MNL-0612.pdf"&gt;http://www.supermicro.com/manuals/motherboard/440BX/MNL-0612.pdf&lt;/a&gt;). SCSI CD-Rom Drive, AGP card and Network card.&lt;/li&gt;    &lt;li&gt;6BTA3 Motherboard with a Pentium III 450Mhz, 8Gb HDD, 256 running Windows 98 (&lt;a href="http://www.hardwarezone.com/reviews/mb/6bta3/6bta3.htm"&gt;http://www.hardwarezone.com/reviews/mb/6bta3/6bta3.htm&lt;/a&gt;). DVD Drive&lt;/li&gt;    &lt;li&gt;K7N420 PRO (MS-6373) Motherboard running an AMD Athlon 1800Mhz, with a 60Gb Maxtor, 18Gb BigFoot and 12Gb Maxtor with 256 RAM(&lt;a href="http://www.msicomputer.com/product/detail_spec/k7n420pro.htm"&gt;http://www.msicomputer.com/product/detail_spec/k7n420pro.htm&lt;/a&gt;)&lt;/li&gt;    &lt;li&gt;120Gb External IDE drive caddy&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;I initially thought that I could take the disks out of the P6DBS and undo the Caddy and just copy the data onto my laptop. I forgot the old IDE vs SCSI differences (&lt;a href="http://www.mindconnection.com/library/computertips/ide-scsi.htm"&gt;http://www.mindconnection.com/library/computertips/ide-scsi.htm&lt;/a&gt;). But I was reminded about the beauty of SCSI and the way you can just “span” disks together to be seen as one by the operating system.&lt;/p&gt;  &lt;p&gt;I stole the memory from the 6BTA3 to boot the P6DBS. I noticed that although it had 5 HDD, it only had power cables for 4 devices. So the first step was to copy all the data onto my Western Digital My Book (&lt;a href="http://support.wdc.com/product/spec.asp?groupid=110&amp;amp;lang=en&amp;amp;print=y"&gt;http://support.wdc.com/product/spec.asp?groupid=110&amp;amp;lang=en&amp;amp;print=y&lt;/a&gt;) I always thought 1 Tb of data was overkill, but I am slowly filling it!&lt;/p&gt;  &lt;p&gt;After I had copied 16Gb of data of 2 of the drives, I noticed that my P6DBS was a dual processor motherboard, I decided to take the Pentium III out of the 6BTA3 and plug it in. It worked! It just said that I had 2x Pentium II. Oh well, wasn’t even expecting it to work to be honest! Then the first mistake – flashing the BIOS!!!&lt;/p&gt;  &lt;p&gt;I went to SuperMicro (&lt;a href="http://www.supermicro.com/support/bios/archive.cfm"&gt;http://www.supermicro.com/support/bios/archive.cfm&lt;/a&gt;) site to get a new BIOS and used (&lt;a href="http://www.bootdisk.com/"&gt;http://www.bootdisk.com/&lt;/a&gt;) to create a Boot disk. Well that completely fried my machine and it constantly beeped after turning it on. Which according the web was the Power Unit failing (&lt;a href="http://www.wimsbios.com/faq/solveamibiosbeepcodes.jsp"&gt;http://www.wimsbios.com/faq/solveamibiosbeepcodes.jsp&lt;/a&gt;). So I ripped the Power Supply Unit (PSU) out of the 6BTA3 (that ATX case was just a motherboard now!) and used that. This made the constant beeps turn into 7 beeps (apparently the graphics card was now not seated), and after taking out the memory it had a different number of beeps! So I thought, I need to recover the BIOS.&lt;/p&gt;  &lt;p&gt;I followed this (&lt;a href="http://www.wimsbios.com/faq/howtorecoveracorruptbios.jsp"&gt;http://www.wimsbios.com/faq/howtorecoveracorruptbios.jsp&lt;/a&gt;) guide and ended up setting the motherboard jumper and even took the CMOS battery out and left it over night (was 3am by now!). By this time frustration made me read the manual and release that I should have renamed the backed up BIOS (super.rom). I wish I had followed the instructions to the letter!!&lt;/p&gt;  &lt;p&gt;So now I had no way off renaming the rom file as I needed to boot the P6DBS and hold down CTRL and HOME with the floppy disk in and it should reflash the drive reading the super.rom file.&lt;/p&gt;  &lt;p&gt;So onto destroying the other machine so that I could use the floppy drive!&lt;/p&gt;  &lt;p&gt;More to come . . . . &lt;/p&gt;  &lt;p&gt;&lt;a href="http://neosmart.net/wiki/display/EBCD/Recovering+the+Vista+Bootloader+from+the+DVD"&gt;http://neosmart.net/wiki/display/EBCD/Recovering+the+Vista+Bootloader+from+the+DVD&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://neosmart.net/blog/2008/windows-vista-recovery-disc-download/"&gt;http://neosmart.net/blog/2008/windows-vista-recovery-disc-download/&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://isorecorder.alexfeinman.com/v2.htm"&gt;http://isorecorder.alexfeinman.com/v2.htm&lt;/a&gt;&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6463343857615764564-5780917989985781639?l=simiansoftware.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://simiansoftware.blogspot.com/feeds/5780917989985781639/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6463343857615764564&amp;postID=5780917989985781639' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6463343857615764564/posts/default/5780917989985781639'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6463343857615764564/posts/default/5780917989985781639'/><link rel='alternate' type='text/html' href='http://simiansoftware.blogspot.com/2009/03/rebuilding-all-my-personal-computers.html' title='Rebuilding all my Personal Computers'/><author><name>CodeMonkey</name><uri>http://www.blogger.com/profile/04940025489236520116</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6463343857615764564.post-6900891194889090091</id><published>2009-03-18T17:20:00.001-07:00</published><updated>2009-03-18T17:20:04.875-07:00</updated><title type='text'>ConfigurationSection that reports missing sections in config</title><content type='html'>&lt;p&gt;It has long annoyed me taken other frameworks that need config sections defined and spending the time copying the sections over, it would be so much easier if the Framework told you what bit of configuration it was trying to load. So I always use this abstract class for all of my config sections.&lt;/p&gt;  &lt;pre class="code"&gt;&lt;span style="color: blue"&gt;public abstract class &lt;/span&gt;&lt;span style="color: #2b91af"&gt;SimianConfigurationSection &lt;/span&gt;: &lt;span style="color: #2b91af"&gt;ConfigurationSection&lt;br /&gt;&lt;/span&gt;{&lt;br /&gt;    &lt;span style="color: gray"&gt;/// &amp;lt;summary&amp;gt;&lt;br /&gt;    /// &lt;/span&gt;&lt;span style="color: green"&gt;Gets the section.&lt;br /&gt;    &lt;/span&gt;&lt;span style="color: gray"&gt;/// &amp;lt;/summary&amp;gt;&lt;br /&gt;    /// &amp;lt;param name=&amp;quot;definedName&amp;quot;&amp;gt;&lt;/span&gt;&lt;span style="color: green"&gt;Name of the defined.&lt;/span&gt;&lt;span style="color: gray"&gt;&amp;lt;/param&amp;gt;&lt;br /&gt;    /// &amp;lt;returns&amp;gt;&amp;lt;/returns&amp;gt;&lt;br /&gt;    &lt;/span&gt;&lt;span style="color: blue"&gt;public static &lt;/span&gt;&lt;span style="color: #2b91af"&gt;ConfigurationSection &lt;/span&gt;GetSection(&lt;span style="color: blue"&gt;string &lt;/span&gt;definedName)&lt;br /&gt;    {&lt;br /&gt;        &lt;span style="color: #2b91af"&gt;ConfigurationSection &lt;/span&gt;section = &lt;span style="color: #2b91af"&gt;ConfigurationManager&lt;/span&gt;.GetSection(definedName) &lt;span style="color: blue"&gt;as &lt;/span&gt;&lt;span style="color: #2b91af"&gt;ConfigurationSection&lt;/span&gt;;&lt;br /&gt;&lt;br /&gt;        &lt;span style="color: blue"&gt;if &lt;/span&gt;(section == &lt;span style="color: blue"&gt;null&lt;/span&gt;)&lt;br /&gt;            &lt;span style="color: blue"&gt;throw new &lt;/span&gt;&lt;span style="color: #2b91af"&gt;ConfigurationErrorsException&lt;/span&gt;(&lt;span style="color: #a31515"&gt;&amp;quot;The &amp;lt;&amp;quot; &lt;/span&gt;+ definedName +&lt;br /&gt;                  &lt;span style="color: #a31515"&gt;&amp;quot;&amp;gt; section is not defined in your .config file!&amp;quot;&lt;/span&gt;);&lt;br /&gt;&lt;br /&gt;        &lt;span style="color: blue"&gt;return &lt;/span&gt;section;&lt;br /&gt;    }&lt;br /&gt;}&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;Next derive from this class rather than the .Net Framework class. e.g.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre class="code"&gt;&lt;span style="color: blue"&gt;public class &lt;/span&gt;&lt;span style="color: #2b91af"&gt;EmailTemplatesSection &lt;/span&gt;: &lt;span style="color: #2b91af"&gt;SimianConfigurationSection&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;Once this has been completed your application will report a simple configuration exception if it cannot find your section in the config file. This takes 5 minutes to implement, but helps so much when you are configuring frameworks.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;This then allows a really simple pattern when you want your configuration section.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre class="code"&gt;&lt;span style="color: blue"&gt;return &lt;/span&gt;&lt;span style="color: #2b91af"&gt;DBCategoryProviderSection&lt;/span&gt;.GetSection(&lt;span style="color: #a31515"&gt;&amp;quot;nopDataProviders/CategoryProvider&amp;quot;&lt;/span&gt;) &lt;span style="color: blue"&gt;as &lt;/span&gt;&lt;span style="color: #2b91af"&gt;DBCategoryProviderSection&lt;/span&gt;;&lt;/pre&gt;&lt;br /&gt;You will no longer get an “Object is not a reference . . . “ exception.  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6463343857615764564-6900891194889090091?l=simiansoftware.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://simiansoftware.blogspot.com/feeds/6900891194889090091/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6463343857615764564&amp;postID=6900891194889090091' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6463343857615764564/posts/default/6900891194889090091'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6463343857615764564/posts/default/6900891194889090091'/><link rel='alternate' type='text/html' href='http://simiansoftware.blogspot.com/2009/03/configurationsection-that-reports.html' title='ConfigurationSection that reports missing sections in config'/><author><name>CodeMonkey</name><uri>http://www.blogger.com/profile/04940025489236520116</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6463343857615764564.post-925574576115128975</id><published>2009-03-16T17:30:00.001-07:00</published><updated>2009-03-16T17:30:45.763-07:00</updated><title type='text'>Json Extension methods</title><content type='html'>&lt;p&gt;Extension methods are so cool in your web layer so that you can easily convert your things between Json and your object. All you have to do now is decorate your classes with the DataContract/DataMember attributes. How simple is that?&lt;/p&gt;  &lt;pre class="code"&gt;&lt;span style="color: blue"&gt;public static class &lt;/span&gt;&lt;span style="color: #2b91af"&gt;JsonHelper&lt;br /&gt;&lt;/span&gt;{&lt;br /&gt;    &lt;span style="color: gray"&gt;/// &amp;lt;summary&amp;gt;&lt;br /&gt;    /// &lt;/span&gt;&lt;span style="color: green"&gt;Converts any object to a JSON string&lt;br /&gt;    &lt;/span&gt;&lt;span style="color: gray"&gt;/// &amp;lt;/summary&amp;gt;&lt;br /&gt;    /// &amp;lt;param name=&amp;quot;value&amp;quot;&amp;gt;&lt;/span&gt;&lt;span style="color: green"&gt;The value.&lt;/span&gt;&lt;span style="color: gray"&gt;&amp;lt;/param&amp;gt;&lt;br /&gt;    /// &amp;lt;returns&amp;gt;&amp;lt;/returns&amp;gt;&lt;br /&gt;    &lt;/span&gt;&lt;span style="color: blue"&gt;public static string &lt;/span&gt;ToJson(&lt;span style="color: blue"&gt;this object &lt;/span&gt;value)&lt;br /&gt;    {&lt;br /&gt;        &lt;span style="color: #2b91af"&gt;DataContractJsonSerializer &lt;/span&gt;serializer = &lt;span style="color: blue"&gt;new &lt;/span&gt;&lt;span style="color: #2b91af"&gt;DataContractJsonSerializer&lt;/span&gt;(value.GetType());&lt;br /&gt;        &lt;span style="color: blue"&gt;using &lt;/span&gt;(&lt;span style="color: #2b91af"&gt;MemoryStream &lt;/span&gt;ms = &lt;span style="color: blue"&gt;new &lt;/span&gt;&lt;span style="color: #2b91af"&gt;MemoryStream&lt;/span&gt;())&lt;br /&gt;        {&lt;br /&gt;            serializer.WriteObject(ms, value);&lt;br /&gt;            &lt;span style="color: blue"&gt;return &lt;/span&gt;&lt;span style="color: #2b91af"&gt;Encoding&lt;/span&gt;.Default.GetString(ms.ToArray());&lt;br /&gt;        }&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    &lt;span style="color: gray"&gt;/// &amp;lt;summary&amp;gt;&lt;br /&gt;    /// &lt;/span&gt;&lt;span style="color: green"&gt;Deserializes the specified json.&lt;br /&gt;    &lt;/span&gt;&lt;span style="color: gray"&gt;/// &amp;lt;/summary&amp;gt;&lt;br /&gt;    /// &amp;lt;typeparam name=&amp;quot;T&amp;quot;&amp;gt;&amp;lt;/typeparam&amp;gt;&lt;br /&gt;    /// &amp;lt;param name=&amp;quot;value&amp;quot;&amp;gt;&lt;/span&gt;&lt;span style="color: green"&gt;The value.&lt;/span&gt;&lt;span style="color: gray"&gt;&amp;lt;/param&amp;gt;&lt;br /&gt;    /// &amp;lt;returns&amp;gt;&amp;lt;/returns&amp;gt;&lt;br /&gt;    &lt;/span&gt;[&lt;span style="color: #2b91af"&gt;SuppressMessage&lt;/span&gt;(&lt;span style="color: #a31515"&gt;&amp;quot;Microsoft.Design&amp;quot;&lt;/span&gt;, &lt;span style="color: #a31515"&gt;&amp;quot;CA1004:GenericMethodsShouldProvideTypeParameter&amp;quot;&lt;/span&gt;)]&lt;br /&gt;    &lt;span style="color: blue"&gt;public static &lt;/span&gt;T FromJson&amp;lt;T&amp;gt;(&lt;span style="color: blue"&gt;this string &lt;/span&gt;value)&lt;br /&gt;    {&lt;br /&gt;        &lt;span style="color: blue"&gt;using &lt;/span&gt;(&lt;span style="color: #2b91af"&gt;MemoryStream &lt;/span&gt;ms = &lt;span style="color: blue"&gt;new &lt;/span&gt;&lt;span style="color: #2b91af"&gt;MemoryStream&lt;/span&gt;(&lt;span style="color: #2b91af"&gt;Encoding&lt;/span&gt;.Unicode.GetBytes(value)))&lt;br /&gt;        {&lt;br /&gt;            &lt;span style="color: #2b91af"&gt;DataContractJsonSerializer &lt;/span&gt;serializer = &lt;span style="color: blue"&gt;new &lt;/span&gt;&lt;span style="color: #2b91af"&gt;DataContractJsonSerializer&lt;/span&gt;(&lt;span style="color: blue"&gt;typeof&lt;/span&gt;(T));&lt;br /&gt;            &lt;span style="color: blue"&gt;return &lt;/span&gt;(T)serializer.ReadObject(ms);&lt;br /&gt;        }&lt;br /&gt;    }&lt;br /&gt;}&lt;/pre&gt;&lt;br /&gt;&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6463343857615764564-925574576115128975?l=simiansoftware.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://simiansoftware.blogspot.com/feeds/925574576115128975/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6463343857615764564&amp;postID=925574576115128975' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6463343857615764564/posts/default/925574576115128975'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6463343857615764564/posts/default/925574576115128975'/><link rel='alternate' type='text/html' href='http://simiansoftware.blogspot.com/2009/03/json-extension-methods.html' title='Json Extension methods'/><author><name>CodeMonkey</name><uri>http://www.blogger.com/profile/04940025489236520116</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6463343857615764564.post-2443003300188102967</id><published>2009-02-25T07:57:00.001-08:00</published><updated>2009-02-25T07:57:31.181-08:00</updated><title type='text'>Preparation Guide for 70-564 Exam. Designing and Developing ASP.NET Applications Using the Microsoft .NET Framework 3.5</title><content type='html'>&lt;h4&gt;Designing and Implementing Controls For 70-564 Exam (13 percent) &lt;/h4&gt;  &lt;p&gt;Choose appropriate controls based on business requirements.   &lt;br /&gt;May include but is not limited to: user controls, server controls, built-in controls, custom controls, third-party controls, Web parts    &lt;br /&gt;Design controls for reusability.    &lt;br /&gt;May include but is not limited to: user controls, server controls, inheritance for changing behavior    &lt;br /&gt;Manage states for controls.    &lt;br /&gt;May include but is not limited to: control state, view state, accessing form elements    &lt;br /&gt;Leverage data-bound controls.    &lt;br /&gt;May include but is not limited to: use gridviews, use sorting and paging callbacks when available, when to use custom sorting and paging, server-side pagination    &lt;br /&gt;Choose appropriate validation controls based on business requirements.    &lt;br /&gt;May include but is not limited to: server-side page validation (Page.IsValid), custom validator, validation groups, validation summary    &lt;br /&gt;Identify the appropriate usage of ASP.NET AJAX.    &lt;br /&gt;May include but is not limited to: implementing partial page updates with update panel, using ASP.NET AJAX controls, script services    &lt;br /&gt;Manage JavaScript dependencies with server controls.    &lt;br /&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;h4&gt;Designing the Presentation and Layout of an Application For 70-564 Test (16 percent) &lt;/h4&gt;  &lt;p&gt;&lt;strong&gt;&lt;/strong&gt;    &lt;br /&gt;Design complex layout with Master Pages.    &lt;br /&gt;May include but is not limited to: strongly typed master pages, nested master pages    &lt;br /&gt;Plan for various user agents.    &lt;br /&gt;May include but is not limited to: markups for different browsers for mobile devices, screen readers, accessibility    &lt;br /&gt;Design a brandable user interface by using themes.    &lt;br /&gt;May include but is not limited to: shared themes across multiple applications, run time master page selection    &lt;br /&gt;Design site navigation.    &lt;br /&gt;May include but is not limited to: when to extend site map provider, treeview menu vs. site map path, programmatically manipulating site map nodes, overriding menu rendering by using control adapters, filtering site map nodes based on user roles    &lt;br /&gt;Plan Web sites to support globalization.    &lt;br /&gt;May include but is not limited to: custom resource provider vs. resource files, localize applications    &lt;br /&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;h4&gt;Accessing Data and Services For 70-564 Test (18 percent) &lt;/h4&gt;  &lt;p&gt;&lt;strong&gt;&lt;/strong&gt;    &lt;br /&gt;Plan vendor-independent database interactions.    &lt;br /&gt;May include but is not limited to: IDBconnection, IDBcommand, IDBadapter, IdataReader, Datareader vs. dataset    &lt;br /&gt;Identify the appropriate usage of data source controls.    &lt;br /&gt;May include but is not limited to: SQLDataSource, ObjectDataSource, XMLDataSource    &lt;br /&gt;Leverage LINQ in data access design.    &lt;br /&gt;May include but is not limited to: LINQtoSQL, lambda expressions, LINQtoObjects, LINQtoXML    &lt;br /&gt;Identify opportunities to access and expose Web services.    &lt;br /&gt;May include but is not limited to: WCF, ASMX, REST    &lt;br /&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;h4&gt;Establishing ASP.NET Solution Structure For 70-564 Test (13 percent) &lt;/h4&gt;  &lt;p&gt;&lt;strong&gt;&lt;/strong&gt;    &lt;br /&gt;Determine when to use the Web Site model vs. a Web Application Project.    &lt;br /&gt;May include but is not limited to: project file, references, namespace, user profile object, precompilation    &lt;br /&gt;Establish an error-handling strategy.    &lt;br /&gt;May include but is not limited to: Global.asax events, Web.config elements, TRY/CATCH blocks, error logging    &lt;br /&gt;Manipulate configuration files to change ASP.NET behavior.    &lt;br /&gt;May include but is not limited to: machine key, tracing, encrypting Web configuration data, custom configuration sections    &lt;br /&gt;Identify a deployment strategy.    &lt;br /&gt;May include but is not limited to: mangement application pools, Web deployment projects, pre-compilation, custom action classes    &lt;br /&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;h4&gt;Leveraging and Extending ASP.NET Architecture For 70-564 Exam (17 percent) &lt;/h4&gt;  &lt;p&gt;&lt;strong&gt;&lt;/strong&gt;    &lt;br /&gt;Design a state management strategy.    &lt;br /&gt;May include but is not limited to: Cache, ViewState, Application object, Session object, cookies, cookieless session    &lt;br /&gt;Identify the events of the page life cycle.    &lt;br /&gt;May include but is not limited to: appending controls, PostBack model, accessing state, data binding    &lt;br /&gt;Write HttpModules and HttpHandlers.    &lt;br /&gt;May include but is not limited to: URL rewriting, SSO application, dynamically retrieve data    &lt;br /&gt;Debug ASP.NET Web applications.    &lt;br /&gt;May include but is not limited to: debug JavaScript, tracing, debug tools in IDE, examining HTTP headers    &lt;br /&gt;Plan for long-running processes by using asynchronous pages.    &lt;br /&gt;May include but is not limited to: AddonPreRenderCompleteAsync, RegisterAsyncTask    &lt;br /&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;h4&gt;Applying security principles For 70-564 Exam (23 percent) &lt;/h4&gt;  &lt;p&gt;&lt;strong&gt;&lt;/strong&gt;    &lt;br /&gt;Identify appropriate security providers.    &lt;br /&gt;May include but is not limited to: membership, role, profile, extending custom providers    &lt;br /&gt;Decide which user-related information to store in a profile.    &lt;br /&gt;May include but is not limited to: create user profile properties, extend membership objects, custom types    &lt;br /&gt;Establish security settings in Web.config.    &lt;br /&gt;May include but is not limited to: identity/impersonation, authentication, authorization (location nodes in Web.config)    &lt;br /&gt;Identify vulnerable elements in applications.    &lt;br /&gt;May include but is not limited to: SQL injection, cross-site scripting, protecting against bots    &lt;br /&gt;Ensure that sensitive information in applications is protected.    &lt;br /&gt;May include but is not limited to: hash and salt passwords, encrypting information&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6463343857615764564-2443003300188102967?l=simiansoftware.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://simiansoftware.blogspot.com/feeds/2443003300188102967/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6463343857615764564&amp;postID=2443003300188102967' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6463343857615764564/posts/default/2443003300188102967'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6463343857615764564/posts/default/2443003300188102967'/><link rel='alternate' type='text/html' href='http://simiansoftware.blogspot.com/2009/02/preparation-guide-for-70-564-exam.html' title='Preparation Guide for 70-564 Exam. Designing and Developing ASP.NET Applications Using the Microsoft .NET Framework 3.5'/><author><name>CodeMonkey</name><uri>http://www.blogger.com/profile/04940025489236520116</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6463343857615764564.post-4648267314760949189</id><published>2009-02-17T14:26:00.001-08:00</published><updated>2009-02-17T15:36:01.595-08:00</updated><title type='text'>Preparation Guide for Exam 70-562</title><content type='html'>&lt;table id="E4E" class="dataTable" border="0" cellspacing="0" cellpadding="0" width="95%"&gt;&lt;thead&gt;     &lt;tr class="stdHeader" valign="top"&gt;       &lt;td id="colEAF" width="100%"&gt;&lt;strong&gt;&lt;a href="http://www.microsoft.com/learning/en/us/exams/70-562.mspx" target="_blank"&gt;Skills measured by Exam 70-562&lt;/a&gt;&lt;/strong&gt;&lt;/td&gt;     &lt;/tr&gt;   &lt;/thead&gt;&lt;tbody&gt;     &lt;tr class="subHeader"&gt;       &lt;td&gt;         &lt;h4&gt;Configuring and Deploying Web Applications (10 percent)&lt;/h4&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr class="record" valign="top"&gt;       &lt;td&gt;Configure &lt;a href="http://msdn.microsoft.com/en-us/library/aa478948.aspx" target="_blank"&gt;providers&lt;/a&gt;.           &lt;li&gt;May include but is not limited to: &lt;a href="http://msdn.microsoft.com/en-us/library/aa478955.aspx" target="_blank"&gt;personalization&lt;/a&gt;, &lt;a href="http://msdn.microsoft.com/en-us/library/6e9y4s5t.aspx" target="_blank"&gt;membership&lt;/a&gt;, data sources, &lt;a href="http://msdn.microsoft.com/en-us/library/ms178426.aspx" target="_blank"&gt;site map&lt;/a&gt;, resource, &lt;a href="http://msdn.microsoft.com/en-us/library/6b241xwt.aspx" target="_blank"&gt;security&lt;/a&gt; &lt;/li&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr class="evenRecord" valign="top"&gt;       &lt;td&gt;Configure &lt;a href="http://msdn.microsoft.com/en-us/library/eeyk640h.aspx" target="_blank"&gt;authentication&lt;/a&gt;, &lt;a href="http://msdn.microsoft.com/en-us/library/wce3kxhd.aspx" target="_blank"&gt;authorization&lt;/a&gt;, and &lt;a href="http://msdn.microsoft.com/en-us/library/xh507fc5.aspx" target="_blank"&gt;impersonation&lt;/a&gt;.           &lt;li&gt;May include but is not limited to: &lt;a href="http://msdn.microsoft.com/en-us/library/9wff0kyh.aspx" target="_blank"&gt;Forms Authentication&lt;/a&gt;, &lt;a href="http://msdn.microsoft.com/en-us/library/907hb5w9.aspx" target="_blank"&gt;Windows Authentication&lt;/a&gt; &lt;/li&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr class="record" valign="top"&gt;       &lt;td&gt;         &lt;ul&gt;Configure projects, solutions, and reference assemblies.            &lt;li&gt;May include but is not limited to: local assemblies, shared assemblies (GAC), Web application projects, solutions &lt;/li&gt;         &lt;/ul&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr class="evenRecord" valign="top"&gt;       &lt;td&gt;Configure &lt;a href="http://msdn.microsoft.com/en-us/library/aa479034.aspx" target="_blank"&gt;session state&lt;/a&gt; by using Microsoft SQL Server, State Server, or InProc.           &lt;li&gt;May include but is not limited to: setting the timeout; cookieless sessions&lt;/li&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr class="record" valign="top"&gt;       &lt;td&gt;         &lt;ul&gt;           &lt;li&gt;Publish Web applications. May include but is not limited to: &lt;/li&gt;            &lt;li&gt;FTP&lt;/li&gt;            &lt;li&gt;File System&lt;/li&gt;            &lt;li&gt;or HTTP from Visual Studio&lt;/li&gt;         &lt;/ul&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr class="evenRecord" valign="top"&gt;       &lt;td&gt;         &lt;p class="lastInCell"&gt;Configure application pools. &lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr class="record" valign="top"&gt;       &lt;td&gt;Compile an application by using Visual Studio or command-line tools. May include but is not limited to:          &lt;li&gt;&amp;#160;&lt;a href="http://msdn.microsoft.com/en-us/library/ms229863.aspx" target="_blank"&gt;aspnet_compiler.exe&lt;/a&gt;&lt;/li&gt;          &lt;li&gt; Just-In-Time (JIT) compiling&lt;/li&gt;          &lt;li&gt;&amp;#160;&lt;a href="http://msdn.microsoft.com/en-us/library/bb397866.aspx" target="_blank"&gt;aspnet_merge.exe&lt;/a&gt; &lt;/li&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr class="subHeader"&gt;       &lt;td&gt;         &lt;h4&gt;Consuming and Creating Server Controls (20 percent)&lt;/h4&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr class="record" valign="top"&gt;       &lt;td&gt;Implement data-bound controls. May include but is not limited to: &lt;a href="http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.datagrid.aspx" target="_blank"&gt;DataGrid&lt;/a&gt;, &lt;a href="http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.datalist.aspx" target="_blank"&gt;DataList&lt;/a&gt;, &lt;a href="http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.repeater.aspx" target="_blank"&gt;Repeater&lt;/a&gt;, &lt;a href="http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.listview.aspx" target="_blank"&gt;ListView&lt;/a&gt;, &lt;a href="http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.gridview.aspx" target="_blank"&gt;GridView&lt;/a&gt;, &lt;a href="http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.formview.aspx" target="_blank"&gt;FormView&lt;/a&gt;, &lt;a href="http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.detailsview.aspx" target="_blank"&gt;DetailsView&lt;/a&gt;, &lt;a href="http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.treeview.aspx" target="_blank"&gt;TreeView&lt;/a&gt;, &lt;a href="http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.datapager.aspx" target="_blank"&gt;DataPager&lt;/a&gt; &lt;/td&gt;     &lt;/tr&gt;      &lt;tr class="evenRecord" valign="top"&gt;       &lt;td&gt;         &lt;p class="lastInCell"&gt;Load user controls dynamically. &lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr class="record" valign="top"&gt;       &lt;td&gt;Create and consume custom controls. May include but is not limited to: registering controls on a page, creating templated controls &lt;/td&gt;     &lt;/tr&gt;      &lt;tr class="evenRecord" valign="top"&gt;       &lt;td&gt;Implement client-side validation and server-side validation. May include but is not limited to: &lt;a href="http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.requiredfieldvalidator.aspx" target="_blank"&gt;RequiredFieldValidator&lt;/a&gt;, &lt;a href="http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.comparevalidator.aspx" target="_blank"&gt;CompareValidator&lt;/a&gt;, &lt;a href="http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.regularexpressionvalidator.aspx" target="_blank"&gt;RegularExpressionValidator&lt;/a&gt;, &lt;a href="http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.customvalidator.aspx" target="_blank"&gt;CustomValidator&lt;/a&gt;, &lt;a href="http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.rangevalidator.aspx" target="_blank"&gt;RangeValidator&lt;/a&gt; &lt;/td&gt;     &lt;/tr&gt;      &lt;tr class="record" valign="top"&gt;       &lt;td&gt;Consume standard controls. May include but is not limited to: Button, TextBox, DropDownList, RadioButton, CheckBox, HyperLink, Wizard, MultiView &lt;/td&gt;     &lt;/tr&gt;      &lt;tr class="subHeader"&gt;       &lt;td&gt;         &lt;h4&gt;Working with Data and Services (17 percent)&lt;/h4&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr class="record" valign="top"&gt;       &lt;td&gt;Read and write XML data. May include but is not limited to: XmlDocument, XPathNavigator, XPathNodeIterator, XPathDocument, XmlReader, XmlWriter, XmlDataDocument, XmlNamespaceManager &lt;/td&gt;     &lt;/tr&gt;      &lt;tr class="evenRecord" valign="top"&gt;       &lt;td&gt;         &lt;p class="lastInCell"&gt;Manipulate data by using DataSet and DataReader objects. &lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr class="record" valign="top"&gt;       &lt;td&gt;Call a Windows Communication Foundation (WCF) service or a Web service from an ASP.NET Web page. May include but is not limited to: App_WebReferences; &amp;lt;system.serviceModel&amp;gt; configuration &lt;/td&gt;     &lt;/tr&gt;      &lt;tr class="evenRecord" valign="top"&gt;       &lt;td&gt;Implement a DataSource control. May include but is not limited to: &lt;a href="http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.linqdatasource.aspx" target="_blank"&gt;LinqDataSource&lt;/a&gt;, &lt;a href="http://msdn2.microsoft.com/en-us/library/system.web.ui.webcontrols.objectdatasource.aspx" target="_blank"&gt;ObjectDataSource&lt;/a&gt;, &lt;a href="http://msdn2.microsoft.com/en-us/library/system.web.ui.webcontrols.xmldatasource.aspx" target="_blank"&gt;XmlDataSource&lt;/a&gt;, &lt;a href="http://msdn2.microsoft.com/en-us/library/system.web.ui.webcontrols.sqldatasource.aspx" target="_blank"&gt;SqlDataSource&lt;/a&gt; &lt;/td&gt;     &lt;/tr&gt;      &lt;tr class="record" valign="top"&gt;       &lt;td&gt;         &lt;p class="lastInCell"&gt;Bind controls to data by using data binding syntax. &lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr class="subHeader"&gt;       &lt;td&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/ms178643.aspx" target="_blank"&gt;           &lt;h4&gt;&lt;/h4&gt;         &lt;/a&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/ms178643.aspx" target="_blank"&gt;Troubleshooting and Debugging Web Applications&lt;/a&gt; (16 percent)&lt;/a&gt;&lt;/a&gt;&lt;/td&gt;     &lt;/tr&gt;      &lt;tr class="record" valign="top"&gt;       &lt;td&gt;Configure debugging and custom errors. May include but is not limited to: &amp;lt;customErrors mode=&amp;quot;Off|On|RemoteOnly&amp;quot; /&amp;gt;, &amp;lt;compilation debug=&amp;quot;true&amp;quot;/&amp;gt; &lt;/td&gt;     &lt;/tr&gt;      &lt;tr class="evenRecord" valign="top"&gt;       &lt;td&gt;         &lt;p class="lastInCell"&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/bt727f1t.aspx" target="_blank"&gt;Set up an environment to perform remote debugging&lt;/a&gt;. &lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr class="record" valign="top"&gt;       &lt;td&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/w2faa92k.aspx" target="_blank"&gt;Debug unhandled exceptions when using ASP.NET AJAX&lt;/a&gt;. May include but is not limited to: client-side Sys.Debug methods; attaching a debugger to Windows Internet Explorer &lt;/td&gt;     &lt;/tr&gt;      &lt;tr class="evenRecord" valign="top"&gt;       &lt;td&gt;Implement tracing of a Web application. May include but is not limited to: Trace.axd, Trace=True on @Page directive,&amp;lt;trace enabled=&amp;quot;true&amp;quot;/&amp;gt; &lt;/td&gt;     &lt;/tr&gt;      &lt;tr class="record" valign="top"&gt;       &lt;td&gt;Debug deployment issues. May include but is not limited to: aspnet_regiis.exe; creating an IIS Web application; setting the .NET Framework version &lt;/td&gt;     &lt;/tr&gt;      &lt;tr class="evenRecord" valign="top"&gt;       &lt;td&gt;Monitor Web applications. May include but is not limited to: &lt;a href="http://msdn.microsoft.com/en-us/library/ms227553.aspx" target="_blank"&gt;health monitoring by using WebEvent&lt;/a&gt;, performance counters &lt;/td&gt;     &lt;/tr&gt;      &lt;tr class="subHeader"&gt;       &lt;td&gt;         &lt;h4&gt;Working with ASP.NET AJAX and Client-Side Scripting (15 percent)&lt;/h4&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr class="record" valign="top"&gt;       &lt;td&gt;Implement Web Forms by using ASP.NET AJAX. May include but is not limited to: EnablePartialRendering, Triggers, ChildrenAsTriggers, Scripts, Services, UpdateProgress, Timer, ScriptManagerProxy &lt;/td&gt;     &lt;/tr&gt;      &lt;tr class="evenRecord" valign="top"&gt;       &lt;td&gt;Interact with the ASP.NET AJAX client-side library. May include but is not limited to: JavaScript Object Notation (JSON) objects; handling ASP.NET AJAX events &lt;/td&gt;     &lt;/tr&gt;      &lt;tr class="record" valign="top"&gt;       &lt;td&gt;         &lt;p class="lastInCell"&gt;Consume services from client scripts. &lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr class="evenRecord" valign="top"&gt;       &lt;td&gt;Create and register client script. May include but is not limited to: inline, included .js file, embedded JavaScript resource, created from server code &lt;/td&gt;     &lt;/tr&gt;      &lt;tr class="subHeader"&gt;       &lt;td&gt;         &lt;h4&gt;Targeting Mobile Devices (5 percent)&lt;/h4&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr class="record" valign="top"&gt;       &lt;td&gt;Access device capabilities. May include but is not limited to: working with emulators &lt;/td&gt;     &lt;/tr&gt;      &lt;tr class="evenRecord" valign="top"&gt;       &lt;td&gt;Control device-specific rendering. May include but is not limited to: &lt;a href="http://msdn.microsoft.com/en-us/library/k20acyeh.aspx" target="_blank"&gt;DeviceSpecific&lt;/a&gt; control; device filters; control templates &lt;/td&gt;     &lt;/tr&gt;      &lt;tr class="record" valign="top"&gt;       &lt;td&gt;Add mobile Web controls to a Web page. May include but is not limited to: StyleSheet controls; List controls; Container controls &lt;/td&gt;     &lt;/tr&gt;      &lt;tr class="evenRecord" valign="top"&gt;       &lt;td&gt;Implement control adapters. May include but is not limited to: App_Browsers; rendering by using &lt;a href="http://msdn.microsoft.com/en-us/library/system.web.ui.chtmltextwriter.aspx" target="_blank"&gt;ChtmlTextWriter&lt;/a&gt; or &lt;a href="http://msdn.microsoft.com/en-us/library/system.web.ui.xhtmltextwriter.aspx" target="_blank"&gt;XhtmlTextWriter&lt;/a&gt; &lt;/td&gt;     &lt;/tr&gt;      &lt;tr class="subHeader"&gt;       &lt;td&gt;         &lt;h4&gt;Programming Web Applications (17 percent)&lt;/h4&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr class="record" valign="top"&gt;       &lt;td&gt;Customize the layout and appearance of a Web page. May include but is not limited to: CSS, &lt;a href="http://msdn.microsoft.com/en-us/library/wcyt4fxb.aspx" target="_blank"&gt;Themes and Skins&lt;/a&gt;, &lt;a href="http://msdn.microsoft.com/en-us/library/18sc7456.aspx" target="_blank"&gt;Master Pages&lt;/a&gt;, and Web Parts, App_Themes, StyleSheetTheme &lt;/td&gt;     &lt;/tr&gt;      &lt;tr class="evenRecord" valign="top"&gt;       &lt;td&gt;Work with ASP.NET intrinsic objects. May include but is not limited to: Request, Server, Application, Session, Response, HttpContext &lt;/td&gt;     &lt;/tr&gt;      &lt;tr class="record" valign="top"&gt;       &lt;td&gt;Implement globalization and accessibility. May include but is not limited to: &lt;a href="http://msdn.microsoft.com/en-us/library/ms227427.aspx" target="_blank"&gt;resource files&lt;/a&gt;, culture settings, &lt;a href="http://msdn.microsoft.com/en-us/library/system.globalization.regioninfo.aspx" target="_blank"&gt;RegionInfo&lt;/a&gt;, App_GlobalResources, App_LocalResources, &lt;a href="http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.webcontrol.tabindex.aspx" target="_blank"&gt;TabIndex&lt;/a&gt;, &lt;a href="http://msdn.microsoft.com/en-us/library/aa650456.aspx" target="_blank"&gt;AlternateText&lt;/a&gt; , &lt;a href="http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.image.generateemptyalternatetext.aspx" target="_blank"&gt;GenerateEmptyAlternateText&lt;/a&gt;, &lt;a href="http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.webcontrol.accesskey.aspx" target="_blank"&gt;AccessKey&lt;/a&gt;, Label.&lt;a href="http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.label.associatedcontrolid.aspx" target="_blank"&gt;AssociatedControlID&lt;/a&gt; &lt;/td&gt;     &lt;/tr&gt;      &lt;tr class="evenRecord" valign="top"&gt;       &lt;td&gt;Implement business objects and utility classes. May include but is not limited to: App_Code , external assemblies &lt;/td&gt;     &lt;/tr&gt;      &lt;tr class="record" valign="top"&gt;       &lt;td&gt;         &lt;p class="lastInCell"&gt;Implement session state, view state, control state, cookies, cache, or application state. &lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr class="evenRecord" valign="top"&gt;       &lt;td&gt;Handle events and control page flow. May include but is not limited to: page events, control events, application events, and session events, cross-page posting; Response.Redirect, Server.Transfer, &lt;a href="http://msdn.microsoft.com/en-us/library/system.web.ui.page.ispostback.aspx" target="_blank"&gt;IsPostBack&lt;/a&gt;, setting AutoEventWireup &lt;/td&gt;     &lt;/tr&gt;      &lt;tr class="record" valign="top"&gt;       &lt;td&gt;         &lt;p class="lastInCell"&gt;Implement the Generic Handler. &lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;   &lt;/tbody&gt;&lt;/table&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6463343857615764564-4648267314760949189?l=simiansoftware.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://simiansoftware.blogspot.com/feeds/4648267314760949189/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6463343857615764564&amp;postID=4648267314760949189' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6463343857615764564/posts/default/4648267314760949189'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6463343857615764564/posts/default/4648267314760949189'/><link rel='alternate' type='text/html' href='http://simiansoftware.blogspot.com/2009/02/preparation-guide-for-exam-70-562.html' title='Preparation Guide for Exam 70-562'/><author><name>CodeMonkey</name><uri>http://www.blogger.com/profile/04940025489236520116</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6463343857615764564.post-6846479418776752004</id><published>2009-02-10T14:49:00.001-08:00</published><updated>2009-02-10T14:49:40.636-08:00</updated><title type='text'>Structs and Anonymous backing fields</title><content type='html'>&lt;p&gt;I got this error today&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;em&gt;Backing field for automatically implemented property must be fully assigned before control is returned to the caller.&lt;/em&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;I found a strange thing out today in connection with Structs and anonymous fields. I wanted something simple like&lt;/p&gt;  &lt;pre class="code"&gt;&lt;span style="color: blue"&gt;public struct &lt;/span&gt;&lt;span style="color: #2b91af"&gt;Person&lt;br /&gt;&lt;/span&gt;{&lt;br /&gt;    &lt;span style="color: blue"&gt;public &lt;/span&gt;&lt;span style="color: #2b91af"&gt;String &lt;/span&gt;FirstName { &lt;span style="color: blue"&gt;get&lt;/span&gt;; &lt;span style="color: blue"&gt;set&lt;/span&gt;; }&lt;br /&gt;    &lt;span style="color: blue"&gt;public &lt;/span&gt;&lt;span style="color: #2b91af"&gt;String &lt;/span&gt;LastName { &lt;span style="color: blue"&gt;get&lt;/span&gt;; &lt;span style="color: blue"&gt;set&lt;/span&gt;; }&lt;br /&gt;    &lt;span style="color: blue"&gt;public &lt;/span&gt;&lt;span style="color: #2b91af"&gt;Int16 &lt;/span&gt;Age { &lt;span style="color: blue"&gt;get&lt;/span&gt;; &lt;span style="color: blue"&gt;set&lt;/span&gt;; }&lt;br /&gt;&lt;br /&gt;    &lt;span style="color: blue"&gt;public &lt;/span&gt;Person(&lt;span style="color: #2b91af"&gt;String &lt;/span&gt;firstName, &lt;span style="color: #2b91af"&gt;String &lt;/span&gt;lastName, &lt;span style="color: #2b91af"&gt;Int16 &lt;/span&gt;age)&lt;br /&gt;    {&lt;br /&gt;        FirstName = firstName;&lt;br /&gt;        LastName = lastName;&lt;br /&gt;        Age = age;&lt;br /&gt;    }&lt;br /&gt;}&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;well that won’t compile as you will need to initialise all of the fields, so you have to do this – notice the call to the default constructor.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre class="code"&gt;&lt;span style="color: blue"&gt;public struct &lt;/span&gt;&lt;span style="color: #2b91af"&gt;Person&lt;br /&gt;&lt;/span&gt;{&lt;br /&gt;    &lt;span style="color: blue"&gt;public &lt;/span&gt;&lt;span style="color: #2b91af"&gt;String &lt;/span&gt;FirstName { &lt;span style="color: blue"&gt;get&lt;/span&gt;; &lt;span style="color: blue"&gt;set&lt;/span&gt;; }&lt;br /&gt;    &lt;span style="color: blue"&gt;public &lt;/span&gt;&lt;span style="color: #2b91af"&gt;String &lt;/span&gt;LastName { &lt;span style="color: blue"&gt;get&lt;/span&gt;; &lt;span style="color: blue"&gt;set&lt;/span&gt;; }&lt;br /&gt;    &lt;span style="color: blue"&gt;public &lt;/span&gt;&lt;span style="color: #2b91af"&gt;Int16 &lt;/span&gt;Age { &lt;span style="color: blue"&gt;get&lt;/span&gt;; &lt;span style="color: blue"&gt;set&lt;/span&gt;; }&lt;br /&gt;&lt;br /&gt;    &lt;span style="color: blue"&gt;public &lt;/span&gt;Person(&lt;span style="color: #2b91af"&gt;String &lt;/span&gt;firstName, &lt;span style="color: #2b91af"&gt;String &lt;/span&gt;lastName, &lt;span style="color: #2b91af"&gt;Int16 &lt;/span&gt;age): &lt;span style="color: blue"&gt;this&lt;/span&gt;()&lt;br /&gt;    {&lt;br /&gt;        FirstName = firstName;&lt;br /&gt;        LastName = lastName;&lt;br /&gt;        Age = age;&lt;br /&gt;    }&lt;br /&gt;}&lt;/pre&gt;&lt;br /&gt;Maybe the compiler should not allow anonymous fields in structs?  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6463343857615764564-6846479418776752004?l=simiansoftware.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://simiansoftware.blogspot.com/feeds/6846479418776752004/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6463343857615764564&amp;postID=6846479418776752004' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6463343857615764564/posts/default/6846479418776752004'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6463343857615764564/posts/default/6846479418776752004'/><link rel='alternate' type='text/html' href='http://simiansoftware.blogspot.com/2009/02/structs-and-anonymous-backing-fields.html' title='Structs and Anonymous backing fields'/><author><name>CodeMonkey</name><uri>http://www.blogger.com/profile/04940025489236520116</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6463343857615764564.post-3114766773068364847</id><published>2009-02-09T15:26:00.001-08:00</published><updated>2009-02-09T15:26:51.287-08:00</updated><title type='text'>UK Common regular expressions</title><content type='html'>&lt;p&gt;I thought I would share my ideas on regular expressions. What I don’t like about the RegularExpressionValidator is that you have to repeat your regular expressions over and over again. It would be so much better if you could place them in a single place. So I thought I would write about a solution I came up with a few years ago. So the first part is the list of Regular Expressions. I like the idea of putting them in their own config file.&lt;/p&gt;  &lt;p&gt;The section allows us to have our own class that represents regular expressions. The interesting parts of the regular expressions are&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;The &amp;amp; is represented as a a escaped &amp;amp;amp; as it is in XML &lt;/li&gt;    &lt;li&gt;We only have to define things like FirstName once and if the customer changes their mind, we change it in one place. &lt;/li&gt;    &lt;li&gt;The password is minimum of 6 in length and must have an upper case, a lower case and one digit. &lt;/li&gt;    &lt;li&gt;Most of the regular expressions allow for é and á and various other common accents &lt;/li&gt;    &lt;li&gt;The post code has gone through lots of testing with customers and is the best I have found. &lt;/li&gt;    &lt;li&gt;The phone numbers are UK &lt;/li&gt; &lt;/ul&gt;  &lt;pre class="code"&gt;&lt;span style="color: blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;regexSection&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;br /&gt;  &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;regularExpressions&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;br /&gt;    &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;regexConfig &lt;/span&gt;&lt;span style="color: red"&gt;name&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;Password&lt;/span&gt;&amp;quot; &lt;span style="color: red"&gt;value&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;^.*(?=.{6,})(?=.*\d)(?=.*[a-z])(?=.*[A-Z]).*$&lt;/span&gt;&amp;quot; &lt;span style="color: blue"&gt;/&amp;gt;&lt;br /&gt;    &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;regexConfig &lt;/span&gt;&lt;span style="color: red"&gt;name&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;FirstName&lt;/span&gt;&amp;quot; &lt;span style="color: red"&gt;value&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;^[a-z A-Z \xc0-\xd6 \xd8-\xf6 \xf9-\xff'-]{2,50}$&lt;/span&gt;&amp;quot; &lt;span style="color: blue"&gt;/&amp;gt;&lt;br /&gt;    &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;regexConfig &lt;/span&gt;&lt;span style="color: red"&gt;name&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;LastName&lt;/span&gt;&amp;quot; &lt;span style="color: red"&gt;value&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;^[a-z A-Z \xc0-\xd6 \xd8-\xf6 \xf9-\xff'-]{2,50}$&lt;/span&gt;&amp;quot; &lt;span style="color: blue"&gt;/&amp;gt;&lt;br /&gt;    &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;regexConfig &lt;/span&gt;&lt;span style="color: red"&gt;name&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;PhoneNumber&lt;/span&gt;&amp;quot; &lt;span style="color: red"&gt;value&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;^(?=.{10,13}$)0([0-9] ?){8,9}[0-9]$&lt;/span&gt;&amp;quot; &lt;span style="color: blue"&gt;/&amp;gt;&lt;br /&gt;    &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;regexConfig &lt;/span&gt;&lt;span style="color: red"&gt;name&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;MobilePhoneNumber&lt;/span&gt;&amp;quot; &lt;span style="color: red"&gt;value&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;^(?=.{11,13}$)07([0-9] ?){8}[0-9]$&lt;/span&gt;&amp;quot; &lt;span style="color: blue"&gt;/&amp;gt;&lt;br /&gt;    &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;regexConfig &lt;/span&gt;&lt;span style="color: red"&gt;name&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;Email&lt;/span&gt;&amp;quot; &lt;span style="color: red"&gt;value&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;(?i)^[a-z0-9!#$%&lt;/span&gt;&lt;span style="color: red"&gt;&amp;amp;amp;&lt;/span&gt;&lt;span style="color: blue"&gt;'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&lt;/span&gt;&lt;span style="color: red"&gt;&amp;amp;amp;&lt;/span&gt;&lt;span style="color: blue"&gt;'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+(?:[A-Z]{2}|com|org|net|gov|biz|info|name|aero|jobs|museum|asia|edu)\b&lt;/span&gt;&amp;quot; &lt;span style="color: blue"&gt;/&amp;gt;&lt;br /&gt;    &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;regexConfig &lt;/span&gt;&lt;span style="color: red"&gt;name&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;JobTitle&lt;/span&gt;&amp;quot; &lt;span style="color: red"&gt;value&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;^[a-z A-Z&lt;/span&gt;&lt;span style="color: red"&gt;&amp;amp;amp;&lt;/span&gt;&lt;span style="color: blue"&gt;)( \xc0-\xd6 \xd8-\xf6 \xf9-\xff'-]{2,50}$&lt;/span&gt;&amp;quot; &lt;span style="color: blue"&gt;/&amp;gt;&lt;br /&gt;    &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;regexConfig &lt;/span&gt;&lt;span style="color: red"&gt;name&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;Text&lt;/span&gt;&amp;quot; &lt;span style="color: red"&gt;value&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;^[a-z A-Z \xc0-\xd6 \xd8-\xf6 \xf9-\xff'-]{2,50}$&lt;/span&gt;&amp;quot; &lt;span style="color: blue"&gt;/&amp;gt;&lt;br /&gt;    &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;regexConfig &lt;/span&gt;&lt;span style="color: red"&gt;name&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;Text100&lt;/span&gt;&amp;quot; &lt;span style="color: red"&gt;value&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;^[a-z A-Z&lt;/span&gt;&lt;span style="color: red"&gt;&amp;amp;amp;&lt;/span&gt;&lt;span style="color: blue"&gt;!. 0-9 \xc0-\xd6 \xd8-\xf6 \xf9-\xff'-]{2,100}$&lt;/span&gt;&amp;quot; &lt;span style="color: blue"&gt;/&amp;gt;&lt;br /&gt;    &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;regexConfig &lt;/span&gt;&lt;span style="color: red"&gt;name&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;Text1000&lt;/span&gt;&amp;quot; &lt;span style="color: red"&gt;value&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;^[a-z A-Z&lt;/span&gt;&lt;span style="color: red"&gt;&amp;amp;amp;&lt;/span&gt;&lt;span style="color: blue"&gt;!. 0-9 \xc0-\xd6 \xd8-\xf6 \xf9-\xff'-]{2,1000}$&lt;/span&gt;&amp;quot; &lt;span style="color: blue"&gt;/&amp;gt;&lt;br /&gt;    &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;regexConfig &lt;/span&gt;&lt;span style="color: red"&gt;name&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;AlphaNumeric&lt;/span&gt;&amp;quot; &lt;span style="color: red"&gt;value&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;^[0-9a-z A-Z \xc0-\xd6 \xd8-\xf6 \xf9-\xff]+$&lt;/span&gt;&amp;quot; &lt;span style="color: blue"&gt;/&amp;gt;&lt;br /&gt;    &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;regexConfig &lt;/span&gt;&lt;span style="color: red"&gt;name&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;BuildingName&lt;/span&gt;&amp;quot; &lt;span style="color: red"&gt;value&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;^[0-9a-z A-Z' \xc0-\xd6 \xd8-\xf6 \xf9-\xff.,-]+[-]*[0-9a-z A-Z' \xc0-\xd6 \xd8-\xf6 \xf9-\xff.,-]*$&lt;/span&gt;&amp;quot; &lt;span style="color: blue"&gt;/&amp;gt;&lt;br /&gt;    &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;regexConfig &lt;/span&gt;&lt;span style="color: red"&gt;name&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;Street&lt;/span&gt;&amp;quot; &lt;span style="color: red"&gt;value&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;^[a-z A-Z' \xc0-\xd6 \xd8-\xf6 \xf9-\xff.,-]+$&lt;/span&gt;&amp;quot; &lt;span style="color: blue"&gt;/&amp;gt;&lt;br /&gt;    &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;regexConfig &lt;/span&gt;&lt;span style="color: red"&gt;name&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;Address&lt;/span&gt;&amp;quot; &lt;span style="color: red"&gt;value&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;^[a-z A-Z-' \xc0-\xd6 \xd8-\xf6 \xf9-\xff.]+$&lt;/span&gt;&amp;quot; &lt;span style="color: blue"&gt;/&amp;gt;&lt;br /&gt;    &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;regexConfig &lt;/span&gt;&lt;span style="color: red"&gt;name&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;Postcode&lt;/span&gt;&amp;quot; &lt;span style="color: red"&gt;value&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;(?i)^(((([A-PR-UWYZ][0-9][0-9]?)|(([A-PR-UWYZ][A-HK-Y][0-9][0-9]?)|(([A-PR-UWYZ][0-9][A-HJKSTUW])|([A-PR-UWYZ][A-HK-Z][0-9][ABEHMNPRVWXY]))))\s?[0-9][ABD-HJLNP-UW-Z]{2})|(GIR\s?0AA))$&lt;/span&gt;&amp;quot; &lt;span style="color: blue"&gt;/&amp;gt;&lt;br /&gt;    &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;regexConfig &lt;/span&gt;&lt;span style="color: red"&gt;name&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;POBox&lt;/span&gt;&amp;quot; &lt;span style="color: red"&gt;value&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;(?i)^((?!PO Box|POBox|P.O. Box|P.O.Box|P.O Box|PO. Box).)*$&lt;/span&gt;&amp;quot; &lt;span style="color: blue"&gt;/&amp;gt;&lt;br /&gt;    &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;regexConfig &lt;/span&gt;&lt;span style="color: red"&gt;name&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;AccountNumber&lt;/span&gt;&amp;quot; &lt;span style="color: red"&gt;value&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;^[0-9]{8}$&lt;/span&gt;&amp;quot; &lt;span style="color: blue"&gt;/&amp;gt;&lt;br /&gt;    &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;regexConfig &lt;/span&gt;&lt;span style="color: red"&gt;name&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;EmployerName&lt;/span&gt;&amp;quot; &lt;span style="color: red"&gt;value&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;^[0-9a-z A-Z\xc0-\xd6 \xd8-\xf6 \xf9-\xff'-]+$&lt;/span&gt;&amp;quot; &lt;span style="color: blue"&gt;/&amp;gt;&lt;br /&gt;    &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;regexConfig &lt;/span&gt;&lt;span style="color: red"&gt;name&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;SortCode&lt;/span&gt;&amp;quot; &lt;span style="color: red"&gt;value&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;^[0-9]{2}$&lt;/span&gt;&amp;quot; &lt;span style="color: blue"&gt;/&amp;gt;&lt;br /&gt;    &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;regexConfig &lt;/span&gt;&lt;span style="color: red"&gt;name&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;Income&lt;/span&gt;&amp;quot; &lt;span style="color: red"&gt;value&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;^(0|[1-9]{1}(,[0-9]{3}){0,2}|[1-9]{1}[0-9]{0,2}(,[0-9]{3})?|[1-9]{1}[0-9]{0,6})$&lt;/span&gt;&amp;quot; &lt;span style="color: blue"&gt;/&amp;gt;&lt;br /&gt;    &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;regexConfig &lt;/span&gt;&lt;span style="color: red"&gt;name&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;Expenditure&lt;/span&gt;&amp;quot; &lt;span style="color: red"&gt;value&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;^([1-9]{1}(,[0-9]{3}){0,2}|[1-9]{1}[0-9]{0,2}(,[0-9]{3})?|[1-9]{1}[0-9]{0,6})$&lt;/span&gt;&amp;quot; &lt;span style="color: blue"&gt;/&amp;gt;&lt;br /&gt;    &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;regexConfig &lt;/span&gt;&lt;span style="color: red"&gt;name&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;InternetID&lt;/span&gt;&amp;quot; &lt;span style="color: red"&gt;value&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;^[a-z A-Z \xc0-\xd6 \xd8-\xf6 \xf9-\xff'-]{6,13}$&lt;/span&gt;&amp;quot; &lt;span style="color: blue"&gt;/&amp;gt;&lt;br /&gt;    &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;regexConfig &lt;/span&gt;&lt;span style="color: red"&gt;name&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;MemorableWord&lt;/span&gt;&amp;quot; &lt;span style="color: red"&gt;value&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;^[a-zA-Z0-9'-]{6,20}$&lt;/span&gt;&amp;quot; &lt;span style="color: blue"&gt;/&amp;gt;&lt;br /&gt;    &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;regexConfig &lt;/span&gt;&lt;span style="color: red"&gt;name&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;PIN&lt;/span&gt;&amp;quot; &lt;span style="color: red"&gt;value&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;^[0-9]{5,5}$&lt;/span&gt;&amp;quot; &lt;span style="color: blue"&gt;/&amp;gt;&lt;br /&gt;    &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;regexConfig &lt;/span&gt;&lt;span style="color: red"&gt;name&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;Decimal&lt;/span&gt;&amp;quot; &lt;span style="color: red"&gt;value&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;^[0-9]+$&lt;/span&gt;&amp;quot; &lt;span style="color: blue"&gt;/&amp;gt;&lt;br /&gt;    &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;regexConfig &lt;/span&gt;&lt;span style="color: red"&gt;name&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;DDMMYYYY&lt;/span&gt;&amp;quot; &lt;span style="color: red"&gt;value&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;^((((0?[1-9]|[12]\d|3[01])(0?[13578]|1[02])((1[6-9]|[2-9]\d)?\d{2}))|((0?[1-9]|[12]\d|30)(0?[13456789]|1[012])((1[6-9]|[2-9]\d)?\d{2}))|((0?[1-9]|1\d|2[0-8])0?2((1[6-9]|[2-9]\d)?\d{2}))|(290?2((1[6-9]|[2-9]\d)?(0[48]|[2468][048]|[13579][26])|((16|[2468][048]|[3579][26])00)|00)))|(((0[1-9]|[12]\d|3[01])(0[13578]|1[02])((1[6-9]|[2-9]\d)?\d{2}))|((0[1-9]|[12]\d|30)(0[13456789]|1[012])((1[6-9]|[2-9]\d)?\d{2}))|((0[1-9]|1\d|2[0-8])02((1[6-9]|[2-9]\d)?\d{2}))|(2902((1[6-9]|[2-9]\d)?(0[48]|[2468][048]|[13579][26])|((16|[2468][048]|[3579][26])00)|00))))$&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;/&amp;gt;&lt;br /&gt;    &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;regexConfig &lt;/span&gt;&lt;span style="color: red"&gt;name&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;SubmissionName&lt;/span&gt;&amp;quot; &lt;span style="color: red"&gt;value&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;^[a-z A-Z&lt;/span&gt;&lt;span style="color: red"&gt;&amp;amp;amp;&lt;/span&gt;&lt;span style="color: blue"&gt;!)(# 0-9 \xc0-\xd6 \xd8-\xf6 \xf9-\xff'-]{2,100}$&lt;/span&gt;&amp;quot; &lt;span style="color: blue"&gt;/&amp;gt;&lt;br /&gt;  &amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;regularExpressions&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;br /&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;regexSection&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6463343857615764564-3114766773068364847?l=simiansoftware.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://simiansoftware.blogspot.com/feeds/3114766773068364847/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6463343857615764564&amp;postID=3114766773068364847' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6463343857615764564/posts/default/3114766773068364847'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6463343857615764564/posts/default/3114766773068364847'/><link rel='alternate' type='text/html' href='http://simiansoftware.blogspot.com/2009/02/regex-musings.html' title='UK Common regular expressions'/><author><name>CodeMonkey</name><uri>http://www.blogger.com/profile/04940025489236520116</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6463343857615764564.post-942160298350646851</id><published>2009-02-08T16:04:00.001-08:00</published><updated>2009-02-08T16:04:26.234-08:00</updated><title type='text'>Query String Utilities</title><content type='html'>&lt;p&gt;Every time I write any web layer code, I always end up have to manipulate query strings and this little class pays dividends when manipulating the Query String&lt;/p&gt;  &lt;pre class="code"&gt;&lt;span style="color: #2b91af"&gt;Uri &lt;/span&gt;mainUrl = . . . &lt;br /&gt;&lt;span style="color: #2b91af"&gt;QueryStringCollection &lt;/span&gt;queryString = &lt;span style="color: blue"&gt;new &lt;/span&gt;&lt;span style="color: #2b91af"&gt;QueryStringCollection&lt;/span&gt;(mainUrl.Query);&lt;br /&gt;queryString.Add(&lt;span style="color: #a31515"&gt;&amp;quot;BookingEventId&amp;quot;&lt;/span&gt;, bookingEventId.ToString());&lt;/pre&gt;&lt;br /&gt;So here is the class, it has indexers, contains, to strings and will automatically Url encode. &lt;br /&gt;&lt;br /&gt;&lt;pre class="code"&gt;&lt;span style="color: gray"&gt;/// &amp;lt;summary&amp;gt;&lt;br /&gt;/// &lt;/span&gt;&lt;span style="color: green"&gt;A chainable query string helper class.&lt;br /&gt;&lt;/span&gt;&lt;span style="color: gray"&gt;/// &amp;lt;/summary&amp;gt;&lt;br /&gt;/// &amp;lt;example&amp;gt;&lt;br /&gt;/// &lt;/span&gt;&lt;span style="color: green"&gt;string strQuery = QueryString.Current.Add(&amp;quot;id&amp;quot;, &amp;quot;179&amp;quot;).ToString();&lt;br /&gt;&lt;/span&gt;&lt;span style="color: gray"&gt;/// &lt;/span&gt;&lt;span style="color: green"&gt;string strQuery = new QueryString().Add(&amp;quot;id&amp;quot;, &amp;quot;179&amp;quot;).ToString();&lt;br /&gt;&lt;/span&gt;&lt;span style="color: gray"&gt;/// &amp;lt;/example&amp;gt;&lt;br /&gt;&lt;/span&gt;[&lt;span style="color: #2b91af"&gt;SuppressMessage&lt;/span&gt;(&lt;span style="color: #a31515"&gt;&amp;quot;Microsoft.Design&amp;quot;&lt;/span&gt;, &lt;span style="color: #a31515"&gt;&amp;quot;CA1035:ICollectionImplementationsHaveStronglyTypedMembers&amp;quot;&lt;/span&gt;,&lt;br /&gt;    Justification=&lt;span style="color: #a31515"&gt;&amp;quot;We are implementing a new object based collection.&amp;quot;&lt;/span&gt;), &lt;span style="color: #2b91af"&gt;Serializable&lt;/span&gt;]&lt;br /&gt;&lt;span style="color: blue"&gt;public class &lt;/span&gt;&lt;span style="color: #2b91af"&gt;QueryStringCollection &lt;/span&gt;: &lt;span style="color: #2b91af"&gt;NameValueCollection&lt;br /&gt;&lt;/span&gt;{&lt;br /&gt;    &lt;span style="color: blue"&gt;public &lt;/span&gt;QueryStringCollection() { }&lt;br /&gt;&lt;br /&gt;    &lt;span style="color: gray"&gt;/// &amp;lt;summary&amp;gt;&lt;br /&gt;    /// &lt;/span&gt;&lt;span style="color: green"&gt;Initializes a new instance of the &lt;/span&gt;&lt;span style="color: gray"&gt;&amp;lt;see cref=&amp;quot;QueryStringCollection&amp;quot;/&amp;gt; &lt;/span&gt;&lt;span style="color: green"&gt;class.&lt;br /&gt;    &lt;/span&gt;&lt;span style="color: gray"&gt;/// &amp;lt;/summary&amp;gt;&lt;br /&gt;    /// &amp;lt;param name=&amp;quot;info&amp;quot;&amp;gt;&lt;/span&gt;&lt;span style="color: green"&gt;A &lt;/span&gt;&lt;span style="color: gray"&gt;&amp;lt;see cref=&amp;quot;T:System.Runtime.Serialization.SerializationInfo&amp;quot;/&amp;gt; &lt;/span&gt;&lt;span style="color: green"&gt;object that contains the information required to serialize the new &lt;/span&gt;&lt;span style="color: gray"&gt;&amp;lt;see cref=&amp;quot;T:System.Collections.Specialized.NameValueCollection&amp;quot;/&amp;gt; &lt;/span&gt;&lt;span style="color: green"&gt;instance.&lt;/span&gt;&lt;span style="color: gray"&gt;&amp;lt;/param&amp;gt;&lt;br /&gt;    /// &amp;lt;param name=&amp;quot;context&amp;quot;&amp;gt;&lt;/span&gt;&lt;span style="color: green"&gt;A &lt;/span&gt;&lt;span style="color: gray"&gt;&amp;lt;see cref=&amp;quot;T:System.Runtime.Serialization.StreamingContext&amp;quot;/&amp;gt; &lt;/span&gt;&lt;span style="color: green"&gt;object that contains the source and destination of the serialized stream associated with the new &lt;/span&gt;&lt;span style="color: gray"&gt;&amp;lt;see cref=&amp;quot;T:System.Collections.Specialized.NameValueCollection&amp;quot;/&amp;gt; &lt;/span&gt;&lt;span style="color: green"&gt;instance.&lt;/span&gt;&lt;span style="color: gray"&gt;&amp;lt;/param&amp;gt;&lt;br /&gt;    &lt;/span&gt;&lt;span style="color: blue"&gt;protected &lt;/span&gt;QueryStringCollection(&lt;span style="color: #2b91af"&gt;SerializationInfo &lt;/span&gt;info, &lt;span style="color: #2b91af"&gt;StreamingContext &lt;/span&gt;context)&lt;br /&gt;        : &lt;span style="color: blue"&gt;base&lt;/span&gt;(info, context)&lt;br /&gt;    {&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    &lt;span style="color: gray"&gt;/// &amp;lt;summary&amp;gt;&lt;br /&gt;    /// &lt;/span&gt;&lt;span style="color: green"&gt;Initializes a new instance of the &lt;/span&gt;&lt;span style="color: gray"&gt;&amp;lt;see cref=&amp;quot;QueryStringCollection&amp;quot;/&amp;gt; &lt;/span&gt;&lt;span style="color: green"&gt;class.&lt;br /&gt;    &lt;/span&gt;&lt;span style="color: gray"&gt;/// &amp;lt;/summary&amp;gt;&lt;br /&gt;    /// &amp;lt;param name=&amp;quot;queryString&amp;quot;&amp;gt;&lt;/span&gt;&lt;span style="color: green"&gt;The query string.&lt;/span&gt;&lt;span style="color: gray"&gt;&amp;lt;/param&amp;gt;&lt;br /&gt;    &lt;/span&gt;&lt;span style="color: blue"&gt;public &lt;/span&gt;QueryStringCollection(&lt;span style="color: blue"&gt;string &lt;/span&gt;queryString)&lt;br /&gt;    {&lt;br /&gt;        FillFromString(queryString);&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    &lt;span style="color: gray"&gt;/// &amp;lt;summary&amp;gt;&lt;br /&gt;    /// &lt;/span&gt;&lt;span style="color: green"&gt;Gets the current.&lt;br /&gt;    &lt;/span&gt;&lt;span style="color: gray"&gt;/// &amp;lt;/summary&amp;gt;&lt;br /&gt;    /// &amp;lt;value&amp;gt;&lt;/span&gt;&lt;span style="color: green"&gt;The current.&lt;/span&gt;&lt;span style="color: gray"&gt;&amp;lt;/value&amp;gt;&lt;br /&gt;    &lt;/span&gt;&lt;span style="color: blue"&gt;public static &lt;/span&gt;&lt;span style="color: #2b91af"&gt;QueryStringCollection &lt;/span&gt;Current&lt;br /&gt;    {&lt;br /&gt;        &lt;span style="color: blue"&gt;get&lt;br /&gt;        &lt;/span&gt;{&lt;br /&gt;            &lt;span style="color: blue"&gt;return new &lt;/span&gt;&lt;span style="color: #2b91af"&gt;QueryStringCollection&lt;/span&gt;().FromCurrent();&lt;br /&gt;        }&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    &lt;span style="color: gray"&gt;/// &amp;lt;summary&amp;gt;&lt;br /&gt;    /// &lt;/span&gt;&lt;span style="color: green"&gt;Extracts the query string.&lt;br /&gt;    &lt;/span&gt;&lt;span style="color: gray"&gt;/// &amp;lt;/summary&amp;gt;&lt;br /&gt;    /// &amp;lt;param name=&amp;quot;value&amp;quot;&amp;gt;&lt;/span&gt;&lt;span style="color: green"&gt;The value.&lt;/span&gt;&lt;span style="color: gray"&gt;&amp;lt;/param&amp;gt;&lt;br /&gt;    /// &amp;lt;returns&amp;gt;&amp;lt;/returns&amp;gt;&lt;br /&gt;    &lt;/span&gt;&lt;span style="color: blue"&gt;public static string &lt;/span&gt;ExtractQueryString(&lt;span style="color: blue"&gt;string &lt;/span&gt;value)&lt;br /&gt;    {&lt;br /&gt;        &lt;span style="color: blue"&gt;if &lt;/span&gt;(!&lt;span style="color: blue"&gt;string&lt;/span&gt;.IsNullOrEmpty(value))&lt;br /&gt;        {&lt;br /&gt;            &lt;span style="color: blue"&gt;if &lt;/span&gt;(value.Contains(&lt;span style="color: #a31515"&gt;&amp;quot;?&amp;quot;&lt;/span&gt;))&lt;br /&gt;                &lt;span style="color: blue"&gt;return &lt;/span&gt;value.Substring(value.IndexOf(&lt;span style="color: #a31515"&gt;&amp;quot;?&amp;quot;&lt;/span&gt;, &lt;span style="color: #2b91af"&gt;StringComparison&lt;/span&gt;.OrdinalIgnoreCase) + 1);&lt;br /&gt;        }&lt;br /&gt;        &lt;span style="color: blue"&gt;return &lt;/span&gt;value;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    &lt;span style="color: gray"&gt;/// &amp;lt;summary&amp;gt;&lt;br /&gt;    /// &lt;/span&gt;&lt;span style="color: green"&gt;Fills from string.&lt;br /&gt;    &lt;/span&gt;&lt;span style="color: gray"&gt;/// &amp;lt;/summary&amp;gt;&lt;br /&gt;    /// &amp;lt;param name=&amp;quot;value&amp;quot;&amp;gt;&lt;/span&gt;&lt;span style="color: green"&gt;The value.&lt;/span&gt;&lt;span style="color: gray"&gt;&amp;lt;/param&amp;gt;&lt;br /&gt;    /// &amp;lt;returns&amp;gt;&amp;lt;/returns&amp;gt;&lt;br /&gt;    &lt;/span&gt;&lt;span style="color: blue"&gt;public &lt;/span&gt;&lt;span style="color: #2b91af"&gt;QueryStringCollection &lt;/span&gt;FillFromString(&lt;span style="color: blue"&gt;string &lt;/span&gt;value)&lt;br /&gt;    {&lt;br /&gt;        &lt;span style="color: blue"&gt;base&lt;/span&gt;.Clear();&lt;br /&gt;        &lt;span style="color: blue"&gt;if &lt;/span&gt;(&lt;span style="color: blue"&gt;string&lt;/span&gt;.IsNullOrEmpty(value)) &lt;span style="color: blue"&gt;return this&lt;/span&gt;;&lt;br /&gt;        &lt;span style="color: blue"&gt;foreach &lt;/span&gt;(&lt;span style="color: blue"&gt;string &lt;/span&gt;keyValuePair &lt;span style="color: blue"&gt;in &lt;/span&gt;ExtractQueryString(value).Split(&lt;span style="color: #a31515"&gt;'&amp;amp;'&lt;/span&gt;))&lt;br /&gt;        {&lt;br /&gt;            &lt;span style="color: blue"&gt;if &lt;/span&gt;(&lt;span style="color: blue"&gt;string&lt;/span&gt;.IsNullOrEmpty(keyValuePair)) &lt;span style="color: blue"&gt;continue&lt;/span&gt;;&lt;br /&gt;            &lt;span style="color: blue"&gt;string&lt;/span&gt;[] split = keyValuePair.Split(&lt;span style="color: #a31515"&gt;'='&lt;/span&gt;);&lt;br /&gt;            &lt;span style="color: blue"&gt;base&lt;/span&gt;.Add(split[0],&lt;br /&gt;                split.Length == 2 ? split[1] : &lt;span style="color: #a31515"&gt;&amp;quot;&amp;quot;&lt;/span&gt;);&lt;br /&gt;        }&lt;br /&gt;        &lt;span style="color: blue"&gt;return this&lt;/span&gt;;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    &lt;span style="color: gray"&gt;/// &amp;lt;summary&amp;gt;&lt;br /&gt;    /// &lt;/span&gt;&lt;span style="color: green"&gt;returns a QueryString object based on the current querystring of the request&lt;br /&gt;    &lt;/span&gt;&lt;span style="color: gray"&gt;/// &amp;lt;/summary&amp;gt;&lt;br /&gt;    /// &amp;lt;returns&amp;gt;&lt;/span&gt;&lt;span style="color: green"&gt;the QueryString object &lt;/span&gt;&lt;span style="color: gray"&gt;&amp;lt;/returns&amp;gt;&lt;br /&gt;    &lt;/span&gt;&lt;span style="color: blue"&gt;public &lt;/span&gt;&lt;span style="color: #2b91af"&gt;QueryStringCollection &lt;/span&gt;FromCurrent()&lt;br /&gt;    {&lt;br /&gt;        &lt;span style="color: blue"&gt;if &lt;/span&gt;(&lt;span style="color: #2b91af"&gt;HttpContext&lt;/span&gt;.Current != &lt;span style="color: blue"&gt;null&lt;/span&gt;)&lt;br /&gt;        {&lt;br /&gt;            &lt;span style="color: blue"&gt;return &lt;/span&gt;FillFromString(&lt;span style="color: #2b91af"&gt;HttpContext&lt;/span&gt;.Current.Request.QueryString.ToString());&lt;br /&gt;        }&lt;br /&gt;        &lt;span style="color: blue"&gt;base&lt;/span&gt;.Clear();&lt;br /&gt;        &lt;span style="color: blue"&gt;return this&lt;/span&gt;;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    &lt;span style="color: gray"&gt;/// &amp;lt;summary&amp;gt;&lt;br /&gt;    /// &lt;/span&gt;&lt;span style="color: green"&gt;add a name value pair to the collection&lt;br /&gt;    &lt;/span&gt;&lt;span style="color: gray"&gt;/// &amp;lt;/summary&amp;gt;&lt;br /&gt;    /// &amp;lt;param name=&amp;quot;name&amp;quot;&amp;gt;&lt;/span&gt;&lt;span style="color: green"&gt;the name&lt;/span&gt;&lt;span style="color: gray"&gt;&amp;lt;/param&amp;gt;&lt;br /&gt;    /// &amp;lt;param name=&amp;quot;value&amp;quot;&amp;gt;&lt;/span&gt;&lt;span style="color: green"&gt;the value associated to the name&lt;/span&gt;&lt;span style="color: gray"&gt;&amp;lt;/param&amp;gt;&lt;br /&gt;    /// &amp;lt;returns&amp;gt;&lt;/span&gt;&lt;span style="color: green"&gt;the QueryString object &lt;/span&gt;&lt;span style="color: gray"&gt;&amp;lt;/returns&amp;gt;&lt;br /&gt;    &lt;/span&gt;&lt;span style="color: blue"&gt;public new &lt;/span&gt;&lt;span style="color: #2b91af"&gt;QueryStringCollection &lt;/span&gt;Add(&lt;span style="color: blue"&gt;string &lt;/span&gt;name, &lt;span style="color: blue"&gt;string &lt;/span&gt;value)&lt;br /&gt;    {&lt;br /&gt;        &lt;span style="color: blue"&gt;return &lt;/span&gt;Add(name, value, &lt;span style="color: blue"&gt;false&lt;/span&gt;);&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    &lt;span style="color: gray"&gt;/// &amp;lt;summary&amp;gt;&lt;br /&gt;    /// &lt;/span&gt;&lt;span style="color: green"&gt;adds a name value pair to the collection&lt;br /&gt;    &lt;/span&gt;&lt;span style="color: gray"&gt;/// &amp;lt;/summary&amp;gt;&lt;br /&gt;    /// &amp;lt;param name=&amp;quot;name&amp;quot;&amp;gt;&lt;/span&gt;&lt;span style="color: green"&gt;the name&lt;/span&gt;&lt;span style="color: gray"&gt;&amp;lt;/param&amp;gt;&lt;br /&gt;    /// &amp;lt;param name=&amp;quot;value&amp;quot;&amp;gt;&lt;/span&gt;&lt;span style="color: green"&gt;the value associated to the name&lt;/span&gt;&lt;span style="color: gray"&gt;&amp;lt;/param&amp;gt;&lt;br /&gt;    /// &amp;lt;param name=&amp;quot;isUnique&amp;quot;&amp;gt;&lt;/span&gt;&lt;span style="color: green"&gt;true if the name is unique within the querystring. This allows us to override existing values&lt;/span&gt;&lt;span style="color: gray"&gt;&amp;lt;/param&amp;gt;&lt;br /&gt;    /// &amp;lt;returns&amp;gt;&lt;/span&gt;&lt;span style="color: green"&gt;the QueryString object &lt;/span&gt;&lt;span style="color: gray"&gt;&amp;lt;/returns&amp;gt;&lt;br /&gt;    &lt;/span&gt;&lt;span style="color: blue"&gt;public &lt;/span&gt;&lt;span style="color: #2b91af"&gt;QueryStringCollection &lt;/span&gt;Add(&lt;span style="color: blue"&gt;string &lt;/span&gt;name, &lt;span style="color: blue"&gt;string &lt;/span&gt;value, &lt;span style="color: blue"&gt;bool &lt;/span&gt;isUnique)&lt;br /&gt;    {&lt;br /&gt;        &lt;span style="color: blue"&gt;string &lt;/span&gt;existingValue = &lt;span style="color: blue"&gt;base&lt;/span&gt;[name];&lt;br /&gt;        &lt;span style="color: blue"&gt;if &lt;/span&gt;(&lt;span style="color: blue"&gt;string&lt;/span&gt;.IsNullOrEmpty(existingValue))&lt;br /&gt;            &lt;span style="color: blue"&gt;base&lt;/span&gt;.Add(name, &lt;span style="color: #2b91af"&gt;HttpUtility&lt;/span&gt;.UrlEncodeUnicode(value));&lt;br /&gt;        &lt;span style="color: blue"&gt;else if &lt;/span&gt;(isUnique)&lt;br /&gt;            &lt;span style="color: blue"&gt;base&lt;/span&gt;[name] = &lt;span style="color: #2b91af"&gt;HttpUtility&lt;/span&gt;.UrlEncodeUnicode(value);&lt;br /&gt;        &lt;span style="color: blue"&gt;else&lt;br /&gt;            base&lt;/span&gt;[name] += &lt;span style="color: #a31515"&gt;&amp;quot;,&amp;quot; &lt;/span&gt;+ &lt;span style="color: #2b91af"&gt;HttpUtility&lt;/span&gt;.UrlEncodeUnicode(value);&lt;br /&gt;        &lt;span style="color: blue"&gt;return this&lt;/span&gt;;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    &lt;span style="color: gray"&gt;/// &amp;lt;summary&amp;gt;&lt;br /&gt;    /// &lt;/span&gt;&lt;span style="color: green"&gt;removes a name value pair from the querystring collection&lt;br /&gt;    &lt;/span&gt;&lt;span style="color: gray"&gt;/// &amp;lt;/summary&amp;gt;&lt;br /&gt;    /// &amp;lt;param name=&amp;quot;name&amp;quot;&amp;gt;&lt;/span&gt;&lt;span style="color: green"&gt;name of the querystring value to remove&lt;/span&gt;&lt;span style="color: gray"&gt;&amp;lt;/param&amp;gt;&lt;br /&gt;    /// &amp;lt;returns&amp;gt;&lt;/span&gt;&lt;span style="color: green"&gt;the QueryString object&lt;/span&gt;&lt;span style="color: gray"&gt;&amp;lt;/returns&amp;gt;&lt;br /&gt;    &lt;/span&gt;&lt;span style="color: blue"&gt;public new &lt;/span&gt;&lt;span style="color: #2b91af"&gt;QueryStringCollection &lt;/span&gt;Remove(&lt;span style="color: blue"&gt;string &lt;/span&gt;name)&lt;br /&gt;    {&lt;br /&gt;        &lt;span style="color: blue"&gt;string &lt;/span&gt;existingValue = &lt;span style="color: blue"&gt;base&lt;/span&gt;[name];&lt;br /&gt;        &lt;span style="color: blue"&gt;if &lt;/span&gt;(!&lt;span style="color: blue"&gt;string&lt;/span&gt;.IsNullOrEmpty(existingValue))&lt;br /&gt;            &lt;span style="color: blue"&gt;base&lt;/span&gt;.Remove(name);&lt;br /&gt;        &lt;span style="color: blue"&gt;return this&lt;/span&gt;;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    &lt;span style="color: gray"&gt;/// &amp;lt;summary&amp;gt;&lt;br /&gt;    /// &lt;/span&gt;&lt;span style="color: green"&gt;clears the collection&lt;br /&gt;    &lt;/span&gt;&lt;span style="color: gray"&gt;/// &amp;lt;/summary&amp;gt;&lt;br /&gt;    /// &amp;lt;returns&amp;gt;&lt;/span&gt;&lt;span style="color: green"&gt;the QueryString object &lt;/span&gt;&lt;span style="color: gray"&gt;&amp;lt;/returns&amp;gt;&lt;br /&gt;    &lt;/span&gt;&lt;span style="color: blue"&gt;public &lt;/span&gt;&lt;span style="color: #2b91af"&gt;QueryStringCollection &lt;/span&gt;Reset()&lt;br /&gt;    {&lt;br /&gt;        &lt;span style="color: blue"&gt;base&lt;/span&gt;.Clear();&lt;br /&gt;        &lt;span style="color: blue"&gt;return this&lt;/span&gt;;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    &lt;span style="color: gray"&gt;/// &amp;lt;summary&amp;gt;&lt;br /&gt;    /// &lt;/span&gt;&lt;span style="color: green"&gt;Encrypts the keys and values of the entire querystring acc. to a key you specify&lt;br /&gt;    &lt;/span&gt;&lt;span style="color: gray"&gt;/// &amp;lt;/summary&amp;gt;&lt;br /&gt;    /// &amp;lt;returns&amp;gt;&lt;/span&gt;&lt;span style="color: green"&gt;an encrypted querystring object&lt;/span&gt;&lt;span style="color: gray"&gt;&amp;lt;/returns&amp;gt;&lt;br /&gt;    &lt;/span&gt;&lt;span style="color: blue"&gt;public &lt;/span&gt;&lt;span style="color: #2b91af"&gt;QueryStringCollection &lt;/span&gt;Encrypt()&lt;br /&gt;    {&lt;br /&gt;        &lt;span style="color: #2b91af"&gt;QueryStringCollection &lt;/span&gt;qs = &lt;span style="color: blue"&gt;new &lt;/span&gt;&lt;span style="color: #2b91af"&gt;QueryStringCollection&lt;/span&gt;();&lt;br /&gt;        &lt;span style="color: blue"&gt;for &lt;/span&gt;(&lt;span style="color: blue"&gt;var &lt;/span&gt;i = 0; i &amp;lt; &lt;span style="color: blue"&gt;base&lt;/span&gt;.Keys.Count; i++)&lt;br /&gt;        {&lt;br /&gt;            &lt;span style="color: blue"&gt;if &lt;/span&gt;(!&lt;span style="color: blue"&gt;string&lt;/span&gt;.IsNullOrEmpty(&lt;span style="color: blue"&gt;base&lt;/span&gt;.Keys[i]))&lt;br /&gt;            {&lt;br /&gt;                &lt;span style="color: blue"&gt;foreach &lt;/span&gt;(&lt;span style="color: blue"&gt;string &lt;/span&gt;val &lt;span style="color: blue"&gt;in base&lt;/span&gt;[&lt;span style="color: blue"&gt;base&lt;/span&gt;.Keys[i]].Split(&lt;span style="color: #a31515"&gt;','&lt;/span&gt;))&lt;br /&gt;                    qs.Add(&lt;span style="color: blue"&gt;base&lt;/span&gt;.Keys[i].Encrypt(), &lt;span style="color: #2b91af"&gt;HttpUtility&lt;/span&gt;.UrlDecode(val).Encrypt());&lt;br /&gt;            }&lt;br /&gt;        }&lt;br /&gt;        &lt;span style="color: blue"&gt;return &lt;/span&gt;qs;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    &lt;span style="color: gray"&gt;/// &amp;lt;summary&amp;gt;&lt;br /&gt;    /// &lt;/span&gt;&lt;span style="color: green"&gt;Decrypts the keys and values of the entire querystring acc. to a key you specify&lt;br /&gt;    &lt;/span&gt;&lt;span style="color: gray"&gt;/// &amp;lt;/summary&amp;gt;&lt;br /&gt;    /// &amp;lt;returns&amp;gt;&lt;/span&gt;&lt;span style="color: green"&gt;a decrypted querystring object&lt;/span&gt;&lt;span style="color: gray"&gt;&amp;lt;/returns&amp;gt;&lt;br /&gt;    &lt;/span&gt;&lt;span style="color: blue"&gt;public &lt;/span&gt;&lt;span style="color: #2b91af"&gt;QueryStringCollection &lt;/span&gt;Decrypt()&lt;br /&gt;    {&lt;br /&gt;        &lt;span style="color: #2b91af"&gt;QueryStringCollection &lt;/span&gt;qs = &lt;span style="color: blue"&gt;new &lt;/span&gt;&lt;span style="color: #2b91af"&gt;QueryStringCollection&lt;/span&gt;();&lt;br /&gt;        &lt;span style="color: blue"&gt;for &lt;/span&gt;(&lt;span style="color: blue"&gt;var &lt;/span&gt;i = 0; i &amp;lt; &lt;span style="color: blue"&gt;base&lt;/span&gt;.Keys.Count; i++)&lt;br /&gt;        {&lt;br /&gt;            &lt;span style="color: blue"&gt;if &lt;/span&gt;(!&lt;span style="color: blue"&gt;string&lt;/span&gt;.IsNullOrEmpty(&lt;span style="color: blue"&gt;base&lt;/span&gt;.Keys[i]))&lt;br /&gt;            {&lt;br /&gt;                &lt;span style="color: blue"&gt;foreach &lt;/span&gt;(&lt;span style="color: blue"&gt;string &lt;/span&gt;val &lt;span style="color: blue"&gt;in base&lt;/span&gt;[&lt;span style="color: blue"&gt;base&lt;/span&gt;.Keys[i]].Split(&lt;span style="color: #a31515"&gt;','&lt;/span&gt;))&lt;br /&gt;                    qs.Add(&lt;span style="color: #2b91af"&gt;HttpUtility&lt;/span&gt;.UrlDecode(&lt;span style="color: blue"&gt;base&lt;/span&gt;.Keys[i]).Decrypt(), &lt;span style="color: #2b91af"&gt;HttpUtility&lt;/span&gt;.UrlDecode(val).Decrypt());&lt;br /&gt;            }&lt;br /&gt;        }&lt;br /&gt;        &lt;span style="color: blue"&gt;return &lt;/span&gt;qs;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    &lt;span style="color: gray"&gt;/// &amp;lt;summary&amp;gt;&lt;br /&gt;    /// &lt;/span&gt;&lt;span style="color: green"&gt;overrides the default&lt;br /&gt;    &lt;/span&gt;&lt;span style="color: gray"&gt;/// &amp;lt;/summary&amp;gt;&lt;br /&gt;    /// &amp;lt;param name=&amp;quot;name&amp;quot;&amp;gt;&amp;lt;/param&amp;gt;&lt;br /&gt;    /// &amp;lt;returns&amp;gt;&lt;/span&gt;&lt;span style="color: green"&gt;the associated decoded value for the specified name&lt;/span&gt;&lt;span style="color: gray"&gt;&amp;lt;/returns&amp;gt;&lt;br /&gt;    &lt;/span&gt;&lt;span style="color: blue"&gt;public new string this&lt;/span&gt;[&lt;span style="color: blue"&gt;string &lt;/span&gt;name]&lt;br /&gt;    {&lt;br /&gt;        &lt;span style="color: blue"&gt;get&lt;br /&gt;        &lt;/span&gt;{&lt;br /&gt;            &lt;span style="color: blue"&gt;return &lt;/span&gt;&lt;span style="color: #2b91af"&gt;HttpUtility&lt;/span&gt;.UrlDecode(&lt;span style="color: blue"&gt;base&lt;/span&gt;[name]);&lt;br /&gt;        }&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    &lt;span style="color: gray"&gt;/// &amp;lt;summary&amp;gt;&lt;br /&gt;    /// &lt;/span&gt;&lt;span style="color: green"&gt;overrides the default indexer&lt;br /&gt;    &lt;/span&gt;&lt;span style="color: gray"&gt;/// &amp;lt;/summary&amp;gt;&lt;br /&gt;    /// &amp;lt;param name=&amp;quot;index&amp;quot;&amp;gt;&amp;lt;/param&amp;gt;&lt;br /&gt;    /// &amp;lt;returns&amp;gt;&lt;/span&gt;&lt;span style="color: green"&gt;the associated decoded value for the specified index&lt;/span&gt;&lt;span style="color: gray"&gt;&amp;lt;/returns&amp;gt;&lt;br /&gt;    &lt;/span&gt;&lt;span style="color: blue"&gt;public new string this&lt;/span&gt;[&lt;span style="color: blue"&gt;int &lt;/span&gt;index]&lt;br /&gt;    {&lt;br /&gt;        &lt;span style="color: blue"&gt;get&lt;br /&gt;        &lt;/span&gt;{&lt;br /&gt;            &lt;span style="color: blue"&gt;return &lt;/span&gt;&lt;span style="color: #2b91af"&gt;HttpUtility&lt;/span&gt;.UrlDecode(&lt;span style="color: blue"&gt;base&lt;/span&gt;[index]);&lt;br /&gt;        }&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    &lt;span style="color: gray"&gt;/// &amp;lt;summary&amp;gt;&lt;br /&gt;    /// &lt;/span&gt;&lt;span style="color: green"&gt;checks if a name already exists within the query string collection&lt;br /&gt;    &lt;/span&gt;&lt;span style="color: gray"&gt;/// &amp;lt;/summary&amp;gt;&lt;br /&gt;    /// &amp;lt;param name=&amp;quot;name&amp;quot;&amp;gt;&lt;/span&gt;&lt;span style="color: green"&gt;the name to check&lt;/span&gt;&lt;span style="color: gray"&gt;&amp;lt;/param&amp;gt;&lt;br /&gt;    /// &amp;lt;returns&amp;gt;&lt;/span&gt;&lt;span style="color: green"&gt;a boolean if the name exists&lt;/span&gt;&lt;span style="color: gray"&gt;&amp;lt;/returns&amp;gt;&lt;br /&gt;    &lt;/span&gt;&lt;span style="color: blue"&gt;public bool &lt;/span&gt;Contains(&lt;span style="color: blue"&gt;string &lt;/span&gt;name)&lt;br /&gt;    {&lt;br /&gt;        &lt;span style="color: blue"&gt;string &lt;/span&gt;existingValue = &lt;span style="color: blue"&gt;base&lt;/span&gt;[name];&lt;br /&gt;        &lt;span style="color: blue"&gt;return &lt;/span&gt;!&lt;span style="color: blue"&gt;string&lt;/span&gt;.IsNullOrEmpty(existingValue);&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    &lt;span style="color: gray"&gt;/// &amp;lt;summary&amp;gt;&lt;br /&gt;    /// &lt;/span&gt;&lt;span style="color: green"&gt;outputs the querystring object to a string&lt;br /&gt;    &lt;/span&gt;&lt;span style="color: gray"&gt;/// &amp;lt;/summary&amp;gt;&lt;br /&gt;    /// &amp;lt;returns&amp;gt;&lt;/span&gt;&lt;span style="color: green"&gt;the encoded querystring as it would appear in a browser&lt;/span&gt;&lt;span style="color: gray"&gt;&amp;lt;/returns&amp;gt;&lt;br /&gt;    &lt;/span&gt;&lt;span style="color: blue"&gt;public override string &lt;/span&gt;ToString()&lt;br /&gt;    {&lt;br /&gt;        &lt;span style="color: #2b91af"&gt;StringBuilder &lt;/span&gt;builder = &lt;span style="color: blue"&gt;new &lt;/span&gt;&lt;span style="color: #2b91af"&gt;StringBuilder&lt;/span&gt;();&lt;br /&gt;        &lt;span style="color: blue"&gt;for &lt;/span&gt;(&lt;span style="color: blue"&gt;var &lt;/span&gt;i = 0; i &amp;lt; &lt;span style="color: blue"&gt;base&lt;/span&gt;.Keys.Count; i++)&lt;br /&gt;        {&lt;br /&gt;            &lt;span style="color: blue"&gt;if &lt;/span&gt;(!&lt;span style="color: blue"&gt;string&lt;/span&gt;.IsNullOrEmpty(&lt;span style="color: blue"&gt;base&lt;/span&gt;.Keys[i]))&lt;br /&gt;            {&lt;br /&gt;                &lt;span style="color: blue"&gt;foreach &lt;/span&gt;(&lt;span style="color: blue"&gt;string &lt;/span&gt;val &lt;span style="color: blue"&gt;in base&lt;/span&gt;[&lt;span style="color: blue"&gt;base&lt;/span&gt;.Keys[i]].Split(&lt;span style="color: #a31515"&gt;','&lt;/span&gt;))&lt;br /&gt;                    builder.Append((builder.Length == 0) ? &lt;span style="color: #a31515"&gt;&amp;quot;?&amp;quot; &lt;/span&gt;: &lt;span style="color: #a31515"&gt;&amp;quot;&amp;amp;&amp;quot;&lt;/span&gt;).Append(&lt;span style="color: #2b91af"&gt;HttpUtility&lt;/span&gt;.UrlEncodeUnicode(&lt;span style="color: blue"&gt;base&lt;/span&gt;.Keys[i])).Append(&lt;span style="color: #a31515"&gt;&amp;quot;=&amp;quot;&lt;/span&gt;).Append(val);&lt;br /&gt;            }&lt;br /&gt;        }&lt;br /&gt;        &lt;span style="color: blue"&gt;return &lt;/span&gt;builder.ToString();&lt;br /&gt;    }&lt;br /&gt;}&lt;/pre&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6463343857615764564-942160298350646851?l=simiansoftware.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://simiansoftware.blogspot.com/feeds/942160298350646851/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6463343857615764564&amp;postID=942160298350646851' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6463343857615764564/posts/default/942160298350646851'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6463343857615764564/posts/default/942160298350646851'/><link rel='alternate' type='text/html' href='http://simiansoftware.blogspot.com/2009/02/query-string-utilities.html' title='Query String Utilities'/><author><name>CodeMonkey</name><uri>http://www.blogger.com/profile/04940025489236520116</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6463343857615764564.post-4671693518696174360</id><published>2009-02-08T15:45:00.001-08:00</published><updated>2009-02-08T15:52:51.615-08:00</updated><title type='text'>Guid.TryParse()</title><content type='html'>&lt;p&gt;Are you ever passed GUID’s via a query string? How can you trust that it is a real GUID? I want to be able to do this&lt;/p&gt;  &lt;pre class="code"&gt;&lt;span style="color: #2b91af"&gt;Guid &lt;/span&gt;result;&lt;br /&gt;&lt;span style="color: blue"&gt;if &lt;/span&gt;(&lt;span style="color: #2b91af"&gt;GuidHelper&lt;/span&gt;.TryParse(Request[&lt;span style="color: #a31515"&gt;&amp;quot;ID&amp;quot;&lt;/span&gt;], &lt;span style="color: blue"&gt;out &lt;/span&gt;result))&lt;br /&gt;    &lt;span style="color: blue"&gt;return &lt;/span&gt;result;&lt;br /&gt;&lt;span style="color: blue"&gt;else&lt;br /&gt;    return null&lt;/span&gt;;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;I have to parse Guids occasionally so I wrote this little helper to add to where the .Net Framework is lacking.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre class="code"&gt;&lt;span style="color: blue"&gt;public static class &lt;/span&gt;&lt;span style="color: #2b91af"&gt;GuidHelper&lt;br /&gt;&lt;/span&gt;{&lt;br /&gt;        &lt;span style="color: blue"&gt;private static &lt;/span&gt;&lt;span style="color: #2b91af"&gt;Regex &lt;/span&gt;guidFormat = &lt;span style="color: blue"&gt;new &lt;/span&gt;&lt;span style="color: #2b91af"&gt;Regex&lt;/span&gt;(&lt;br /&gt;        &lt;span style="color: #a31515"&gt;&amp;quot;^[A-Fa-f0-9]{32}$|&amp;quot; &lt;/span&gt;+&lt;br /&gt;        &lt;span style="color: #a31515"&gt;&amp;quot;^({|\\()?[A-Fa-f0-9]{8}-([A-Fa-f0-9]{4}-){3}[A-Fa-f0-9]{12}(}|\\))?$|&amp;quot; &lt;/span&gt;+&lt;br /&gt;        &lt;span style="color: #a31515"&gt;&amp;quot;^({)?[0xA-Fa-f0-9]{3,10}(, {0,1}[0xA-Fa-f0-9]{3,6}){2}, {0,1}({)([0xA-Fa-f0-9]{3,4}, &amp;quot; &lt;/span&gt;+&lt;br /&gt;        &lt;span style="color: #a31515"&gt;&amp;quot;{0,1}){7}[0xA-Fa-f0-9]{3,4}(}})$&amp;quot;&lt;/span&gt;,&lt;br /&gt;        &lt;span style="color: #2b91af"&gt;RegexOptions&lt;/span&gt;.Compiled|&lt;span style="color: #2b91af"&gt;RegexOptions&lt;/span&gt;.CultureInvariant|&lt;span style="color: #2b91af"&gt;RegexOptions&lt;/span&gt;.Singleline);&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;    &lt;span style="color: gray"&gt;/// &amp;lt;summary&amp;gt;&lt;br /&gt;    /// &lt;/span&gt;&lt;span style="color: green"&gt;Converts the string representation of a Guid to its Guid &lt;br /&gt;    &lt;/span&gt;&lt;span style="color: gray"&gt;/// &lt;/span&gt;&lt;span style="color: green"&gt;equivalent. A return value indicates whether the operation &lt;br /&gt;    &lt;/span&gt;&lt;span style="color: gray"&gt;/// &lt;/span&gt;&lt;span style="color: green"&gt;succeeded. &lt;br /&gt;    &lt;/span&gt;&lt;span style="color: gray"&gt;/// &amp;lt;/summary&amp;gt;&lt;br /&gt;    /// &amp;lt;param name=&amp;quot;value&amp;quot;&amp;gt;&lt;/span&gt;&lt;span style="color: green"&gt;A string containing a Guid to convert.&lt;/span&gt;&lt;span style="color: gray"&gt;&amp;lt;/param&amp;gt;&lt;br /&gt;    /// &amp;lt;param name=&amp;quot;result&amp;quot;&amp;gt;&lt;br /&gt;    /// &lt;/span&gt;&lt;span style="color: green"&gt;When this method returns, contains the Guid value equivalent to &lt;br /&gt;    &lt;/span&gt;&lt;span style="color: gray"&gt;/// &lt;/span&gt;&lt;span style="color: green"&gt;the Guid contained in &lt;/span&gt;&lt;span style="color: gray"&gt;&amp;lt;paramref name=&amp;quot;value&amp;quot;/&amp;gt;&lt;/span&gt;&lt;span style="color: green"&gt;, if the conversion &lt;br /&gt;    &lt;/span&gt;&lt;span style="color: gray"&gt;/// &lt;/span&gt;&lt;span style="color: green"&gt;succeeded, or &lt;/span&gt;&lt;span style="color: gray"&gt;&amp;lt;see cref=&amp;quot;Guid.Empty&amp;quot;/&amp;gt; &lt;/span&gt;&lt;span style="color: green"&gt;if the conversion failed. &lt;br /&gt;    &lt;/span&gt;&lt;span style="color: gray"&gt;/// &lt;/span&gt;&lt;span style="color: green"&gt;The conversion fails if the &lt;/span&gt;&lt;span style="color: gray"&gt;&amp;lt;paramref name=&amp;quot;value&amp;quot;/&amp;gt; &lt;/span&gt;&lt;span style="color: green"&gt;parameter is a &lt;br /&gt;    &lt;/span&gt;&lt;span style="color: gray"&gt;/// &amp;lt;see langword=&amp;quot;null&amp;quot; /&amp;gt; &lt;/span&gt;&lt;span style="color: green"&gt;reference (&lt;/span&gt;&lt;span style="color: gray"&gt;&amp;lt;see langword=&amp;quot;Nothing&amp;quot; /&amp;gt; &lt;/span&gt;&lt;span style="color: green"&gt;in &lt;br /&gt;    &lt;/span&gt;&lt;span style="color: gray"&gt;/// &lt;/span&gt;&lt;span style="color: green"&gt;Visual Basic), or is not of the correct format. &lt;br /&gt;    &lt;/span&gt;&lt;span style="color: gray"&gt;/// &amp;lt;/param&amp;gt;&lt;br /&gt;    /// &amp;lt;value&amp;gt;&lt;br /&gt;    /// &amp;lt;see langword=&amp;quot;true&amp;quot; /&amp;gt; &lt;/span&gt;&lt;span style="color: green"&gt;if &lt;/span&gt;&lt;span style="color: gray"&gt;&amp;lt;paramref name=&amp;quot;value&amp;quot;/&amp;gt; &lt;/span&gt;&lt;span style="color: green"&gt;was converted &lt;br /&gt;    &lt;/span&gt;&lt;span style="color: gray"&gt;/// &lt;/span&gt;&lt;span style="color: green"&gt;successfully; otherwise, &lt;/span&gt;&lt;span style="color: gray"&gt;&amp;lt;see langword=&amp;quot;false&amp;quot; /&amp;gt;&lt;/span&gt;&lt;span style="color: green"&gt;.&lt;br /&gt;    &lt;/span&gt;&lt;span style="color: gray"&gt;/// &amp;lt;/value&amp;gt;&lt;br /&gt;    /// &amp;lt;exception cref=&amp;quot;ArgumentNullException&amp;quot;&amp;gt;&lt;br /&gt;    ///        &lt;/span&gt;&lt;span style="color: green"&gt;Thrown if &lt;/span&gt;&lt;span style="color: gray"&gt;&amp;lt;pararef name=&amp;quot;value&amp;quot;/&amp;gt; &lt;/span&gt;&lt;span style="color: green"&gt;is &lt;/span&gt;&lt;span style="color: gray"&gt;&amp;lt;see langword=&amp;quot;null&amp;quot;/&amp;gt;&lt;/span&gt;&lt;span style="color: green"&gt;.&lt;br /&gt;    &lt;/span&gt;&lt;span style="color: gray"&gt;/// &amp;lt;/exception&amp;gt;&lt;br /&gt;    &lt;/span&gt;&lt;span style="color: blue"&gt;public static bool &lt;/span&gt;TryParse(&lt;span style="color: blue"&gt;string &lt;/span&gt;value, &lt;span style="color: blue"&gt;out &lt;/span&gt;&lt;span style="color: #2b91af"&gt;Guid &lt;/span&gt;result)&lt;br /&gt;    {&lt;br /&gt;        &lt;span style="color: blue"&gt;if &lt;/span&gt;(!&lt;span style="color: blue"&gt;string&lt;/span&gt;.IsNullOrEmpty(value))&lt;br /&gt;        {&lt;br /&gt;            &lt;span style="color: #2b91af"&gt;Match &lt;/span&gt;match = guidFormat.Match(value);&lt;br /&gt;            &lt;span style="color: blue"&gt;if &lt;/span&gt;(match.Success)&lt;br /&gt;            {&lt;br /&gt;                result = &lt;span style="color: blue"&gt;new &lt;/span&gt;&lt;span style="color: #2b91af"&gt;Guid&lt;/span&gt;(value);&lt;br /&gt;                &lt;span style="color: blue"&gt;return true&lt;/span&gt;;&lt;br /&gt;            }&lt;br /&gt;        }&lt;br /&gt;        result = &lt;span style="color: #2b91af"&gt;Guid&lt;/span&gt;.Empty;&lt;br /&gt;        &lt;span style="color: blue"&gt;return false&lt;/span&gt;;&lt;br /&gt;    }&lt;br /&gt;}&lt;/pre&gt;&lt;br /&gt;&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6463343857615764564-4671693518696174360?l=simiansoftware.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://simiansoftware.blogspot.com/feeds/4671693518696174360/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6463343857615764564&amp;postID=4671693518696174360' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6463343857615764564/posts/default/4671693518696174360'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6463343857615764564/posts/default/4671693518696174360'/><link rel='alternate' type='text/html' href='http://simiansoftware.blogspot.com/2009/02/guidtryparse.html' title='Guid.TryParse()'/><author><name>CodeMonkey</name><uri>http://www.blogger.com/profile/04940025489236520116</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6463343857615764564.post-1296971270254406488</id><published>2009-02-08T14:11:00.000-08:00</published><updated>2009-02-08T15:00:03.378-08:00</updated><title type='text'>Triple DES Encrypt/decrypt extension method</title><content type='html'>&lt;div&gt;I wanted to have a simple encryption method so that I could convert any string. &lt;/div&gt;  &lt;pre class="code"&gt;&lt;span style="color: blue"&gt;return &lt;/span&gt;credentials.Encrypt();&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;You should note that there is no constructor as it is better to initialise our key with a function call.&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre class="code"&gt;&lt;span style="color: gray"&gt;/// &amp;lt;summary&amp;gt;&lt;br /&gt;/// &lt;/span&gt;&lt;span style="color: green"&gt;The class will encrypt or decrpyt based on Triple DES algoritm&lt;br /&gt;&lt;/span&gt;&lt;span style="color: gray"&gt;/// &amp;lt;/summary&amp;gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: blue"&gt;public static class &lt;/span&gt;&lt;span style="color: #2b91af"&gt;EncryptionService&lt;br /&gt;&lt;/span&gt;{&lt;br /&gt;    &lt;span style="color: blue"&gt;static byte&lt;/span&gt;[] _encryptionKey = InitialiseKey();&lt;br /&gt;&lt;br /&gt;    &lt;span style="color: gray"&gt;/// &amp;lt;summary&amp;gt;&lt;br /&gt;    /// &lt;/span&gt;&lt;span style="color: green"&gt;Initialises the key.&lt;br /&gt;    &lt;/span&gt;&lt;span style="color: gray"&gt;/// &amp;lt;/summary&amp;gt;&lt;br /&gt;    /// &amp;lt;returns&amp;gt;&amp;lt;/returns&amp;gt;&lt;br /&gt;    &lt;/span&gt;&lt;span style="color: blue"&gt;private static byte&lt;/span&gt;[] InitialiseKey()&lt;br /&gt;    {&lt;br /&gt;        &lt;span style="color: blue"&gt;string &lt;/span&gt;encryptionKey = &lt;span style="color: #2b91af"&gt;ConfigurationManager&lt;/span&gt;.AppSettings[&lt;span style="color: #a31515"&gt;&amp;quot;EncryptionPassword&amp;quot;&lt;/span&gt;];&lt;br /&gt;        &lt;span style="color: blue"&gt;if &lt;/span&gt;(&lt;span style="color: blue"&gt;string&lt;/span&gt;.IsNullOrEmpty(encryptionKey))&lt;br /&gt;            &lt;span style="color: blue"&gt;throw new &lt;/span&gt;&lt;span style="color: #2b91af"&gt;ConfigurationErrorsException&lt;/span&gt;(&lt;span style="color: #a31515"&gt;&lt;br /&gt;		&amp;quot;'EncryptionPassword' is not defined in your config file.&amp;quot;&lt;/span&gt;);&lt;br /&gt;&lt;br /&gt;        &lt;span style="color: blue"&gt;byte&lt;/span&gt;[] encryptionKeyBytes = &lt;span style="color: #2b91af"&gt;ASCIIEncoding&lt;/span&gt;.ASCII.GetBytes(encryptionKey);&lt;br /&gt;&lt;br /&gt;        &lt;span style="color: blue"&gt;using &lt;/span&gt;(&lt;span style="color: #2b91af"&gt;MD5CryptoServiceProvider &lt;/span&gt;hashmd5 = &lt;span style="color: blue"&gt;new &lt;/span&gt;&lt;span style="color: #2b91af"&gt;MD5CryptoServiceProvider&lt;/span&gt;())&lt;br /&gt;        {&lt;br /&gt;            &lt;span style="color: blue"&gt;return &lt;/span&gt;hashmd5.ComputeHash(encryptionKeyBytes);&lt;br /&gt;        }&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    &lt;span style="color: gray"&gt;/// &amp;lt;summary&amp;gt;&lt;br /&gt;    /// &lt;/span&gt;&lt;span style="color: green"&gt;Decrypts the specified input.&lt;br /&gt;    &lt;/span&gt;&lt;span style="color: gray"&gt;/// &amp;lt;/summary&amp;gt;&lt;br /&gt;    /// &amp;lt;param name=&amp;quot;input&amp;quot;&amp;gt;&lt;/span&gt;&lt;span style="color: green"&gt;The input.&lt;/span&gt;&lt;span style="color: gray"&gt;&amp;lt;/param&amp;gt;&lt;br /&gt;    /// &amp;lt;returns&amp;gt;&amp;lt;/returns&amp;gt;&lt;br /&gt;    &lt;/span&gt;&lt;span style="color: blue"&gt;public static string &lt;/span&gt;Decrypt(&lt;span style="color: blue"&gt;this string &lt;/span&gt;input)&lt;br /&gt;    {&lt;br /&gt;        &lt;span style="color: blue"&gt;if &lt;/span&gt;(&lt;span style="color: blue"&gt;string&lt;/span&gt;.IsNullOrEmpty(input))&lt;br /&gt;            &lt;span style="color: blue"&gt;return string&lt;/span&gt;.Empty;&lt;br /&gt;&lt;br /&gt;        &lt;span style="color: blue"&gt;using &lt;/span&gt;(&lt;span style="color: #2b91af"&gt;TripleDESCryptoServiceProvider &lt;/span&gt;des = &lt;span style="color: blue"&gt;new &lt;/span&gt;&lt;span style="color: #2b91af"&gt;TripleDESCryptoServiceProvider&lt;/span&gt;())&lt;br /&gt;        {&lt;br /&gt;            des.Key = _encryptionKey;&lt;br /&gt;            des.Mode = &lt;span style="color: #2b91af"&gt;CipherMode&lt;/span&gt;.ECB;&lt;br /&gt;&lt;br /&gt;            &lt;span style="color: blue"&gt;byte&lt;/span&gt;[] buff = &lt;span style="color: blue"&gt;null&lt;/span&gt;;&lt;br /&gt;            &lt;span style="color: blue"&gt;try&lt;br /&gt;            &lt;/span&gt;{&lt;br /&gt;                buff = &lt;span style="color: #2b91af"&gt;Convert&lt;/span&gt;.FromBase64String(input);&lt;br /&gt;            }&lt;br /&gt;            &lt;span style="color: blue"&gt;catch &lt;/span&gt;(&lt;span style="color: #2b91af"&gt;FormatException&lt;/span&gt;)&lt;br /&gt;            {&lt;br /&gt;                &lt;span style="color: blue"&gt;return string&lt;/span&gt;.Empty;&lt;br /&gt;            }&lt;br /&gt;&lt;br /&gt;            &lt;span style="color: blue"&gt;return &lt;/span&gt;&lt;span style="color: #2b91af"&gt;ASCIIEncoding&lt;/span&gt;.ASCII.GetString(&lt;br /&gt;                des.CreateDecryptor().TransformFinalBlock(buff, 0, buff.Length));&lt;br /&gt;        }&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    &lt;span style="color: gray"&gt;/// &amp;lt;summary&amp;gt;&lt;br /&gt;    /// &lt;/span&gt;&lt;span style="color: green"&gt;Encrypts the specified input.&lt;br /&gt;    &lt;/span&gt;&lt;span style="color: gray"&gt;/// &amp;lt;/summary&amp;gt;&lt;br /&gt;    /// &amp;lt;param name=&amp;quot;input&amp;quot;&amp;gt;&lt;/span&gt;&lt;span style="color: green"&gt;The input.&lt;/span&gt;&lt;span style="color: gray"&gt;&amp;lt;/param&amp;gt;&lt;br /&gt;    /// &amp;lt;returns&amp;gt;&amp;lt;/returns&amp;gt;&lt;br /&gt;    &lt;/span&gt;&lt;span style="color: blue"&gt;public static string &lt;/span&gt;Encrypt(&lt;span style="color: blue"&gt;this string &lt;/span&gt;input)&lt;br /&gt;    {&lt;br /&gt;        &lt;span style="color: blue"&gt;using &lt;/span&gt;(&lt;span style="color: #2b91af"&gt;TripleDESCryptoServiceProvider &lt;/span&gt;des = &lt;span style="color: blue"&gt;new &lt;/span&gt;&lt;span style="color: #2b91af"&gt;TripleDESCryptoServiceProvider&lt;/span&gt;())&lt;br /&gt;        {&lt;br /&gt;            des.Key = _encryptionKey;&lt;br /&gt;            des.Mode = &lt;span style="color: #2b91af"&gt;CipherMode&lt;/span&gt;.ECB;&lt;br /&gt;&lt;br /&gt;            &lt;span style="color: blue"&gt;byte&lt;/span&gt;[] buff = &lt;span style="color: #2b91af"&gt;ASCIIEncoding&lt;/span&gt;.ASCII.GetBytes(input);&lt;br /&gt;&lt;br /&gt;            &lt;span style="color: blue"&gt;return &lt;/span&gt;&lt;span style="color: #2b91af"&gt;Convert&lt;/span&gt;.ToBase64String(&lt;br /&gt;                des.CreateEncryptor().TransformFinalBlock(buff, 0, buff.Length));&lt;br /&gt;        }&lt;br /&gt;    }&lt;br /&gt;}&lt;/pre&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6463343857615764564-1296971270254406488?l=simiansoftware.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://simiansoftware.blogspot.com/feeds/1296971270254406488/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6463343857615764564&amp;postID=1296971270254406488' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6463343857615764564/posts/default/1296971270254406488'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6463343857615764564/posts/default/1296971270254406488'/><link rel='alternate' type='text/html' href='http://simiansoftware.blogspot.com/2009/02/triple-des-encryptdecrypt-extension.html' title='Triple DES Encrypt/decrypt extension method'/><author><name>CodeMonkey</name><uri>http://www.blogger.com/profile/04940025489236520116</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6463343857615764564.post-4323421307103003347</id><published>2009-02-08T11:00:00.000-08:00</published><updated>2009-02-08T14:50:08.135-08:00</updated><title type='text'>Formatted Code in a blog</title><content type='html'>I realised that over the years I have never blogged any of my work as I never had time. So now I intend to address this matter and place little utilities and snippets up for other people. First I wanted to make all of my code look nice and neat, so I started looking at the following blog.&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;a href="http://james.newtonking.com/archive/2008/05/13/display-nicely-formatted-net-source-code-on-your-blog.aspx"&gt;http://james.newtonking.com/archive/2008/05/13/display-nicely-formatted-net-source-code-on-your-blog.aspx&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;But then I found this little add-in&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt; &lt;a href="http://gallery.live.com/liveItemDetail.aspx?li=d8835a5e-28da-4242-82eb-e1a006b083b9&amp;amp;bt=9&amp;amp;pl=8"&gt;http://gallery.live.com/liveItemDetail.aspx?li=d8835a5e-28da-4242-82eb-e1a006b083b9&amp;amp;bt=9&amp;amp;pl=8&lt;/a&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6463343857615764564-4323421307103003347?l=simiansoftware.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://simiansoftware.blogspot.com/feeds/4323421307103003347/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6463343857615764564&amp;postID=4323421307103003347' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6463343857615764564/posts/default/4323421307103003347'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6463343857615764564/posts/default/4323421307103003347'/><link rel='alternate' type='text/html' href='http://simiansoftware.blogspot.com/2009/02/formatted-code-in-blog.html' title='Formatted Code in a blog'/><author><name>CodeMonkey</name><uri>http://www.blogger.com/profile/04940025489236520116</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6463343857615764564.post-6389948404310887601</id><published>2008-11-04T08:01:00.000-08:00</published><updated>2009-02-09T06:54:18.179-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Dictionaries'/><title type='text'>Using dictionaries for constant Identifiers</title><content type='html'>I wanted to have a constant string so that I could have a list of roles, however I also wanted to have a friendly description, so how do you go about this? The reason for using a constant string is so that we are consistent when we are checking our roles. e.g.   &lt;pre class="code"&gt;&lt;span style="color: blue"&gt;if &lt;/span&gt;(_user.IsInRole(&lt;span style="color: #2b91af"&gt;Role&lt;/span&gt;.Practitioner))&lt;br /&gt;{&lt;br /&gt;       . . .&lt;br /&gt;}&lt;/pre&gt;&lt;br /&gt;But what happens when you want to get a friendly description too? Well firstly I wanted to be able to put all the roles I had defined into a drop down list, so it would be nice if all the roles were defined in one place. So I wanted to be able to do this &lt;br /&gt;&lt;br /&gt;&lt;pre class="code"&gt;&lt;span style="color: green"&gt;// Put the roles in the role dropdownlist&lt;br /&gt;&lt;/span&gt;RoleDropDownList.DataSource = &lt;span style="color: #2b91af"&gt;Role&lt;/span&gt;.Roles;&lt;br /&gt;RoleDropDownList.DataTextField = &lt;span style="color: #a31515"&gt;&amp;quot;Value&amp;quot;&lt;/span&gt;;&lt;br /&gt;RoleDropDownList.DataValueField = &lt;span style="color: #a31515"&gt;&amp;quot;Key&amp;quot;&lt;/span&gt;;&lt;br /&gt;RoleDropDownList.DataBind();&lt;br /&gt;RoleDropDownList.Items.Insert(0, &lt;span style="color: blue"&gt;new &lt;/span&gt;&lt;span style="color: #2b91af"&gt;ListItem&lt;/span&gt;(&lt;span style="color: #a31515"&gt;&amp;quot;All&amp;quot;&lt;/span&gt;, &lt;span style="color: #a31515"&gt;&amp;quot;&amp;quot;&lt;/span&gt;));&lt;/pre&gt;&lt;br /&gt;So how do we do it? Simply use a dictionary. Have the key be the constant string and the value a friendly description. Now the important point to note here is that we could be tempted to use &lt;span style="color: #2b91af"&gt;StringDictionary&lt;/span&gt; as it is a specialization of a Dictionary, but if you look carefully in the documentation, the key will be converted to a lower case string and that *is not what we want*. &lt;br /&gt;&lt;br /&gt;&lt;pre class="code"&gt;&lt;span style="color: gray"&gt;/// &amp;lt;summary&amp;gt;&lt;br /&gt;/// &lt;/span&gt;&lt;span style="color: green"&gt;These are the membership roles that users can have&lt;br /&gt;&lt;/span&gt;&lt;span style="color: gray"&gt;/// &amp;lt;/summary&amp;gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: blue"&gt;public static class &lt;/span&gt;&lt;span style="color: #2b91af"&gt;Role&lt;br /&gt;&lt;/span&gt;{&lt;br /&gt;    &lt;span style="color: gray"&gt;/// &amp;lt;summary&amp;gt;&lt;/span&gt;&lt;span style="color: green"&gt;A basic user (frozen user)&lt;/span&gt;&lt;span style="color: gray"&gt;&amp;lt;/summary&amp;gt;&lt;br /&gt;    &lt;/span&gt;&lt;span style="color: blue"&gt;public const string &lt;/span&gt;Basic = &lt;span style="color: #a31515"&gt;&amp;quot;Basic&amp;quot;&lt;/span&gt;;&lt;br /&gt;&lt;br /&gt;    &lt;span style="color: gray"&gt;/// &amp;lt;summary&amp;gt;&lt;/span&gt;&lt;span style="color: green"&gt;A standard practitioner&lt;/span&gt;&lt;span style="color: gray"&gt;&amp;lt;/summary&amp;gt;&lt;br /&gt;    &lt;/span&gt;&lt;span style="color: blue"&gt;public const string &lt;/span&gt;Practitioner = &lt;span style="color: #a31515"&gt;&amp;quot;Practitioner&amp;quot;&lt;/span&gt;;&lt;br /&gt;&lt;br /&gt;    &lt;span style="color: gray"&gt;/// &amp;lt;summary&amp;gt;&lt;/span&gt;&lt;span style="color: green"&gt;An IP administrator&lt;/span&gt;&lt;span style="color: gray"&gt;&amp;lt;/summary&amp;gt;&lt;br /&gt;    &lt;/span&gt;&lt;span style="color: blue"&gt;public const string &lt;/span&gt;Administrator = &lt;span style="color: #a31515"&gt;&amp;quot;Administrator&amp;quot;&lt;/span&gt;;&lt;br /&gt;&lt;br /&gt;    &lt;span style="color: gray"&gt;/// &amp;lt;summary&amp;gt;&lt;/span&gt;&lt;span style="color: green"&gt;A training manager&lt;/span&gt;&lt;span style="color: gray"&gt;&amp;lt;/summary&amp;gt;&lt;br /&gt;    &lt;/span&gt;&lt;span style="color: blue"&gt;public const string &lt;/span&gt;TrainingManager = &lt;span style="color: #a31515"&gt;&amp;quot;TrainingManager&amp;quot;&lt;/span&gt;;&lt;br /&gt;&lt;br /&gt;    &lt;span style="color: gray"&gt;/// &amp;lt;summary&amp;gt;&lt;/span&gt;&lt;span style="color: green"&gt;A submissions manager&lt;/span&gt;&lt;span style="color: gray"&gt;&amp;lt;/summary&amp;gt;&lt;br /&gt;    &lt;/span&gt;&lt;span style="color: blue"&gt;public const string &lt;/span&gt;SubmissionManager = &lt;span style="color: #a31515"&gt;&amp;quot;SubmissionManager&amp;quot;&lt;/span&gt;;&lt;br /&gt;&lt;br /&gt;    &lt;span style="color: gray"&gt;/// &amp;lt;summary&amp;gt;&lt;/span&gt;&lt;span style="color: green"&gt;A submission assessor&lt;/span&gt;&lt;span style="color: gray"&gt;&amp;lt;/summary&amp;gt;&lt;br /&gt;    &lt;/span&gt;&lt;span style="color: blue"&gt;public const string &lt;/span&gt;Assessor = &lt;span style="color: #a31515"&gt;&amp;quot;Assessor&amp;quot;&lt;/span&gt;;&lt;br /&gt;&lt;br /&gt;    &lt;span style="color: blue"&gt;public const string &lt;/span&gt;Mentor = &lt;span style="color: #a31515"&gt;&amp;quot;Mentor&amp;quot;&lt;/span&gt;;&lt;br /&gt;&lt;br /&gt;    &lt;span style="color: gray"&gt;/// &amp;lt;summary&amp;gt;&lt;br /&gt;    /// &lt;/span&gt;&lt;span style="color: green"&gt;Create a friendly description of each role&lt;br /&gt;    &lt;/span&gt;&lt;span style="color: gray"&gt;/// &amp;lt;/summary&amp;gt;&lt;br /&gt;    &lt;/span&gt;&lt;span style="color: blue"&gt;public static &lt;/span&gt;&lt;span style="color: #2b91af"&gt;Dictionary&lt;/span&gt;&amp;lt;&lt;span style="color: #2b91af"&gt;String&lt;/span&gt;, &lt;span style="color: #2b91af"&gt;String&lt;/span&gt;&amp;gt; Roles &lt;br /&gt;	= &lt;span style="color: blue"&gt;new &lt;/span&gt;&lt;span style="color: #2b91af"&gt;Dictionary&lt;/span&gt;&amp;lt;&lt;span style="color: #2b91af"&gt;String&lt;/span&gt;, &lt;span style="color: #2b91af"&gt;String&lt;/span&gt;&amp;gt;()&lt;br /&gt;    {&lt;br /&gt;        { Basic, &lt;span style="color: #a31515"&gt;&amp;quot;Frozen User&amp;quot; &lt;/span&gt;},&lt;br /&gt;        { Practitioner, &lt;span style="color: #a31515"&gt;&amp;quot;Practitioner&amp;quot; &lt;/span&gt;},&lt;br /&gt;        { Administrator, &lt;span style="color: #a31515"&gt;&amp;quot;Administrator&amp;quot; &lt;/span&gt;},&lt;br /&gt;        { TrainingManager, &lt;span style="color: #a31515"&gt;&amp;quot;Training Manager&amp;quot; &lt;/span&gt;},&lt;br /&gt;        { SubmissionManager, &lt;span style="color: #a31515"&gt;&amp;quot;Submission Manager&amp;quot; &lt;/span&gt;},&lt;br /&gt;        { Assessor, &lt;span style="color: #a31515"&gt;&amp;quot;Assessor&amp;quot;&lt;/span&gt;},&lt;br /&gt;        { Mentor, &lt;span style="color: #a31515"&gt;&amp;quot;Mentor&amp;quot;&lt;/span&gt;}&lt;br /&gt;    };&lt;br /&gt;}&lt;/pre&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6463343857615764564-6389948404310887601?l=simiansoftware.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://simiansoftware.blogspot.com/feeds/6389948404310887601/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6463343857615764564&amp;postID=6389948404310887601' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6463343857615764564/posts/default/6389948404310887601'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6463343857615764564/posts/default/6389948404310887601'/><link rel='alternate' type='text/html' href='http://simiansoftware.blogspot.com/2008/11/have-const-string-with-ui-description.html' title='Using dictionaries for constant Identifiers'/><author><name>CodeMonkey</name><uri>http://www.blogger.com/profile/04940025489236520116</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6463343857615764564.post-1656846251817012865</id><published>2008-09-10T07:20:00.000-07:00</published><updated>2009-02-08T15:13:21.254-08:00</updated><title type='text'>Enum Parsing</title><content type='html'>I was getting so frustrated with writing this   &lt;pre class="code"&gt;&lt;span style="color: #2b91af"&gt;ViewMode &lt;/span&gt;viewType = (&lt;span style="color: #2b91af"&gt;ViewMode&lt;/span&gt;)&lt;span style="color: #2b91af"&gt;Enum&lt;/span&gt;.Parse(&lt;span style="color: blue"&gt;typeof&lt;/span&gt;(&lt;span style="color: #2b91af"&gt;ViewMode&lt;/span&gt;), &lt;span style="color: blue"&gt;value&lt;/span&gt;);&lt;/pre&gt;&lt;br /&gt;all the time, so I created a class so I can do &lt;br /&gt;&lt;br /&gt;&lt;pre class="code"&gt;&lt;span style="color: #2b91af"&gt;ViewMode &lt;/span&gt;viewType = &lt;span style="color: #2b91af"&gt;EnumParser&lt;/span&gt;.Parse&amp;lt;&lt;span style="color: #2b91af"&gt;ViewMode&lt;/span&gt;&amp;gt;(&lt;span style="color: blue"&gt;value&lt;/span&gt;);&lt;/pre&gt;&lt;br /&gt;but the came along extension methods and now we can then do &lt;br /&gt;&lt;br /&gt;&lt;pre class="code"&gt;&lt;span style="color: #2b91af"&gt;ViewMode &lt;/span&gt;viewType = &lt;span style="color: blue"&gt;value&lt;/span&gt;.ParseEnum&amp;lt;&lt;span style="color: #2b91af"&gt;ViewMode&lt;/span&gt;&amp;gt;();&lt;/pre&gt;&lt;br /&gt;then lastly wouldn't it be cool to have the default value if you can't parse it? &lt;br /&gt;&lt;br /&gt;&lt;pre class="code"&gt;&lt;span style="color: #2b91af"&gt;ViewMode &lt;/span&gt;viewType = &lt;span style="color: blue"&gt;value&lt;/span&gt;.GetEnumOrDefault&amp;lt;&lt;span style="color: #2b91af"&gt;ViewMode&lt;/span&gt;&amp;gt;(&lt;span style="color: #2b91af"&gt;ViewMode&lt;/span&gt;.None);&lt;/pre&gt;&lt;br /&gt;so here is the class. There is also some goodies so that you can decorate your enum's with attributes and then GetDescription to have a friendly version for them! &lt;br /&gt;&lt;br /&gt;&lt;pre class="code"&gt;&lt;span style="color: gray"&gt;/// &amp;lt;summary&amp;gt;&lt;br /&gt;/// &lt;/span&gt;&lt;span style="color: green"&gt;Helpful helper class for all things with enumerations&lt;br /&gt;&lt;/span&gt;&lt;span style="color: gray"&gt;/// &amp;lt;/summary&amp;gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: blue"&gt;public static class &lt;/span&gt;&lt;span style="color: #2b91af"&gt;EnumParser&lt;br /&gt;&lt;/span&gt;{&lt;br /&gt;    &lt;span style="color: gray"&gt;/// &amp;lt;summary&amp;gt;&lt;br /&gt;    /// &lt;/span&gt;&lt;span style="color: green"&gt;Parses the specified enum value - ignoring case.&lt;br /&gt;    &lt;/span&gt;&lt;span style="color: gray"&gt;/// &amp;lt;/summary&amp;gt;&lt;br /&gt;    /// &amp;lt;param name=&amp;quot;enumValue&amp;quot;&amp;gt;&lt;/span&gt;&lt;span style="color: green"&gt;The enum value.&lt;/span&gt;&lt;span style="color: gray"&gt;&amp;lt;/param&amp;gt;&lt;br /&gt;    /// &amp;lt;returns&amp;gt;&amp;lt;/returns&amp;gt;&lt;br /&gt;    &lt;/span&gt;[&lt;span style="color: #2b91af"&gt;SuppressMessage&lt;/span&gt;(&lt;span style="color: #a31515"&gt;&amp;quot;Microsoft.Design&amp;quot;&lt;/span&gt;, &lt;span style="color: #a31515"&gt;&amp;quot;CA1004:GenericMethodsShouldProvideTypeParameter&amp;quot;&lt;/span&gt;)]&lt;br /&gt;    &lt;span style="color: blue"&gt;public static &lt;/span&gt;T Parse&amp;lt;T&amp;gt;(&lt;span style="color: blue"&gt;string &lt;/span&gt;enumValue)&lt;br /&gt;    {&lt;br /&gt;        &lt;span style="color: blue"&gt;return &lt;/span&gt;Parse&amp;lt;T&amp;gt;(enumValue, &lt;span style="color: blue"&gt;true&lt;/span&gt;);&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    &lt;span style="color: gray"&gt;/// &amp;lt;summary&amp;gt;&lt;br /&gt;    /// &lt;/span&gt;&lt;span style="color: green"&gt;Parses the specified enum value.&lt;br /&gt;    &lt;/span&gt;&lt;span style="color: gray"&gt;/// &amp;lt;/summary&amp;gt;&lt;br /&gt;    /// &amp;lt;param name=&amp;quot;enumValue&amp;quot;&amp;gt;&lt;/span&gt;&lt;span style="color: green"&gt;The enum value.&lt;/span&gt;&lt;span style="color: gray"&gt;&amp;lt;/param&amp;gt;&lt;br /&gt;    /// &amp;lt;param name=&amp;quot;ignoreCase&amp;quot;&amp;gt;&lt;/span&gt;&lt;span style="color: green"&gt;if set to &lt;/span&gt;&lt;span style="color: gray"&gt;&amp;lt;c&amp;gt;&lt;/span&gt;&lt;span style="color: green"&gt;true&lt;/span&gt;&lt;span style="color: gray"&gt;&amp;lt;/c&amp;gt; &lt;/span&gt;&lt;span style="color: green"&gt;[ignore case].&lt;/span&gt;&lt;span style="color: gray"&gt;&amp;lt;/param&amp;gt;&lt;br /&gt;    /// &amp;lt;returns&amp;gt;&amp;lt;/returns&amp;gt;&lt;br /&gt;    &lt;/span&gt;[&lt;span style="color: #2b91af"&gt;SuppressMessage&lt;/span&gt;(&lt;span style="color: #a31515"&gt;&amp;quot;Microsoft.Design&amp;quot;&lt;/span&gt;, &lt;span style="color: #a31515"&gt;&amp;quot;CA1004:GenericMethodsShouldProvideTypeParameter&amp;quot;&lt;/span&gt;)]&lt;br /&gt;    &lt;span style="color: blue"&gt;public static &lt;/span&gt;T Parse&amp;lt;T&amp;gt;(&lt;span style="color: blue"&gt;string &lt;/span&gt;enumValue, &lt;span style="color: blue"&gt;bool &lt;/span&gt;ignoreCase)&lt;br /&gt;    {&lt;br /&gt;        &lt;span style="color: blue"&gt;if &lt;/span&gt;(&lt;span style="color: blue"&gt;string&lt;/span&gt;.IsNullOrEmpty(enumValue))&lt;br /&gt;            &lt;span style="color: blue"&gt;throw new &lt;/span&gt;&lt;span style="color: #2b91af"&gt;ArgumentNullException&lt;/span&gt;(&lt;span style="color: #a31515"&gt;&amp;quot;enumValue&amp;quot;&lt;/span&gt;, &lt;span style="color: #2b91af"&gt;CoreResources&lt;/span&gt;.NullValue);&lt;br /&gt;&lt;br /&gt;        enumValue = enumValue.Trim();&lt;br /&gt;&lt;br /&gt;        &lt;span style="color: #2b91af"&gt;Type &lt;/span&gt;t = &lt;span style="color: blue"&gt;typeof&lt;/span&gt;(T);&lt;br /&gt;&lt;br /&gt;        &lt;span style="color: blue"&gt;if &lt;/span&gt;(!t.IsEnum)&lt;br /&gt;            &lt;span style="color: blue"&gt;throw new &lt;/span&gt;&lt;span style="color: #2b91af"&gt;ArgumentException&lt;/span&gt;(&lt;span style="color: #2b91af"&gt;CoreResources&lt;/span&gt;.InvalidType, &lt;span style="color: #a31515"&gt;&amp;quot;enumValue&amp;quot;&lt;/span&gt;);&lt;br /&gt;&lt;br /&gt;        &lt;span style="color: blue"&gt;return &lt;/span&gt;(T)&lt;span style="color: #2b91af"&gt;Enum&lt;/span&gt;.Parse(t, enumValue, ignoreCase);&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    &lt;span style="color: gray"&gt;/// &amp;lt;summary&amp;gt;&lt;br /&gt;    /// &lt;/span&gt;&lt;span style="color: green"&gt;Parses the enum.&lt;br /&gt;    &lt;/span&gt;&lt;span style="color: gray"&gt;/// &amp;lt;/summary&amp;gt;&lt;br /&gt;    /// &amp;lt;typeparam name=&amp;quot;T&amp;quot;&amp;gt;&amp;lt;/typeparam&amp;gt;&lt;br /&gt;    /// &amp;lt;param name=&amp;quot;value&amp;quot;&amp;gt;&lt;/span&gt;&lt;span style="color: green"&gt;The value.&lt;/span&gt;&lt;span style="color: gray"&gt;&amp;lt;/param&amp;gt;&lt;br /&gt;    /// &amp;lt;returns&amp;gt;&amp;lt;/returns&amp;gt;&lt;br /&gt;    &lt;/span&gt;[&lt;span style="color: #2b91af"&gt;SuppressMessage&lt;/span&gt;(&lt;span style="color: #a31515"&gt;&amp;quot;Microsoft.Design&amp;quot;&lt;/span&gt;, &lt;span style="color: #a31515"&gt;&amp;quot;CA1004:GenericMethodsShouldProvideTypeParameter&amp;quot;&lt;/span&gt;)]&lt;br /&gt;    &lt;span style="color: blue"&gt;public static &lt;/span&gt;T ParseEnum&amp;lt;T&amp;gt;(&lt;span style="color: blue"&gt;this string &lt;/span&gt;value)&lt;br /&gt;    {&lt;br /&gt;        &lt;span style="color: blue"&gt;if &lt;/span&gt;(&lt;span style="color: blue"&gt;string&lt;/span&gt;.IsNullOrEmpty(value))&lt;br /&gt;            &lt;span style="color: blue"&gt;throw new &lt;/span&gt;&lt;span style="color: #2b91af"&gt;ArgumentNullException&lt;/span&gt;(&lt;span style="color: #a31515"&gt;&amp;quot;value&amp;quot;&lt;/span&gt;, &lt;span style="color: #2b91af"&gt;CoreResources&lt;/span&gt;.NullValue);&lt;br /&gt;&lt;br /&gt;        &lt;span style="color: blue"&gt;return &lt;/span&gt;ParseEnum&amp;lt;T&amp;gt;(value, &lt;span style="color: blue"&gt;false&lt;/span&gt;);&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    &lt;span style="color: gray"&gt;/// &amp;lt;summary&amp;gt;&lt;br /&gt;    /// &lt;/span&gt;&lt;span style="color: green"&gt;Parses the enum.&lt;br /&gt;    &lt;/span&gt;&lt;span style="color: gray"&gt;/// &amp;lt;/summary&amp;gt;&lt;br /&gt;    /// &amp;lt;typeparam name=&amp;quot;T&amp;quot;&amp;gt;&amp;lt;/typeparam&amp;gt;&lt;br /&gt;    /// &amp;lt;param name=&amp;quot;value&amp;quot;&amp;gt;&lt;/span&gt;&lt;span style="color: green"&gt;The value.&lt;/span&gt;&lt;span style="color: gray"&gt;&amp;lt;/param&amp;gt;&lt;br /&gt;    /// &amp;lt;param name=&amp;quot;ignoreCase&amp;quot;&amp;gt;&lt;/span&gt;&lt;span style="color: green"&gt;if set to &lt;/span&gt;&lt;span style="color: gray"&gt;&amp;lt;c&amp;gt;&lt;/span&gt;&lt;span style="color: green"&gt;true&lt;/span&gt;&lt;span style="color: gray"&gt;&amp;lt;/c&amp;gt; &lt;/span&gt;&lt;span style="color: green"&gt;[ignore case].&lt;/span&gt;&lt;span style="color: gray"&gt;&amp;lt;/param&amp;gt;&lt;br /&gt;    /// &amp;lt;returns&amp;gt;&amp;lt;/returns&amp;gt;&lt;br /&gt;    &lt;/span&gt;[&lt;span style="color: #2b91af"&gt;SuppressMessage&lt;/span&gt;(&lt;span style="color: #a31515"&gt;&amp;quot;Microsoft.Design&amp;quot;&lt;/span&gt;, &lt;span style="color: #a31515"&gt;&amp;quot;CA1004:GenericMethodsShouldProvideTypeParameter&amp;quot;&lt;/span&gt;)]&lt;br /&gt;    &lt;span style="color: blue"&gt;public static &lt;/span&gt;T ParseEnum&amp;lt;T&amp;gt;(&lt;span style="color: blue"&gt;this string &lt;/span&gt;value, &lt;span style="color: blue"&gt;bool &lt;/span&gt;ignoreCase)&lt;br /&gt;    {&lt;br /&gt;        &lt;span style="color: blue"&gt;if &lt;/span&gt;(&lt;span style="color: blue"&gt;string&lt;/span&gt;.IsNullOrEmpty(value))&lt;br /&gt;            &lt;span style="color: blue"&gt;throw new &lt;/span&gt;&lt;span style="color: #2b91af"&gt;ArgumentNullException&lt;/span&gt;(&lt;span style="color: #a31515"&gt;&amp;quot;value&amp;quot;&lt;/span&gt;, &lt;span style="color: #2b91af"&gt;CoreResources&lt;/span&gt;.NullValue);&lt;br /&gt;&lt;br /&gt;        &lt;span style="color: blue"&gt;return &lt;/span&gt;Parse&amp;lt;T&amp;gt;(value, ignoreCase);&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    &lt;span style="color: gray"&gt;/// &amp;lt;summary&amp;gt;&lt;br /&gt;    /// &lt;/span&gt;&lt;span style="color: green"&gt;Gets the enum or default.&lt;br /&gt;    &lt;/span&gt;&lt;span style="color: gray"&gt;/// &amp;lt;/summary&amp;gt;&lt;br /&gt;    /// &amp;lt;typeparam name=&amp;quot;T&amp;quot;&amp;gt;&amp;lt;/typeparam&amp;gt;&lt;br /&gt;    /// &amp;lt;param name=&amp;quot;value&amp;quot;&amp;gt;&lt;/span&gt;&lt;span style="color: green"&gt;The value.&lt;/span&gt;&lt;span style="color: gray"&gt;&amp;lt;/param&amp;gt;&lt;br /&gt;    /// &amp;lt;param name=&amp;quot;defaultValue&amp;quot;&amp;gt;&lt;/span&gt;&lt;span style="color: green"&gt;The default value.&lt;/span&gt;&lt;span style="color: gray"&gt;&amp;lt;/param&amp;gt;&lt;br /&gt;    /// &amp;lt;returns&amp;gt;&amp;lt;/returns&amp;gt;&lt;br /&gt;    &lt;/span&gt;[&lt;span style="color: #2b91af"&gt;SuppressMessage&lt;/span&gt;(&lt;span style="color: #a31515"&gt;&amp;quot;Microsoft.Design&amp;quot;&lt;/span&gt;, &lt;span style="color: #a31515"&gt;&amp;quot;CA1004:GenericMethodsShouldProvideTypeParameter&amp;quot;&lt;/span&gt;)]&lt;br /&gt;    [&lt;span style="color: #2b91af"&gt;SuppressMessage&lt;/span&gt;(&lt;span style="color: #a31515"&gt;&amp;quot;Microsoft.Design&amp;quot;&lt;/span&gt;, &lt;span style="color: #a31515"&gt;&amp;quot;CA1031:DoNotCatchGeneralExceptionTypes&amp;quot;&lt;/span&gt;,&lt;br /&gt;        Justification = &lt;span style="color: #a31515"&gt;&amp;quot;Never throw the exception in this case&amp;quot;&lt;/span&gt;)]&lt;br /&gt;    &lt;span style="color: blue"&gt;public static &lt;/span&gt;T GetEnumOrDefault&amp;lt;T&amp;gt;(&lt;span style="color: blue"&gt;this string &lt;/span&gt;value, T defaultValue)&lt;br /&gt;    {&lt;br /&gt;        &lt;span style="color: blue"&gt;if &lt;/span&gt;(&lt;span style="color: blue"&gt;string&lt;/span&gt;.IsNullOrEmpty(value))&lt;br /&gt;            &lt;span style="color: blue"&gt;return &lt;/span&gt;defaultValue;&lt;br /&gt;&lt;br /&gt;        &lt;span style="color: blue"&gt;try&lt;br /&gt;        &lt;/span&gt;{&lt;br /&gt;            &lt;span style="color: blue"&gt;return &lt;/span&gt;Parse&amp;lt;T&amp;gt;(value, &lt;span style="color: blue"&gt;true&lt;/span&gt;);&lt;br /&gt;        }&lt;br /&gt;        &lt;span style="color: blue"&gt;catch&lt;br /&gt;        &lt;/span&gt;{&lt;br /&gt;            &lt;span style="color: blue"&gt;return &lt;/span&gt;defaultValue;&lt;br /&gt;        }&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    &lt;span style="color: gray"&gt;/// &amp;lt;summary&amp;gt;&lt;br /&gt;    /// &lt;/span&gt;&lt;span style="color: green"&gt;Tries to parse the enum. Case insensitive. Returns true/false for errors (or return InvalidArgumentException?)&lt;br /&gt;    &lt;/span&gt;&lt;span style="color: gray"&gt;/// &amp;lt;/summary&amp;gt;&lt;br /&gt;    /// &amp;lt;typeparam name=&amp;quot;T&amp;quot;&amp;gt;&amp;lt;/typeparam&amp;gt;&lt;br /&gt;    /// &amp;lt;param name=&amp;quot;value&amp;quot;&amp;gt;&lt;/span&gt;&lt;span style="color: green"&gt;The value.&lt;/span&gt;&lt;span style="color: gray"&gt;&amp;lt;/param&amp;gt;&lt;br /&gt;    /// &amp;lt;param name=&amp;quot;enumInstance&amp;quot;&amp;gt;&lt;/span&gt;&lt;span style="color: green"&gt;The enum instance.&lt;/span&gt;&lt;span style="color: gray"&gt;&amp;lt;/param&amp;gt;&lt;br /&gt;    /// &amp;lt;returns&amp;gt;&amp;lt;/returns&amp;gt;&lt;br /&gt;    &lt;/span&gt;[&lt;span style="color: #2b91af"&gt;SuppressMessage&lt;/span&gt;(&lt;span style="color: #a31515"&gt;&amp;quot;Microsoft.Design&amp;quot;&lt;/span&gt;, &lt;span style="color: #a31515"&gt;&amp;quot;CA1004:GenericMethodsShouldProvideTypeParameter&amp;quot;&lt;/span&gt;)]&lt;br /&gt;    [&lt;span style="color: #2b91af"&gt;SuppressMessage&lt;/span&gt;(&lt;span style="color: #a31515"&gt;&amp;quot;Microsoft.Design&amp;quot;&lt;/span&gt;, &lt;span style="color: #a31515"&gt;&amp;quot;CA1031:DoNotCatchGeneralExceptionTypes&amp;quot;&lt;/span&gt;,&lt;br /&gt;        Justification = &lt;span style="color: #a31515"&gt;&amp;quot;Never throw the exception in this case&amp;quot;&lt;/span&gt;)]&lt;br /&gt;    &lt;span style="color: blue"&gt;public static bool &lt;/span&gt;TryParseEnum&amp;lt;T&amp;gt;(&lt;span style="color: blue"&gt;this string &lt;/span&gt;value, &lt;span style="color: blue"&gt;out &lt;/span&gt;T enumInstance)&lt;br /&gt;    {&lt;br /&gt;        &lt;span style="color: blue"&gt;try&lt;br /&gt;        &lt;/span&gt;{&lt;br /&gt;            enumInstance = Parse&amp;lt;T&amp;gt;(value, &lt;span style="color: blue"&gt;true&lt;/span&gt;);&lt;br /&gt;            &lt;span style="color: blue"&gt;return true&lt;/span&gt;;&lt;br /&gt;        }&lt;br /&gt;        &lt;span style="color: blue"&gt;catch&lt;br /&gt;        &lt;/span&gt;{&lt;br /&gt;            enumInstance = &lt;span style="color: blue"&gt;default&lt;/span&gt;(T);&lt;br /&gt;            &lt;span style="color: blue"&gt;return false&lt;/span&gt;;&lt;br /&gt;        }&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;    &lt;span style="color: gray"&gt;/// &amp;lt;summary&amp;gt;&lt;br /&gt;    /// &lt;/span&gt;&lt;span style="color: green"&gt;Gets the &lt;/span&gt;&lt;span style="color: gray"&gt;&amp;lt;see cref=&amp;quot;DescriptionAttribute&amp;quot; /&amp;gt; &lt;/span&gt;&lt;span style="color: green"&gt;of an &lt;/span&gt;&lt;span style="color: gray"&gt;&amp;lt;see cref=&amp;quot;Enum&amp;quot; /&amp;gt; &lt;br /&gt;    /// &lt;/span&gt;&lt;span style="color: green"&gt;type value.&lt;br /&gt;    &lt;/span&gt;&lt;span style="color: gray"&gt;/// &amp;lt;/summary&amp;gt;&lt;br /&gt;    /// &amp;lt;param name=&amp;quot;value&amp;quot;&amp;gt;&lt;/span&gt;&lt;span style="color: green"&gt;The &lt;/span&gt;&lt;span style="color: gray"&gt;&amp;lt;see cref=&amp;quot;Enum&amp;quot; /&amp;gt; &lt;/span&gt;&lt;span style="color: green"&gt;type value.&lt;/span&gt;&lt;span style="color: gray"&gt;&amp;lt;/param&amp;gt;&lt;br /&gt;    /// &amp;lt;returns&amp;gt;&lt;/span&gt;&lt;span style="color: green"&gt;A string containing the text of the&lt;br /&gt;    &lt;/span&gt;&lt;span style="color: gray"&gt;/// &amp;lt;see cref=&amp;quot;DescriptionAttribute&amp;quot;/&amp;gt;&lt;/span&gt;&lt;span style="color: green"&gt;.&lt;/span&gt;&lt;span style="color: gray"&gt;&amp;lt;/returns&amp;gt;&lt;br /&gt;    &lt;/span&gt;&lt;span style="color: blue"&gt;public static string &lt;/span&gt;GetDescription(&lt;span style="color: blue"&gt;this &lt;/span&gt;&lt;span style="color: #2b91af"&gt;Enum &lt;/span&gt;value)&lt;br /&gt;    {&lt;br /&gt;        &lt;span style="color: blue"&gt;if &lt;/span&gt;(value == &lt;span style="color: blue"&gt;null&lt;/span&gt;)&lt;br /&gt;            &lt;span style="color: blue"&gt;throw new &lt;/span&gt;&lt;span style="color: #2b91af"&gt;ArgumentNullException&lt;/span&gt;(&lt;span style="color: #a31515"&gt;&amp;quot;value&amp;quot;&lt;/span&gt;, &lt;span style="color: #2b91af"&gt;CoreResources&lt;/span&gt;.NullValue);&lt;br /&gt;&lt;br /&gt;        &lt;span style="color: blue"&gt;string &lt;/span&gt;description = value.ToString();&lt;br /&gt;        &lt;span style="color: #2b91af"&gt;FieldInfo &lt;/span&gt;fieldInfo = value.GetType().GetField(description);&lt;br /&gt;        &lt;span style="color: #2b91af"&gt;EnumDescriptionAttribute&lt;/span&gt;[] attributes =&lt;br /&gt;           (&lt;span style="color: #2b91af"&gt;EnumDescriptionAttribute&lt;/span&gt;[])&lt;br /&gt;         fieldInfo.GetCustomAttributes(&lt;span style="color: blue"&gt;typeof&lt;/span&gt;(&lt;span style="color: #2b91af"&gt;EnumDescriptionAttribute&lt;/span&gt;), &lt;span style="color: blue"&gt;false&lt;/span&gt;);&lt;br /&gt;&lt;br /&gt;        &lt;span style="color: blue"&gt;if &lt;/span&gt;(attributes != &lt;span style="color: blue"&gt;null &lt;/span&gt;&amp;amp;&amp;amp; attributes.Length &amp;gt; 0)&lt;br /&gt;        {&lt;br /&gt;            description = attributes[0].Description;&lt;br /&gt;        }&lt;br /&gt;        &lt;span style="color: blue"&gt;return &lt;/span&gt;description;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    &lt;span style="color: gray"&gt;/// &amp;lt;summary&amp;gt;&lt;br /&gt;    /// &lt;/span&gt;&lt;span style="color: green"&gt;Converts the &lt;/span&gt;&lt;span style="color: gray"&gt;&amp;lt;see cref=&amp;quot;Enum&amp;quot; /&amp;gt; &lt;/span&gt;&lt;span style="color: green"&gt;type to an &lt;/span&gt;&lt;span style="color: gray"&gt;&amp;lt;see cref=&amp;quot;IList&amp;quot; /&amp;gt; &lt;br /&gt;    /// &lt;/span&gt;&lt;span style="color: green"&gt;compatible object.&lt;br /&gt;    &lt;/span&gt;&lt;span style="color: gray"&gt;/// &amp;lt;/summary&amp;gt;&lt;br /&gt;    /// &amp;lt;param name=&amp;quot;type&amp;quot;&amp;gt;&lt;/span&gt;&lt;span style="color: green"&gt;The &lt;/span&gt;&lt;span style="color: gray"&gt;&amp;lt;see cref=&amp;quot;Enum&amp;quot;/&amp;gt; &lt;/span&gt;&lt;span style="color: green"&gt;type.&lt;/span&gt;&lt;span style="color: gray"&gt;&amp;lt;/param&amp;gt;&lt;br /&gt;    /// &amp;lt;returns&amp;gt;&lt;/span&gt;&lt;span style="color: green"&gt;An &lt;/span&gt;&lt;span style="color: gray"&gt;&amp;lt;see cref=&amp;quot;IList&amp;quot;/&amp;gt; &lt;/span&gt;&lt;span style="color: green"&gt;containing the enumerated&lt;br /&gt;    &lt;/span&gt;&lt;span style="color: gray"&gt;/// &lt;/span&gt;&lt;span style="color: green"&gt;type value and description.&lt;/span&gt;&lt;span style="color: gray"&gt;&amp;lt;/returns&amp;gt;&lt;br /&gt;    &lt;/span&gt;&lt;span style="color: blue"&gt;public static &lt;/span&gt;&lt;span style="color: #2b91af"&gt;IList &lt;/span&gt;ToList(&lt;span style="color: blue"&gt;this &lt;/span&gt;&lt;span style="color: #2b91af"&gt;Type &lt;/span&gt;type)&lt;br /&gt;    {&lt;br /&gt;        &lt;span style="color: blue"&gt;if &lt;/span&gt;(type == &lt;span style="color: blue"&gt;null&lt;/span&gt;)&lt;br /&gt;            &lt;span style="color: blue"&gt;throw new &lt;/span&gt;&lt;span style="color: #2b91af"&gt;ArgumentNullException&lt;/span&gt;(&lt;span style="color: #a31515"&gt;&amp;quot;type&amp;quot;&lt;/span&gt;, &lt;span style="color: #2b91af"&gt;CoreResources&lt;/span&gt;.InvalidType);&lt;br /&gt;&lt;br /&gt;        &lt;span style="color: #2b91af"&gt;ArrayList &lt;/span&gt;list = &lt;span style="color: blue"&gt;new &lt;/span&gt;&lt;span style="color: #2b91af"&gt;ArrayList&lt;/span&gt;();&lt;br /&gt;        &lt;span style="color: #2b91af"&gt;Array &lt;/span&gt;enumValues = &lt;span style="color: #2b91af"&gt;Enum&lt;/span&gt;.GetValues(type);&lt;br /&gt;&lt;br /&gt;        &lt;span style="color: blue"&gt;foreach &lt;/span&gt;(&lt;span style="color: #2b91af"&gt;Enum &lt;/span&gt;value &lt;span style="color: blue"&gt;in &lt;/span&gt;enumValues)&lt;br /&gt;        {&lt;br /&gt;            list.Add(&lt;span style="color: blue"&gt;new &lt;/span&gt;&lt;span style="color: #2b91af"&gt;KeyValuePair&lt;/span&gt;&amp;lt;&lt;span style="color: #2b91af"&gt;Enum&lt;/span&gt;, &lt;span style="color: blue"&gt;string&lt;/span&gt;&amp;gt;(value, GetDescription(value)));&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        &lt;span style="color: blue"&gt;return &lt;/span&gt;list;&lt;br /&gt;    }&lt;br /&gt;}&lt;/pre&gt;&lt;br /&gt;&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;/p&gt;&lt;br /&gt;&lt;/span&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6463343857615764564-1656846251817012865?l=simiansoftware.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://simiansoftware.blogspot.com/feeds/1656846251817012865/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6463343857615764564&amp;postID=1656846251817012865' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6463343857615764564/posts/default/1656846251817012865'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6463343857615764564/posts/default/1656846251817012865'/><link rel='alternate' type='text/html' href='http://simiansoftware.blogspot.com/2008/09/enum-parsing.html' title='Enum Parsing'/><author><name>CodeMonkey</name><uri>http://www.blogger.com/profile/04940025489236520116</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6463343857615764564.post-1027261362922502117</id><published>2008-07-30T07:09:00.000-07:00</published><updated>2008-07-30T07:15:32.814-07:00</updated><title type='text'>AfterBuild copy task</title><content type='html'>Have you ever had to get a licence (.lic) file copied to your bin directory as part of you build?&lt;br /&gt;&lt;br /&gt;Well annoyingly enough you don't want it to be marked as "Content" and you cant compile it, so I placed the following line into my .csproj file quite near the bottom. I have included the targets above so you can see where I placed it in bold.&lt;br /&gt;&lt;br /&gt; &lt;import project="$(MSBuildBinPath)\Microsoft.CSharp.targets"&gt;&lt;propertygroup&gt;&lt;prebuildevent&gt;&lt;/prebuildevent&gt;&lt;postbuildevent&gt;&lt;/postbuildevent&gt;&lt;/propertygroup&gt;&lt;span style="font-weight: bold;"&gt;&lt;target name="AfterBuild"&gt;&lt;/target&gt;&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;&lt;createitem include="$(ProjectDir)ThirdPartyLibraries\PowerUp.Web.UI.WebTree.lic"&gt;&lt;/createitem&gt;&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;&lt;output taskparameter="Include" itemname="LicenceFile"&gt;&lt;/output&gt;&lt;/span&gt;  &amp;lt;Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /&amp;gt;&lt;br /&gt;  &amp;lt;PropertyGroup&amp;gt;&lt;br /&gt;    &amp;lt;PreBuildEvent&amp;gt;&lt;br /&gt;    &amp;lt;/PreBuildEvent&amp;gt;&lt;br /&gt;    &amp;lt;PostBuildEvent&amp;gt;&lt;br /&gt;    &amp;lt;/PostBuildEvent&amp;gt;&lt;br /&gt;  &amp;lt;/PropertyGroup&amp;gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;  &amp;lt;Target Name="AfterBuild"&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;    &amp;lt;CreateItem Include="$(ProjectDir)ThirdPartyLibraries\PowerUp.Web.UI.WebTree.lic"&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;      &amp;lt;Output TaskParameter="Include" ItemName="LicenceFile" /&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;    &amp;lt;/CreateItem&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;    &amp;lt;Copy SourceFiles="@(LicenceFile)" DestinationFolder="$(OutputPath)" ContinueOnError="false" /&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;  &amp;lt;/Target&amp;gt;&lt;/span&gt;&lt;/import&gt;&lt;br /&gt;&lt;br /&gt;I created a target on the fly using the CreateItem step which also allows me to extend it later if I want to place more items inside it, then just referenced that item and copied it&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6463343857615764564-1027261362922502117?l=simiansoftware.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://simiansoftware.blogspot.com/feeds/1027261362922502117/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6463343857615764564&amp;postID=1027261362922502117' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6463343857615764564/posts/default/1027261362922502117'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6463343857615764564/posts/default/1027261362922502117'/><link rel='alternate' type='text/html' href='http://simiansoftware.blogspot.com/2008/07/afterbuild-copy-task.html' title='AfterBuild copy task'/><author><name>CodeMonkey</name><uri>http://www.blogger.com/profile/04940025489236520116</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6463343857615764564.post-3806938763984524669</id><published>2008-06-18T03:47:00.000-07:00</published><updated>2008-06-18T04:10:40.697-07:00</updated><title type='text'>Work Item Templates</title><content type='html'>My findings on creating and customising your own Work Item Templates in TFS 2008&lt;br /&gt;&lt;br /&gt;First off - here is some background reading and resources&lt;br /&gt;&lt;br /&gt;Tools to capture “Defects”&lt;br /&gt;&lt;a href="http://www.techsmith.com/snagit/accessories/teamsystem.asp"&gt;http://www.techsmith.com/snagit/accessories/teamsystem.asp&lt;/a&gt;&lt;br /&gt;&lt;a href="http://ozgrant.com/2006/06/17/tfsbugsnapper/"&gt;http://ozgrant.com/2006/06/17/tfsbugsnapper/&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Extending TFS Templates using TFS Power Tools&lt;br /&gt;&lt;a href="http://msdn.microsoft.com/en-us/tfs2008/bb980963.aspx"&gt;http://msdn.microsoft.com/en-us/tfs2008/bb980963.aspx&lt;/a&gt;&lt;br /&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/ms400654%28VS.80%29.aspx"&gt;http://msdn.microsoft.com/en-us/library/ms400654(VS.80).aspx&lt;/a&gt;&lt;br /&gt;&lt;a href="http://blogs.msdn.com/narend/archive/2007/07/31/nice-trick-to-enforce-certain-rules-on-area-path-and-iteration-path.aspx"&gt;http://blogs.msdn.com/narend/archive/2007/07/31/nice-trick-to-enforce-certain-rules-on-area-path-and-iteration-path.aspx&lt;br /&gt;&lt;/a&gt;&lt;br /&gt;Enhancing VSTS – Setting up TFS groups and changing the Bug Work Item Template&lt;br /&gt;&lt;a href="http://visualstudiomagazine.com/columns/article.aspx?editorialsid=2046"&gt;http://visualstudiomagazine.com/columns/article.aspx?editorialsid=2046&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Differences between WIWA and TSWA&lt;br /&gt;&lt;a href="http://www.microsoft.com/downloads/details.aspx?FamilyId=FAED8359-F54D-480E-8A86-F154D3DEA07E&amp;amp;displaylang=en"&gt;http://www.microsoft.com/downloads/details.aspx?FamilyId=FAED8359-F54D-480E-8A86-F154D3DEA07E&amp;amp;displaylang=en&lt;br /&gt;&lt;/a&gt;&lt;a href="http://blogs.msdn.com/buckh/archive/2008/04/09/team-system-web-access-2008-sp1-ctp-and-work-item-web-access-2008-ctp-are-now-available.aspx"&gt;http://blogs.msdn.com/buckh/archive/2008/04/09/team-system-web-access-2008-sp1-ctp-and-work-item-web-access-2008-ctp-are-now-available.aspx&lt;br /&gt;&lt;/a&gt;&lt;br /&gt;After I had created my own custom "Incident" my boss didn't want to use Bug as then he couldn't charge for it! I then wanted to delete the templates we don't use so use the following command&lt;br /&gt;&lt;br /&gt;C:\Program Files\Microsoft Team Foundation Server 2008 Power Tools&gt;&lt;br /&gt;tfpt destroywitd&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6463343857615764564-3806938763984524669?l=simiansoftware.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://simiansoftware.blogspot.com/feeds/3806938763984524669/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6463343857615764564&amp;postID=3806938763984524669' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6463343857615764564/posts/default/3806938763984524669'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6463343857615764564/posts/default/3806938763984524669'/><link rel='alternate' type='text/html' href='http://simiansoftware.blogspot.com/2008/06/work-item-templates.html' title='Work Item Templates'/><author><name>CodeMonkey</name><uri>http://www.blogger.com/profile/04940025489236520116</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>
