2014-04-07

Logging log4net

When logging doesn't work, you may need to log the log.

Basically, you have to add this to <appSettings>:

    <add key="log4net.Internal.Debug" value="true"/>

This should enable you to see some output on the console (or Visual Studio if you running an app from there). If this doesn't suit your needs, then writing to a file may be appropriate, by adding the following to the <system.diagnostics> section:

    <trace autoflush="true">
      <listeners>
        <add name="textWriterTraceListener" type="System.Diagnostics.TextWriterTraceListener" initializeData="C:\log4net.txt" />
      </listeners>
    </trace>


source: Stack Overflow and Apache log4net FAQ

2014-03-05

Maximum client concurrent HTTP connections to a web service

While performing some load testing on a web service (using Specflow), we've stumbled on a two concurrent connections limitation. Apparently, the limitation is in the HTTP/1.1 .NET client implementation, as described in here. Our solution was to set the ServicePointManager.DefaultConnectionLimit property  to the number of concurrent requests we want to test, just before creating the channel.

2014-03-04

How to know which SQL Server version and edition you are running

SELECT @@VERSION AS [Version]
Will return something like:
Microsoft SQL Server 2008 R2 (RTM) - 10.50.1600.1 (X64)   Apr  2 2010 15:48:46   Copyright (c) Microsoft Corporation  Express Edition with Advanced Services (64-bit) on Windows NT 6.1 <X64> (Build 7601: Service Pack 1) 
Found it here.