Problems with SBS monitoring web site, Part 2



Symptoms:

1. w3wp.exe crashes inconsistently with a wierd uncaught exceptoin
error.
or
2. your (third party) application crashes with stack trace

Stack Trace:

[NullReferenceException: Object reference not set to an instance of an
object.]
System.Web.HttpContext.GetConfig(String name) +195

System.Web.UI.CompilationConfiguration.GetRecompilationsBeforeAppRestarts(H­ttpContext

context) +13

System.Web.Compilation.PreservedAssemblyEntry.DoFirstTimeInit(HttpContext

context) +39

System.Web.Compilation.PreservedAssemblyEntry.EnsureFirstTimeInit(HttpConte­xt

context) +98
System.Web.HttpRuntime.PreloadAssembliesFromBin(HttpContext
context) +176
System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +445


[HttpException (0x80004005): ASP.NET Initialization Error]
System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +965
System.Web.HttpRuntime.ProcessRequestInternal(HttpWorkerRequest wr)
+128

My investigation and solution:


I've had the same problem with CRM 3.0 and w3wp.exe crashing
inconsistently. After an agressive research including disassembly and
debugging of Microsof code I found the exact reason for that
misbehavior.

The reason which caused all exceptions was inconsistency of loaded .NET
dlls because of two differenet Windows installations coexisting on the
same machine but on different logical hard drives.

My exact scenario is:
- Drive C hosts a rarely used Windows XP installations with .NET 1.1
SP0 installed. No windows updates were applied recently to this Windows
XP installation.

- Drive D hosts my development Windows Server 2003 with the built-in
..NET 1.1 and SP1 applied on it. I have installed the CRM server on this
Windows 2003 installation. This is the crashing Windows installation.

So after a day and a half of Google queries, documentation reading and
wierd experiments with permissions and IIS I attached a debugger to the
w3wp.exe and cought a Null reference exception, causing this module to
fail. The exception was raised by the aspnet_isapi.dll (<system
root>\Microsoft.NET\Framework\v1.1.4322\aspnet_isapi.dll). Further
investigation prouved that the state of the dll has been broken in some
way, because no memory fields made any sense.

So I tired to investigate the dll file physically and for exact file
identification turned the SysInternals File Monitor on in order to
track who and when loads this file.

Apparently There is a bug in the .NET dll lookup algorythm because the
aspnet_isapi.dll file has been constantly loaded from the Windows XP
installation on drive C. As a result inconsistent versions of the
w3wp.exe (.NET 1.1 SP1) and the aspnet_isapi.dll (.NET 1.1 SP0) files
were loaded and executed, which caused the problem. A copy-paste of the
exact .NET version files from my D to my C installation solved the
problem.

Windows registry showed some records containing wrong paths to .NET
dlls on drive C. Fixing them manually did not help at all. I sugggest
there is some hardcoded reference to the first OS drive or even to
drive C which causes IIS always to look at drive C first.

The easiest solution of this problem is to synchronize the service
packs applied to all .NET Frameworks on all of coexisting Windows OS.

.



Relevant Pages

  • Re: CHKDSK NTFS file system corruption boot screen message flooding (SOLVED)
    ... Your Installation Specialist ... Windows XP SP3 detects a disk problem at boot time and runs chkdsk. ... or registry fix for large LBA drives, ... older Microsoft-certified ultra.sys driver. ...
    (microsoft.public.windowsxp.general)
  • 4 CONSECUTIVE CORRUPT DISK DISASTERS WITH WIN2K
    ... running Windows 2000 SP4 with latest updates, ... unreadable / corrupt. ... installation CD, thoroughly irrelevant for what I was doing at the time. ... Restoration of data files from backup hard drives during re-installation ...
    (microsoft.public.win2000.general)
  • Re: XP product ID on trashed HDD
    ... Odds are the technician had a copy of an HP OEM CD with the ... You're right that the installation key on the failed hard ... Ultimate Boot CD for Windows ... drives are jumpered correctly. ...
    (microsoft.public.windowsxp.configuration_manage)
  • Re: I am DEAD
    ... The 3rd Disc was just a basic drive on the sec ide. ... keep the info intact even if I can't get it off the drives at this time. ... As for the RAID-0 array did you try setting up Windows on a completely ... read from the new Windows installation? ...
    (microsoft.public.windowsxp.help_and_support)
  • Re: WinCE 6.0 PNG Encoder
    ... You had that option during installation. ... mean, of course, the you get every line of source for Windows CE. ... no easy access to the source beyond what's in the Shared Source. ... the exception. ...
    (microsoft.public.windowsce.platbuilder)