Prevent ‘Automatic HTTP 400 responses’ for and individual controller action

ASP.NET Core 2.1 introduces a nice feature called Automatic HTTP 400 responses which means you don't need to put the following in the start of each controller action: if (!ModelState.IsValid) { return BadRequest(ModelState); } That was working out well for me until I didn't want it to happen for one of my actions. I wanted to do … Continue reading Prevent ‘Automatic HTTP 400 responses’ for and individual controller action

Failed to create the imposter with port 4555 and protocol http.

If you've ever had the following error when running tests using MbDotNet  / mountebank it can be quite frustrating. { "errors": [ { "code": "resource conflict", "message": "Port 4555 is already in use" } ] } It probably means something has not bee disposed of properly when a test has failed i.e. the imposters or … Continue reading Failed to create the imposter with port 4555 and protocol http.