We've a problem with our .net web API 2 web services hosted on IIS-7 (windows server 2008 R2. net 4.5.2). Sometimes the w3p process crashes. We can see this from the server event viewer.
An unhandled exception occurred and the process was terminated.
Application ID: /LM/W3SVC/57/ROOT
Process ID: 7340
Exception: System.ArgumentException
Message: Value does not fall within the expected range.
StackTrace: at System.Runtime.InteropServices.Marshal.ThrowExceptionForHRInternal(Int32 errorCode, IntPtr errorInfo)
at System.Runtime.InteropServices.Marshal.ThrowExceptionForHR(Int32 errorCode)
at System.Web.Hosting.IIS7WorkerRequest.GetUserToken()
at System.Web.HttpContext.get_ClientIdentityToken()
at System.Web.HttpContext.get_ImpersonationToken()
at System.Web.ClientImpersonationContext.Start(HttpContext context, Boolean throwOnError)
at System.Web.ThreadContext.EnterExecutionContext()
at System.Web.Hosting.AspNetHostExecutionContextManager.SetHostExecutionContext(HostExecutionContext hostExecutionContext)
at System.Threading.HostExecutionContextManager.SetHostExecutionContextInternal(HostExecutionContext hostContext)
at System.Threading.ExecutionContext.SetExecutionContext(ExecutionContext executionContext, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot)
at System.Threading.Tasks.Task.ExecuteEntry(Boolean bPreventDoubleExecution)
at System.Threading.Tasks.Task.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem()
at System.Threading.ThreadPoolWorkQueue.Dispatch()
at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback()
We have logs for each method that could be called by clients, at the start and at the end of each methods. When the w3p crashes there is no log for our methods. It seems that the request fail before to arrive to the method or after to have processed the request.
We've a problem with our .net web API 2 web services hosted on IIS-7 (windows server 2008 R2. net 4.5.2). Sometimes the w3p process crashes. We can see this from the server event viewer.
We have logs for each method that could be called by clients, at the start and at the end of each methods. When the w3p crashes there is no log for our methods. It seems that the request fail before to arrive to the method or after to have processed the request.