IIS Wont start error 13 data is invalid
I got the following error when trying to figure out why I couldn’t start IIS 7 on Windows Server 2008 R2. I tried to start the World Wide Web Publishing Service but its dependency Windows Activation Service wouldn’t start. I got the following error in the Event Log: The Windows Process Activation Service service terminated [...]
A way around page refreshes/back button problems with a simple concept
The problem: You have a form in which the user fills out and clicks a “submit” button that validates their input, does some processing and output’s some results. The problem being the application needs to cater for page refreshes, back buttons and the case of the page being submitted more than once (latency/slow internet connection). [...]
Search any major auction site in NZ
Checkout http://www.auctionsearch.co.nz/ You can search for listings with TradeMe, Zillion and Sella all from the one site, very useful tool for looking for bargins across several systems. A very good example of using the .NET (C#) framework.
The custom tool ‘MSLinqToSQLGenerator’ failed. Unspecified error
I kept getting this error “The custom tool ‘MSLinqToSQLGenerator’ failed. Unspecified error. For me, this was caused when I was using partial classes and had several using statements at the top of the file: using System.Data.Linq; using System.Data.Linq.Mapping; using System.Data; using System.Collections.Generic; using System.Reflection; using System.Linq; using System.Linq.Expressions; using System.ComponentModel; using System; {namespace} {code} To [...]
Unable to cast object of type ‘ Issue
I came across this error: System.InvalidCastException: Unable to cast object of type ‘<TakeIterator>d__3a`1[Class]‘ to type ‘System.Collections.Generic.List`1[Class]‘. This occured when trying to use the Take extension (list.Take(n)) from a generic list of objects. The problem is when you use the Take extension, it returns a new sequence ( IEnumerable). I got around this issue by using: [...]
Iterating through Enums
Here is how you iterate through a set of Enum items: For Each thisItem As Integer In System.Enum.GetValues(GetType(ENumName)) ‘Do processing here Next System.Enum.GetNames is also available References: http://msdn.microsoft.com/en-us/library/58hssdz9%28VS.80%29.aspx
DateTime.ToString()
Here is a link that is useful as a reference for DateTime.ToString patterns References: http://www.geekzilla.co.uk/View00FF7904-B510-468C-A2C8-F859AA20581F.htm
Interview Questions Part 1
Over the past month, I have been interviewed by several companies and I thought I would share some of my experiences. Here are some of the questions I was asked (Technical): What is the difference between a reference type and a value type? What is the difference between a stack and a heap? What is [...]
Modify a Word 2007 Open XML document via C#
Interesting problem that I came across here…A client requested that their system was to have the ability to load in a Word 2007 Document, perform some text manipulation routines and save the document back to the server. Firstly, you can rename a docx document to docx.zip and you can extract all of the files in [...]
Strong Naming Thirdparty Assemblies
Came across a interesting problem…what happens when your assembly is using a third party assembly that is not strongly named and you want to sign your own assembly..the issue is that you cannot sign your assembly without all other references being signed with a strong name also. Two possible options: Ask the thirdparty provider to [...]


