Azure "IIS Application Initialization Preload" logs a "The request is not supported" exception

1

In an Azure Webapp running a WebApi 2 web application, I have this error in my logs every time I swap the application from the Preprod to the Production slot:

System.Web.HttpException (0x80004005): An error occurred while communicating with the remote host. The error code is 0x80070032.
---> System.Runtime.InteropServices.COMException (0x80070032): The request is not supported. (Exception from HRESULT: 0x80070032)
at System.Web.Hosting.IIS7WorkerRequest.RaiseCommunicationError(Int32 result, Boolean throwOnDisconnect)
at System.Web.Hosting.IIS7WorkerRequest.ExplicitFlush()
at System.Web.HttpResponse.Flush(Boolean finalFlush, Boolean async)
at System.Web.HttpWriter.WriteFromStream(Byte[] data, Int32 offset, Int32 size)
at System.IO.Stream.<>c.<BeginWriteInternal>b__46_0(Object )
at System.Threading.Tasks.Task`1.InnerInvoke()
at System.Threading.Tasks.Task.Execute()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.IO.Stream.EndWrite(IAsyncResult asyncResult)
at System.Threading.Tasks.TaskFactory`1.FromAsyncCoreLogic(IAsyncResult iar, Func`2 endFunction, Action`1 endAction, Task`1 promise, Boolean requiresSynchronization)
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Web.Http.WebHost.HttpControllerHandler.<WriteStreamedResponseContentAsync>d__15.MoveNext()

It appears 3 times per instance. Here's the pertinent request context:

httpMethod: "GET"
absoluteUri: "http://localhost/"
userHostAddress: "127.0.0.1"
contentType: ""
userAgent: "IIS Application Initialization Preload"

Nothing in the stack trace is my code. Any ideas how to fix it?


The / route is simply:

 [HttpGet, Route("")]
 public HttpResponseMessage Index()
 {
    return new HttpResponseMessage(HttpStatusCode.OK)
    {
       Content = new StringContent("OK", Encoding.UTF8, "text/plain")
    };
 }
azure
azure-web-app-service
asked on Stack Overflow Oct 4, 2017 by dstj

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0