Skip to main content

Posts

Showing posts with the label iis

Install and verify IIS HttpModules with custom config sections

A week ago I started to learn about HttpModules and HttpHandlers watching a pluralsight course by Robert Boedigheimer . First of all I want to really recommend this course, I learned a lot of stuff which I could not find in any other course, book or blog post. As I already did in the past with another course , I want to add some comments and extend the HttpModule part. I refer to the course example with the serverMaskModuleGAC. I walked into some trap doors and thereby I found another approach to simplify the installation process of the module to GAC a little bit. With this approach I am able to verify my custom config sections and module registration is correct. Here is my approach: 1. When you have finished your implementation for serverMaskModule, install it in the GAC as usual by using the gacutil tool. By the way, there are some traps when you need to install it on Windows Server 2012 . Here I am using Windows 8.1 64 Bit. I created my HttpModule with .NET 2.0 because it se...

Clean up AppFabric Dashboard Part 2: Duplicate collection entry in Web.config

In Part one I have already described how to remove phantom apps here on more supplement. These phantom apps could also remain in the AppFabric Monitoring db: Just delete no longer needed entries in this table. Duplicate collection entry When you receive this kind of issue, like "[...] Cannot add duplicate collection entry [...]" you have defined the a configuration section twice in two different Web.config files in different places in your file system. Clear One easy solution is to use a clear statement . Searching for the inherited element There is a post in Microsoft's documentation which is explaining how to do it. Visual Studio in debug mode When you are working with Visual Studio in debug mode, which means you are just pressing F5 to run it on your local IIS instead of publishing it to a web server, you should keep in mind that e.g. your obj folder might contain more copies of your Web.config file. This could lead into this duplicate collectio...

Cleanup AppFabric Dashboard Part 1: Old virtual paths and phantom applications on IIS

While you are working with IIS installing and uninstalling web applications you might run into this issue on AppFabric Dashboard: Another example is this error message: There are two steps necessary to get a cleaned AppFabric Dashboard. Delete old virtual paths Old virtual paths might remain in %windir%\system32\inetsrv\config\ApplicationHost.config. To get rid of these crappy virtual paths switch to command line tool and use the following script: C:\Windows\System32\inetsrv>appcmd.exe list vdir VDIR "Default Web Site/" (physicalPath:%SystemDrive%\inetpub\wwwroot) VDIR "Default Web Site/Service/App1/" (physicalPath:C:\Service\App1) VDIR "Default Web Site/Service/App2" (physicalPath:C:\Service\App2) VDIR "Team Foundation Server/" (physicalPath:C:\Program Files\Microsoft Team Foundation Server 12.0\Tools\Templates) VDIR "Team Foundation Server/tfs/" (physicalPath:C:\Program Files\Microsoft Team Foundation Serve...

How to fix Windows Server AppFabric Dashboard on Windows Server 2012 / Windows 8

Windows Server AppFabric is a great enhancement for IIS and its caching capabilities are great for .NET applications. But currently there is a very annoying bug regarding its monitoring UI, so called “Dashboard”. Especially for me as a non WF guy (I am actually just working with WCF) it was really hard to figure it out. Hence, many thanks to Gianluca from Distributed Services at Microsoft! Windows Server AppFabric Dashboard does not work on Windows Server 2012 / Windows 8. You will receive this error message "Unable to cast object of type 'System.Management.Automation.PSCustomObject' to type 'Microsoft.ApplicationServer.Management.Data.GroupByInfo'." This error will cause that you cannot see any request statistics neither WF nor for WCF: The reason is, I quote Microsoft here: "[...] the root cause is a powershell script embedded in AF code that returns different results when ran on Windows 2012. This script is about statistics for Idle & per...