ASP.NET Postback error under Reverse Proxy with IIS 8.5, URL Rewrite 2.0 and ARR 3.0 -
i setup reverse proxy in iis in configuration problems asp.net postbacks. when click on submit button of proxied website 404 error. url in browser address bar changed rewritten url.
for example, website need proxy http://website.com/host. here http://website.com , http://website.com/host separate web applications. host running virtual folder under website.com.
i want access host url: http://me.local/myhost. in iis me.local asp.net web application , myhost added application child of me.local. works fine long don't click on submit button anywhere on proxied website. once page http://me.local/host results in 404 error. when @ page's html source form's action url set correctly /myhost
why error happen? possible fix in iis, or need make changes host application?
my server running iis 8.5. host server old 1 iis 6, , web application can asp.net 1.1 or asp.net 2.0.
the section rewrite rules web.config of "myhost" application is:
<configuration> <system.webserver> <rewrite> <rules> <rule name="route requests host" stopprocessing="true"> <match url="^(.*)" /> <conditions> <add input="{cache_url}" pattern="^(https?)://" /> </conditions> <action type="rewrite" url="{c:1}://website.com/host/{r:1}" /> <servervariables> <set name="http_accept_encoding" value="" /> </servervariables> </rule> <rule name="hosttodefault" stopprocessing="true"> <match url="^" /> <conditions> <add input="{request_method}" pattern="^post$" negate="true" /> </conditions> <action type="redirect" url="default.aspx" appendquerystring="false" /> </rule> <rule name="redirectuserfriendlyurl1" stopprocessing="true"> <match url="^(.*)default\.aspx$" /> <conditions> <add input="{request_method}" pattern="^post$" negate="true" /> </conditions> <action type="redirect" url="(.*)" appendquerystring="false" /> </rule> </rules> <outboundrules> <rule name="reverseproxyoutboundrule1" precondition="responseishtml1"> <match filterbytags="a, area, base, form, frame, head, iframe, img, input, link, script" pattern="^http(s)?://website.com/(.*)" /> <action type="rewrite" value="/{r:2}" /> </rule> <rule name="nonhostrewriterelativepaths" precondition="responseishtml1"> <match filterbytags="a, area, base, form, frame, head, iframe, img, input, link, script" pattern="^/(?!host)(.*)" negate="false" /> <action type="rewrite" value="http://website.com/{r:1}" /> </rule> <rule name="hostrelativepaths" precondition="responseishtml1"> <match filterbytags="a, area, base, form, frame, head, iframe, img, input, link, script" pattern="^/host/(.*)" negate="false" /> <action type="rewrite" value="/myhost/{r:1}" /> </rule> <rule name="outboundrewriteuserfriendlyurl1" precondition="responseishtml1"> <match filterbytags="a, form, img" pattern="^(.*)myhost/default\.aspx$" /> <action type="rewrite" value="{r:1}/myhost/default" /> </rule> <preconditions> <precondition name="responseishtml1"> <add input="{response_content_type}" pattern="^text/html" /> </precondition> </preconditions> </outboundrules> </rewrite> <urlcompression dostaticcompression="false" dodynamiccompression="false" /> </system.webserver> </configuration>
Comments
Post a Comment