Changes to middleware registration to run in specific iis pipeline stage.
Skipped a test.