Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have set up a web site ( on IIS to provide SSL and Windows Auth, and to forward all HTTPS requests to another server (BIOS name: internalserver; port 2080). The rule specifying this setup reads:

<?xml version="1.0" encoding="UTF-8"?>
                    <preCondition name="ResponseIsHtml1">
                        <add input="{RESPONSE_CONTENT_TYPE}" pattern="^text/html" />
                <rule name="ReverseProxyInboundRule1" stopProcessing="true">
                    <match url="(.*)" />
                    <action type="Rewrite" url="http://InternalServer:2080/{R:1}" />

This is leading to the following behavior (reproducible in both IExplorer and Firefox):

  • Clicking results in Error 502 "Web server received an invalid response while acting as a gateway or proxy server"

  • Reloading the page causes the site to load - but unformatted, suggesting that the CSS files were not found.

  • Reloading the page a second time causes the site to load correctly, including CSS-specified formats.

The Error 502 reappears each time the browser is closed and relaunched.

On the other hand, if I use Basic Auth instead of Windows Auth, the reverse proxy works just fine, with none of the above issues coming up.

My question are:

  • is the emergence of Error 502 known in this type of configuration known?
  • does this represent a bug in IIS?
  • if not, is any interaction with other software known to produce this issue?
share|improve this question

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.