How to validate server SSL/TLS certificate against Certificate Revocation List in RabbitMQ .NET Client

I had a need to validate the server certificate that was used by RabbitMQ to ensure it wasn’t revoked. This adds an additional layer of security when communicating with the server and helps ensure you don’t have a man in the middle attack with an unsavory ill-gotten certificate. Is it really needed, well, that is […]

Validate Certificate Revocation List(CRL) with HttpClient in c# .NET

So, you need to make sure the sites you talk to haven’t had their certificates revoked. Well, by default .NET doesn’t do this. Mainly because I think it is rare and it can be slow. Yes yes, caching, blah blah, but the first time and every cache refresh its slower. Anyway, here is code to […]

How to add a custom user agent in the header using a webview and Xamarin Forms

I am writing an app using Xamarin Forms and wanted to control the user agent for my webview. It’s a little hacky way to have the website render differently when it see that it’s my app coming in without having to use session cookies or other crap like that. It was pretty easy once I […]

Xamarin PCL – How to URL Encode since there is no HttpUtility

Looking for the HTTPUtility class? Ha, you don’t get it. PCL doesn’t have it. Fret not, though, you can still URL Encode. It’s easy, just in a different spot. How to URLEncode in Xamarin Forms PCL var encodedData = System.Net.WebUtility.UrlEncode(stuffToEncode); Now you know, and now hopefully I will remember! Happy coding!

Visual Studio 2015 error “Object reference not set to an instance of an object”

This fixed my razor intellisense problem and the error after installing the latest ASP.NET tools. Here is how to fix it. Delete the contents from the following folders: C:\Users{user}\AppData\Local\Microsoft\VisualStudio C:\Users{user}\AppData\Local\Microsoft\VSCommon Navigate to the command line now and run devenv from either of these paths: [x64] C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE [x86] C:\Program Files\Microsoft Visual […]

Value was either too large or too small for a UInt32. TFS Error

I got this error in Visual Studio 2015 checking in to TFS. “Value was either too large or too small for a UInt32.” WTF? Turns out it is because I had an open sql query file that wasn’t saved and it get angry. Really stupid error that should read :” You have an saved file, […]

Force rebind on a WPF control or view by resetting the DataContext without using null!

I had an issue where I wanted to force a datacontext to rebind everything. The RaisePropertyChanged(“”) wasn’t working and I like to keep things simple. I was setting the DataContext = null then setting it back to the desired object right after to force a rebind. This worked well but really pissed off some of […]

System.InvalidOperationException with RadRichTextbox from Telerik in WPF

If you have an HTML document that you import into the RadRichTextbox that has images and you are hosting WPF within MFC (c++), then you are probably running into this issue. Right along with all the people who have a steering wheel on the right side of the car driving around in the States. Yeah, […]