Assume migrate a classic ASP application within own COM+ component from IIS 6 to IIS 7. The application pool runs under 32-bit compatibility mode and managed pipeline is Classic.
The ASP web application was running stable under the Windows 2003 IIS 6. However, it displays 500 error pages intermittently in IIS 7.
When the issue occurs, it logs 500 errors with different messages.
In the Application Event log, the following event was logged:
Log Name: Application
Source: Microsoft-Windows-User Profiles Service
Date: 2010/5/31 13:10:01
Event ID: 1530
Task Category: None
Windows detected your registry file is still in use by other applications or services. The file will be unloaded now. The applications or services that hold your registry file may not function properly afterwards.
The following information was included with the event:
2 user registry handles leaked from \Registry\User\S-1-5-21-3837118448-xxxxxxxxx-2412068830-1006_Classes:
Process 1956 (\Device\HarddiskVolume2\Windows\SysWOW64\inetsrv\w3wp.exe) has opened key \REGISTRY\USER\S-1-5-21-3837118448-xxxxxxxxx-2412068830-1006_CLASSES
Process 1956 (\Device\HarddiskVolume2\Windows\SysWOW64\inetsrv\w3wp.exe) has opened key
This event is letting us know that when the profile was being unloaded w3wp.exe with process id (PID) 1956 had a registry key handle to the profile hive for the user with SID -1-5-21-3837118448-xxxxxxxxx-2412068830-1006.
According to kb947239, event 1530 occurs because Windows automatically closes any registry handle to a user profile that is left open by an application.
In previous versions of Windows, we need to download and install the User Profile Hive Cleanup Services (UPHClean) to ensure user sessions are completed terminated when a user logs off. So in Windows 2003 IIS6, UPHClean isn’t downloaded by default.
After Windows Vista, UPHClean utility is built into User Profile service which always runs. On Windows 2008, UPHClean removes access to files or directories data that was cached by the application for the file is lost. This could cause the process to fail because it cannot read from the file. This issue seems to be improved in UPHClean v2.0.
The solution to preventing this problem turns out to be a very simple configuration setting in IIS7's Application Pool Advanced Settings.
Lucky for us, the issue was resolved after enabling Load User Profile in Application Pool setting.
IIS doesn't load the Windows user profile, but certain applications might take advantage of it anyway to store temporary data. What this does is tell IIS to completely load the user profile for the entirety of the execution of the application.
Event ID: 1530 may be logged in the Application log on a Windows 7-based or Windows Vista-based client computer
Mystery of the Server 2008 + IIS7 + OLE = "MDAC Not Installed" Error
Thanks for posting this. There are legacy apps(which were state of the art once) which still needed to be supported.