ServicePointManager.DefaultConnectionLimit == 2? Depends…

Monday, June 20, 2011

“Depends” is my favorite answer when teaching .NET-related courses, because behind this simple word lies the implementation of the CLR and BCL, which sometimes lead us to answers we didn’t expect. For example, take the question in the topic: according to MSDN, the default value of System.Net.ServicePointManager.DefaultConnectionLimit is 2. So I wrote some code that tries to open a lot of connections from a console application to a WCF service, and to my amaze, I was able to send dozens of requests at a time, without hitting the two connection limit. So I used my debugging...

Problems with WCF Scaling

Thursday, May 5, 2011

Every once in a while, people ask me about problems they have when trying to use a single WCF service with multiple concurrent calls. The first think I tell them is to check their WCF throttling settings. The throttling behavior in WCF controls how many instances and session WCF can create and manage at once. These settings also depend on the binding you use. For example if you have a single proxy on the client side that sends many async calls at once, and you use basicHttpBinding, WCF will by default create many instances on the...
no comments

Building Silverlight applications with Team Foundation Build

Friday, August 7, 2009

This week, I’ve tried to build a team build for a project I’m working on. I found it weird that for some reason, building the server solutions worked just fine, but I wasn’t able to build the silverlight solutions - it always failed. Looking a bit in the log file, I saw that the build failed because it couldn’t copy the .XAP files of the silverlight application from the ClientBin folder. Checking a bit further and I found that the files were never created ! After searching the internet I found out the...
no comments

What does Entity Framework has to do with MSBuild?

Monday, November 24, 2008

The answer to the above question should be “nothing, unless you’re trying to build a project that references entity framework”, but apparently it isn’t so. Say you have a project you’ve built, and you want to build it through code, using the Engine class of Microsoft.Build.Engine assembly. The code should look something like this (taken from MSDN): // Instantiate a new Engine object Engine engine = new Engine(); // Instantiate a new FileLogger to generate build log FileLogger logger = new FileLogger(); // Set the logfile...
13 comments