This project is read-only.


The current state of documentation is based on the fact YOU know some details of authentication and IIS configuration. Sorry, but that's it for now.

Also check out the FAQ.



The assemblies are not signed and therefor are not deployable to deploy to GAC. The Installation is a simple XCOPY to the application BIN folder. Check out the IIS configuration and find the application to run the code in. Copy the DLL (and PDB if you like) into the BIN directory.
-> c:\inetpub\wwwroot\bin
--> GK.IIS.SignInAsADifferentUser.dll
--> GK.IIS.SignInAsADifferentUser.pdb


We need another handler entry in "system.webServer" (see minimal configuration)
<?xml version="1.0" encoding="UTF-8"?>
            <add name="GK.IIS.SignInAsADifferentUser" path="*.signinas" verb="*" type="GK.IIS.SignInAsADifferentUser.SignInAsHandler" resourceType="Unspecified" preCondition="integratedMode" />


The current version is tested using the following parameters:
  • IIS 7
  • Windows Authentication (Anonymous disabled)
  • App Pool settings
    • .NET Framework 2.0
    • Manged Pipeline as Inetgrated


The usage is based on a set of known urls that are described in the next sections. Access the solution using your browser an start like this:
Switch user with:


This will Display the current username, auth scheme and server Name


This will Redirect to the auth page with a unique id that is needed to avoid the usage of session state. The request is using the HTTPCache to Keep some information.

auth.signinas (+ request param with guid)

This will send the 401 until the user has switched. If the user is authenticated with a different identity the page will Redirect to the current dir's default page (using ./ as the url)


This will display th cache used for the solution to avoid sessionstate config


This will delete the cache to start fresh

Last edited Jul 11, 2012 at 8:09 AM by GeekDotNet, version 2


No comments yet.