iis - Azure Server error when port appended to host header -
i'm running azure web app that's meant accept xml posts. when post urls using curl works, however, when using apache camel/http post results in 400 error. when @ log files, difference cs-host field. curl commands value domain (e.g. azurewebsites.net), apache post appends port 80 (e.g. azurewebsites.net:80). added rewrite rule strip port call (rule details below), post still results in 400 error. closest related post find here: including port number in http host header causes service unavailable error unfortunately looks it's related netscaler, not azure web app, , resolution didn't provide detailed guidance.. input!
here's rewrite rule:
<?xml version="1.0" encoding="utf-8"?> <configuration xmlns:xdt="http://schemas.microsoft.com/xml-document-transform"> <location path="domain" xdt:locator="match(path)"> <system.webserver> <rewrite xdt:transform="insertbefore(/configuration/location[(@path='domain')]/system.webserver/*[1])"> <rules> <rule name="domainrule1" stopprocessing="true"> <match url="domain.azurewebsites.net:80(.*)" /> <action type="redirect" url="http://domain.azurewebsites.net/{r:1}" /> </rule> </rules> </rewrite> </system.webserver> </location> <location path="~1domain" xdt:locator="match(path)"> <system.webserver> <rewrite> <rules> <rule name="domainrule2" stopprocessing="true" xdt:transform="insert"> <match url="domain.azurewebsites.net:80(.*)" /> <action type="redirect" url="http://domain.azurewebsites.net/{r:1}" /> </rule> </rules> </rewrite> </system.webserver> </location> </configuration>
Comments
Post a Comment