
AI Inception: Building AI Solutions with AI for AI
June 18, 2025Announcing the release of SQL Server Management Studio (SSMS) 21.3.6
June 18, 2025Issue description:
I am using Classic ASP with jscript9legacy.dll (Jscript 9) JavaScript enginage and getting Script Engine Exception. A ScriptEngine threw exception ‘C0000005’ in ‘IActiveScript::SetScriptState()’ from ‘CActiveScriptEngine::ReuseEngine() issue while using classic ASP with jscrip9legacy JavaScript engine.
I see following error in the Event log:
Event Xml:
<Event xmlns=http://schemas.microsoft.com/win/2004/08/events/event>
5
0
2
0
0
0x80000000000000
10933
Application
PV-QAENTSV10.bstsoftware.net
File /AuroraWeb/ENT_Automation.asp Script Engine Exception. A ScriptEngine threw exception ‘C0000005’ in ‘IActiveScript::SetScriptState()’ from ‘CActiveScriptEngine::ReuseEngine()’.
More about the JavaScript libraries for Classic ASP:
jscrip9legacy is a newer engine than jscrip9legacy, don’t confuse it with the word ‘legacy’ in jscrip9legacy.
- jscript.dll (Jscript 5.8) = older, compatible with Classic ASP (The real legacy dll)
- jscript9legacy.dll (Jscript 9) = newer, but less compatible with Classic ASP (The fake legacy dll 😊)
The “legacy” label here refers to its role in maintaining compatibility with legacy websites (not Classic ASP) within the Internet Explorer context.
In details:
- jscript.dll refers to the classic JScript engine (version 5.8), which is what Classic ASP was originally built to run on. This engine supports legacy constructs and behavior expected by older scripts and COM interactions.
- jscript9.dll / jscript9legacy.dll is part of the JScript9 engine, introduced with Internet Explorer 9 to modernize JavaScript support (aligning with ECMAScript 5). It is faster and more standards-compliant….but not backward-compatible with all classic JScript features.
Fix:
we need to configure the system to use the legacy JScript engine (`jscript.dll`) instead of `jscript9legacy.dll`.
This involves modifying the Windows Registry to disable the JScript9 engine for the IIS worker process (`w3wp.exe`). Here are the steps to follow:
- Open the Registry Editor (regedit).
- Navigate to the following key:
`HKEY_LOCAL_MACHINESOFTWAREMicrosoftInternet ExplorerMainFeatureControlFEATURE_ENABLE_JSCRIPT9_LEGACY`
- Create a new DWORD (32-bit) value named `w3wp.exe`.
- Set its value to `0`.
- For 32-bit systems or applications, also navigate to:
`HKEY_LOCAL_MACHINESOFTWAREWOW6432NodeMicrosoftInternet ExplorerMainFeatureControlFEATURE_ENABLE_JSCRIPT9_LEGACY`
- Repeat steps 3 and 4 in this location.
- After making these changes, restart IIS to apply the new settings.
After the above changes, the Access Violation issue must have been fixed.
I hope this helps.