Programming

JSON.net ScriptIgnore is actually JsonIgnore

Posted by on May 1, 2013 at 12:04 am

Save yourself from pulling your hair and reading countless pointless/useless/incorrect posts on similarly useless Google results by following the following simple step: XmlIgnore and ScriptIgnore do not work for JSON.net serialization (using version 5.0) within the ASP.net Web API. You must use the [JsonIgnore] attribute. /// <summary> /// Gets or sets the model action state [...]

RegExper offers a new way to debug RegEx strings

Posted by on January 19, 2013 at 12:52 pm

As a visual learner I think this tool is absolutely fantastical. It takes in a RegEx string and renders it out into a visual railroad diagram, giving a developer a quick and easy way to visualize what exactly the RegEx string is looking for. I highly suggest you check out RegExper to help debug those [...]

Getting Application_Error to fire in IIS 7 when all else fails

Posted by on January 8, 2013 at 2:08 pm

We recently ran into an issue at work where our custom MVC4 error handler, which utlizes the global.asax Application_Error event, stopped firing on our remote IIS 7 web server. It didn’t appear to be a code change that caused the issue so I searched for a good hour trying different fixes across the Internet. It was [...]

T-SQL: setting decimal value always rounds up or down

Posted by on May 3, 2012 at 11:28 am

Forgive my brevity on this post but I am writing to you today from my cell phone. You may run into the problem I just had and I wanted to let you know what the issue was and how I solved it. Suppose you have the following code: DECLARE @decimalValue1 decimal = 5 DECLARE @decimalValue2 [...]

Microsoft Releases Roslyn Project, Open Compiler API

Posted by on October 22, 2011 at 1:21 pm

This is amazing. Microsoft has made the inner workings of their IL compiler open to everyone by exposing the inner workings through an API. As the Overview describes, they’ve rewritten the IL compiler in managed code and in doing so have un-boxed the black box that was once the best IL compiler for Windows. It [...]