We are trying to setup a reverse proxy mechanism using ARR and URL Rewrite. The rewriting is working fine when the target url is a one which is hosted in the same server. But when we try to route it to an external server the routing is now working. We are getting the
HTTP Error 502.3 - Bad Gateway
The operation timed out
Module ApplicationRequestRouting
Notification ExecuteRequestHandler
Handler ApplicationRequestRoutingHandler
Error Code 0x80072ee2
Requested URL http://localhost:8882/ff
Physical Path D:\pocwebsites\exposed\ff
Logon Method Anonymous
Logon User Anonymous
•The CGI application did not return a valid set of HTTP errors.
•A server acting as a proxy or gateway was unable to process the request due to an error in a parent gateway.
•Use DebugDiag to troubleshoot the CGI application.
•Determine if a proxy or gateway is responsible for this error.
Please find the web.config file given below,
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="or_rule_1" enabled="true">
<match url=".*" />
<action type="Rewrite" url="http://www.cnn.com" />
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>
We had a similar issue. Rewriting the url to a local site was no problem, but rewriting to an external site gave a bad gateway error.
We do have an internal proxy (the proxy you also set in IE to visit external sites). Setting this same proxy in the ARR reverse proxy page fixed our issue.