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 […]

Continue or Break using Parallel.ForEach

You might be converting your normal foreach loop over to use the Parallel.ForEach syntax to improve performance in a thread safe loop. You also probably have some break and continue statements. Well, it took me a few to figure out how to deal with these. Turns out, it is simple. When you converted your loop […]

The remote certificate is invalid according to the validation procedure for FTP

I was testing a C# FTP application of mine and got this lovely gem of an error when connecting using SSL. I had a self signed certificate in the trusted store, but the FTP library kept screaming that the certificate was invalid. Well, I found a great workaround for the time being. It should only […]

.NET 4.5 in-place upgrade might confuse you and your users

I learned something new today, something I strive to do everyday. I learned that the new .NET 4.5 Framework doesn’t just install side by side with 4.0 but it actually “upgrades” it for you. This doesn’t sound terrible, until you realize that if you are developing an application for 4.0 (many of need to as […]

Detect Windows/Operating System Version in C# .NET

Are you looking for a way to detect which OS you are running on in your .NET application? I know I had to so that I could implement workarounds that were OS specific. Here is a simple function to get the name. You can use this as an idea of how to pick the exact […]

HRESULT: 0x80131515 when running installutil to install a .NET Service

So you write your nice and fancy service and are all excited to distribute it to your client. You don’t feel like creating an installer for it, that seems like overkill. You just send a zip file with a batch file that calls installutil to register the service. Easy right? Well, your client calls and […]

Unit Test to verify Entity Framework Model (EDMX) is accurate

I work extensively with the Entity Framework in most of my projects. One thing that gets frustrating though is when you work with a large team and the data model gets out of synch with your local database. You normally don’t figure it out until you are running some operation in your application and get […]

Validate ACH Routing Numbers for EFT and Electronic Checks

I was looking for a way to validate the routing numbers for an eCommerce system I am working on and found a nice VB sample here. I converted the logic to C# and optimized it for better performance and use. Hopefully some others out there will find use: /// /// Validates the routing number. /// […]

FedEx Integration Address Service: Unable to generate a temporary class…ParsedElement[]

Are you using the new WCF service reference against the FedEx Address service WSDL? I’ll bet your scratching your head on why you get this craptastic error. InnerException: {“Unable to generate a temporary class (result=1).rnerror CS0030: Cannot convert type ‘YOURNAMESPACE.FedExAddressService.ParsedElement[]’ to ‘YOURNAMESPACE.FedExAddressService.ParsedElement’rnerror CS0029: Cannot implicitly convert type ‘YOURNAMESPACE.FedExAddressService.ParsedElement’ to ‘YOURNAMESPACE.FedExAddressService.ParsedElement[]’rn”} Message: “There was an error […]

Dotfuscator and KernelBase crashes, .NET crash with your application or service after obfuscation

Quick Tip: Don’t let Dotfuscator auto-sign your assemblies without specifying the key file explicitly. I spent the last hour beating my head into the wall, again, trying to figure out why Dotfuscator was creating a crap exe. I turned off every option, no help.I figured it must be because I am writing a windows service, […]