I've got the asp.net web site deployed to the Azure App Service.
I need to move out the api to another website on another url. For that I've done the reverse proxy:
<rewrite>
<rules>
<rule name="ProxyRuleApi" stopProcessing="true">
<match url="^api/(.*)" />
<action type="Rewrite" url="http://anotherApiServer/api/{R:1}"/>
<conditions>
</conditions>
</rule>
</rules>
</rewrite>
But constantly get the "500" error. So looks like App Service fails to read web.config or something.. Not sure about the problem at all.
ARR turned on.
- Anyone faced the issue?
- What I'm doing wrong?
- Am I doing it right?
- How can I trace an error? (detailed errors have been turned on and custom errors I've turned off).
I've even try to
<action type="AbortRequest" />
Still got 500 status.
This is an error message:
the page cannot be displayed because an internal server error has occurred.
UPD. Solution.
The problem was that I've forgot about the transformation that exists in the Web.Release.config
that Applied another rewrite rules to the Web.Config
. So I've updated the Web.Release.config
to include my changes into the transformation.
The generated error has been generated with IIS because it was not possible to read the Web.config
with twi rewrite rules
defined. Azure portal helped me to find this out. App Service -> Diagnostic logs -> Turn them on
and after that App Service -> Log stream
. You will see the stream of the logs.