How to edit server information in response sent to client.

The scenario is that you wish to hide the server information that is sent from IIS to the client in the response in order to disallow someone to figure out certain information about the machine that IIS runs on via, for example, running a network trace.   As an example, taking a network trace when…


Using MSDeploy to update and remove sections in web.config. A simple example

I got a case the other day where customer was using Microsoft Web Deploy 3.0.   “Web Deploy 3.0”   There were 3 questions around this. . How to change the value of some settings for their site in the web.config. . How to remove or delete a whole section in the web.config. ….


One-to-one client certificate mapping. 401.1 with a sc-win32-status of 2148086018

I’ve seen a few cases like this, so I thought I do a post on this.   The scenario is that you would like to set up one-to-one client certificate mapping on IIS.   “One-To-One Mappings <oneToOneMappings>“   The post most often referred to on how to do this is the following:   “Configuring…


HTTP Error 500.19 0x8007000d Failed to decrypt attribute ‘password’ because the keyset does not exist

The scenario.   You have a web application that uses Anonymous Authentication. This uses another account than the default. In other words, you have done the following:   In IIS manager, gone to the application, double clicked Authentication in the Features View. Right clicked “Anonymous Authentication” and selected Edit. Selected “Specific User” and “Set…” And…


"System.InvalidOperationException: Timeout expired. The timeout period elapsed prior to obtaining a connection from the pool."

Another post on the following exception:   System.InvalidOperationException: Timeout expired.  The timeout period elapsed prior to obtaining a connection from the pool.  This may have occurred because all pooled connections were in use and max pool size was reached.    at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection)    at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory)    at System.Data.SqlClient.SqlConnection.Open()   Basically this…


Windbg and managed code. What does, for example, a null value look like?

Sometimes when debugging I realize I forget what different values (NULL, TRUE, FALSE, empty strings etc.) looks like when debugging managed code. If this happens for you as well, here is a quick reference.   The application (simple C# console application):   namespace Values {     class Program     {         static bool boolTrue                =…


How to setup UrlScan with DenyUrlSequence

I had a case where UrlScan and in particular [DenyUrlSequences] was needed to be setup. Doing research on this didn’t give many examples on how to do this. So here is a quick guide on how to.   First we need a scenario. So let’s say we want to block on URLs with multiple forward…


"SQL Server Configuration Manager" gives "Invalid class [0x80041010]” when starting.

Ok, so it happened  to me again today.   I simply wanted to open the SQL Server Configuration Manager.     Start -> Microsoft SQL Server 2008 -> Configuration Tools -> SQL Server Configuration Manager and was greeted with the following error: ”Cannot connect to WMI provider.You do not have permission or the server is unreachable.Note that you…


How to create a dump on x number of threads in a process.

So, you have an application that uses a lot of threads and you would like to know how to trigger a dump when the number of threads exceeds a particular limit. Well, look no further, this is how you can do it.   Let’s do it by example. Start Visual Studio and create a new…


How to create a dump on an OutOfMemoryException.

  So, you are running your web application in IIS and intermittently you get an OutOfMemoryException. Basically you get something like this in the browser and\or you see this in the event viewer:   Exception of type ‘System.OutOfMemoryException‘ was thrown.   Description: An unhandled exception occurred during the execution of the current web request. Please…