我们正在将现有的 Web 应用程序从带有 IIS 7 的 Server 2008 迁移到带有 IIS 8 的 Server 2012。当我将“启用预加载”设置为 true 时,为该进程提供服务的应用程序池立即崩溃并出现以下错误。
Log Name: Application
Source: Application Error
Date: 7/30/2013 2:20:48 PM
Event ID: 1000
Task Category: (100)
Level: Error
Keywords: Classic
User: N/A
Computer: 513582-API1
Description:
Faulting application name: w3wp.exe, version: 8.0.9200.16384, time stamp: 0x50108835
Faulting module name: msvcrt.dll, version: 7.0.9200.16384, time stamp: 0x5010ac20
Exception code: 0xc0000005
Fault offset: 0x000000000000128d
Faulting process id: 0x2520
Faulting application start time: 0x01ce8d5179cc6403
Faulting application path: c:\windows\system32\inetsrv\w3wp.exe
Faulting module path: C:\Windows\system32\msvcrt.dll
Report Id: c18a3c6d-f944-11e2-93f8-bc305bf8e042
Faulting package full name:
Faulting package-relative application ID:
Event Xml:
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
<System>
<Provider Name="Application Error" />
<EventID Qualifiers="0">1000</EventID>
<Level>2</Level>
<Task>100</Task>
<Keywords>0x80000000000000</Keywords>
<TimeCreated SystemTime="2013-07-30T18:20:48.000000000Z" />
<EventRecordID>52432</EventRecordID>
<Channel>Application</Channel>
<Computer>513582-API1</Computer>
<Security />
</System>
<EventData>
<Data>w3wp.exe</Data>
<Data>8.0.9200.16384</Data>
<Data>50108835</Data>
<Data>msvcrt.dll</Data>
<Data>7.0.9200.16384</Data>
<Data>5010ac20</Data>
<Data>c0000005</Data>
<Data>000000000000128d</Data>
<Data>2520</Data>
<Data>01ce8d5179cc6403</Data>
<Data>c:\windows\system32\inetsrv\w3wp.exe</Data>
<Data>C:\Windows\system32\msvcrt.dll</Data>
<Data>c18a3c6d-f944-11e2-93f8-bc305bf8e042</Data>
<Data>
</Data>
<Data>
</Data>
</EventData>
</Event>
我的 web.config 的 system.webserver 节点中有这个:
<applicationInitialization remapManagedRequestsTo="In_LoadBalancer_Rotation.html" skipManagedModules="true" >
<add initializationPage="/Default.aspx" />
</applicationInitialization>
我还将应用程序的应用程序池设置为“AlwaysRunning”。
一旦我在 web.config 中注释掉上述部分并将“启用预加载”设置为 false,一切都会像魅力一样工作。