IIS ARR returns 502 for POST request, but fine for GET

0

Summary

I am using ARR for zero downtime blue/green deployment for a virtual application.

GET requests work, yet POST requests via ARR to a ASP.NET site running in a Virtual Application returns a 502.3 error after the timeout specified in ARR. Failed Request Tracing shows BytesReceived="0" as if the POST request is missing. POST requests work fine if made directly to the site behind ARR.

Set Up

I have set up Application Request Routing (ARR) to act as a reverse proxy to two websites on the same server where only one of them is marked Healthy at a time. This is to achieve zero downtime ASP.NET deploys so can warm up the site before sending traffic to it.

Our web application consists of two code bases, with one of them as the root website, and the second as a virtual application at /app/. Hence requests to subdomain.myurl.com/app/whatever go to the virtual application. It is only this second code base that I wish to use ARR for.

WEB -> subdomain.myurl.com/app/ -> Server Farm -> SiteA/app/ or SiteB/app/

There's a URL Rewrite rule on the Server which redirects any request with that specific subdomain and path /app* to the web farm.

SiteA and SiteB are set up to each have a virtual application too with path /app/.

The Issue

GET subdomain.myurl.com/app/ returns the page with a login form.

A POST request subdomain.myurl.com/app/ with the filled in form fields causes a 502 error after the timeout specified in the Server Farm Proxy settings.

I can categorically state the application is not timing out - it returns within 200ms when making the same request direct to the site instead of via ARR.

Failed Request Tracing

There is a gap in the timestamp between GENERAL_READ_ENTITY_START and GENERAL_READ_ENTITY_END for whatever is set in the Server Farm Proxy timeout (have tried 30, 60, 300 seconds).

Here is the output:

NOTIFY_MODULE_START - ModuleName="ManagedPipelineHandler", Notification="EXECUTE_REQUEST_HANDLER", fIsPostNotification="false"

GENERAL_READ_ENTITY_START

Delay in timestamp of the Proxy timeout

GENERAL_READ_ENTITY_END with BytesReceived="0", ErrorCode="The I/O operation has been aborted because of either a thread exit or an application request. (0x800703e3)"

NOTIFY_MODULE_COMPLETION with ModuleName="ManagedPipelineHandler", Notification="EXECUTE_REQUEST_HANDLER", fIsPostNotificationEvent="false", CompletionBytes="0", ErrorCode="The I/O operation has been aborted because of either a thread exit or an application request. (0x800703e3)"

iis
routing
rewrite
arr
web-farm
asked on Server Fault Oct 24, 2017 by Marcus • edited Oct 26, 2017 by Marcus

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0