Is it a bug?: ClientWebSocket

The following program always fails for me with the web socket reaching the aborted state within a couple seconds. class Program {     static void Main(string[] args)     {         ClientWebSocket socket = new ClientWebSocket();         socket.ConnectAsync(new Uri("ws://localhost:8085/Echo.ashx"), CancellationToken.None).Wait();         var ob = new ArraySegment<byte>(Encoding.UTF8.GetBytes("hello"));         var buffer = new ArraySegment<byte>(new byte[1024]);         var sw…

1

How fast can your HTTP server go?

I have a burning question on my mind. How fast can an HTTP/HTTPS server go? When I say fast, I have some assumptions, which are based on removing all of the wishy-washy disclaimers. “That depends on what features of the framework you use.” “It depends on your database technology.” “It depends on your ORM" blah…

0

Unit Testing DbContexts and queries – the status quo

So here’s the scene. I’ve been working on unit testing for a solid day, my percent coverage is up, my code is better factored, and now I do my ‘what is the most untested class I have’ analysis one more time, and discover that it is… ‘BillingEntitiesContext’. BillingEntitiesContext is my subclassed DbContext for describing my…

3

Reflections on unit tests (and more what happened next) and introducing ashmind and his Argument NuGet package

Here are a few thoughts about the refactoring process from going through my initial unit testing iteration. Constructor Injection can make things look a lot more testable. But I think you want to be careful about jumping into this – don’t do it as the first step in refactoring. It’s probably better to first extracting…

0

Struggling with unit tests (what happened next)

This is going to be a fairly uninteresting and hard to follow post, but its here for the record, I’ll try to distill something better out of it. This was a sort of as-it-happened log of my initial attempt following on from my plan earlier today. [Also I fail at Live Writer, and I overwrote…

0

Struggling with unit tests (again)

I am having a mental hard time today because of unit tests. Not tests that fail… tests that don’t exist. And tests I’m not sure that should exist. It is very natural, right, and highly necessary to test methods which do a non-trivial transformation of data. Here is an example: given a list of events,…

3

The worst Code Analysis Rule that’s ‘recommended’ – CA2202

CA2202: Do not dispose objects multiple times How I hate this rule! Firstly, the rule is predicated on the belief that other people will write broken code and you will have to use it. Broken how? The documentation for IDisposable.Dispose() says that it must be safe to call IDisposable.Dispose() multiple times on the same object:…

7

How to view Azure Diagnostics Traces from WADLogsTable in your local console app

If you use Azure Diagnostics in your cloud service, and you use the DiagnosticTraceListener then all of your traces are getting output to a table somewhere called WADLogsTable. I think it’s definitely a nuisance having to use the Visual Studio’s table viewer or some other program to see those logs. So anyway, to save you…

0