Overview

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.

Installation

Assemblies

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

web.config

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

Testing

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

Usage

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:
http://superapp.company.local/whoami.signinas
Switch user with:
http://superapp.company.local/switchuser.signinas

whoami.signinas

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

switchuser.signinas

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)

cache.signinas

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

cleancache.asigninas

This will delete the cache to start fresh

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

Comments

No comments yet.