AWS T2 Instance CPU Credits

I recently quoted out a estimated AWS environment using t2 instances. I recommended for development t2.nano servers due to the single developer only working eight hours a day. I then recommended t2.medium instances for a soft production launch. Total user base will be around 30 users, so we were after redundancy at a low cost. […]

ElasticSearch Online ReIndex With Writes C#

We just now deployed a application solely using ElasticSearch ( as our backend full-text search provider. We migrated away from SQL Full Text search for reasons I will post later. ElasticSearch runs on top of Lucene, but adds a REST api and cluster goodness on top. Quick setup, You need Java, and the Java Runtime(JRE) […]

WCF Custom tool warning “Cannot import wsdl:portType”

Yet another odd problem to deal with today. “Custom tool warning: cannot import wsdl:portType Could not load file or assembly” Thanks to Nuget, it appears that it tries to load all assemblies when “Reuse types in all referenced assemblies” is marked. The WSDL tool doesn’t use the below setting so it fails. [code langauge=”xml”] <runtime> […]

SSMS – Application Intent ReadOnly

If you have an always on MSSQL availability group you can add applicationintent=readonly; to your connection string to connect as a read only user on the secondary mirror of your availability group. If you want to connect using Microsoft Sql Server Management Studio (SSMS) using the same intent, open a new window, hit connect, type […]

Unit Testing Web API Controllers with Headers

I couldn’t find a good example of how to unit test a controller with [code langauge=”csharp”] var headerValue = Request.Headers.GetValues("HEADER");[/code] in the controller. Not too common, but happens enough it can be expected. Also the controller inheirts “ApiController” which doesn’t inheirt from “ControllerBase” so the usual controller context call won’t work. Here is how I […]

S.L.A.B. To ElasticSearch

I always like to find new ways to not write the same code twice. Logging has been one of those features that every application needs, and every application does it differently. Do you log to SQL, a text file, for how long, what format? The Semantic Logging Application Block supports SQL, Azure, ElasticSearch or any […]