Configuration file is not well-formed, Config source is blank

2

Sporadically my WebApi application stops working until i do a app pool recycle.

The site gets stuck with this YSOD error:

Detailed Error Information
Module: IIS Web Core
Notification: BeginRequest
Handler: Not yet determined
Error Code: 0x8007000d
Config Error: Configuration file is not well-formed XML 
Config File: \\?\{PathToMyVirtualApplicationWebsiteHere}\web.config
Physical Path: {PathToMyVirtualApplicationWebsiteHere}

The oddest issue here is that the YSOD Config Source is reported as blank:

Config Source   
   -1: 
    0: 

IF the XML web.config was malformed, normally you see the bad line of xml here.

Seemingly Root Cause - I have IIS to recycle at a set time every day, and it seems to go bad:

  • An application has reported as being unhealthy. The worker process will now request a recycle. Reason given: An error message detailing the cause of this specific request failure can be found in the application event log of the web server. Please review this log entry to discover what caused this error to occur. The data is the error.
  • A ton more of "the data is the error" events doing recycle at same second as above
  • One second later. Message: Exception of type 'System.OutOfMemoryException' was thrown.StackTrace: at System.Web.Hosting.HostingEnvironment.StopRegisteredObjects(Boolean immediate) at System.Web.Hosting.HostingEnvironment.InitiateShutdownWorkItemCallback(Object state) 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.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem() at System.Threading.ThreadPoolWorkQueue.Dispatch()
  • ~ 1 minute later Windows Eror Reporting kicks in ... Faulting application name: w3wp.exe
  • Then all is quiet in event logs

What i have verified:

  1. ProcMon shows no access to {PathToMyVirtualApplicationWebsiteHere}\web.config
  2. App Pool Recycle will fix the problem (stop/starts immediately), until next time

Update:

  1. I am using Application Initialization 1.0 for IIS 7.5, in conjunction with Url Rewrite Module ... on a different server where this was not installed properly we have the EXACT same error (but without the out of memory problems)
iis-7.5
asp.net-web-api2
url-rewrite-module
ysod
asked on Stack Overflow Oct 20, 2015 by felickz • edited Dec 14, 2015 by felickz

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0