I\'ve spent hours trying to solve this so I\'m posting as a last resort..
I\'ve tried removing some URL rewrites that were pointing a webpage from HTTP to HTTPS.
Have you checked server level rules? Can be found in IIS Manager, click server node and then Url Rewrite module or directly in the IIS config file located:
C:\Windows\System32\inetsrv\config\applicationHost.config
It seems that there is an output cache that caches the redirect response before it reaches the URL rewrite rules again. It can be turned off:
<system.webServer>
<caching enabled="false" enableKernelCache="false" />
</system.webServer>
Be aware though that this is output cache for the whole application, so it might affect something else. In any case it can be utilized and then commented out to clean the state of url rewrite rules.
I had the same problem with IIS express - removing rewrite section from web.config was unsuccessful. Solution - clean a browser's cache.