After updating to Windows 11 on June 2, 2025, I'm experiencing major issues with legacy Classic ASP applications on IIS that make use of both VBScript and JScript on the server side.
json library
Pages that previously ran for years without issue now randomly throw the following error:
Active Server Pages error 'ASP 0240' Script Engine Exception
A ScriptEngine threw exception 'C0000005' in 'IActiveScript::SetScriptState()' from 'CActiveScriptEngine::ReuseEngine()'.
In the Windows Application event log, I see messages like:
Eccezione del modulo di script 'C0000005' in 'IActiveScript::SetScriptState()' da 'CActiveScriptEngine::ReuseEngine()'
This causes the application to throw a HTTP 1.1/500 Internal Server Error for many requests. Sometimes the page loads, but more often it fails, seemingly at random. Technical Background:
Environment: IIS 10 / Classic ASP / Windows 11
Scripting: Many of my ASP pages combine <% ... %> blocks (VBScript) with ... sections.
I rely on JScript for things like JSON parsing (Douglas Crockford’s json2.js ported to ASP), string manipulation, and various helper functions, while using VBScript for main business logic.
This hybrid approach worked flawlessly on all prior versions of Windows/IIS.
Through community forums, I found that enabling "Execute In MTA" (COM+ Properties > ASP > "Execute In MTA" = True) in IIS seems to temporarily avoid the crash.
This does appear to stop the immediate crash, but introduces other side effects, including session/thread safety problems and instability with certain legacy COM objects.
Disabling JScript or rewriting all JScript as VBScript is not feasible due to project complexity and size.
This appears to be a regression or breaking change in Windows 11 , as the exact same codebase worked perfectly on all earlier Windows 10 and Windows Server 2019/2022 builds.
Classic ASP with mixed VBScript and JScript is now fundamentally unstable: JScript code can no longer be reliably executed within VBScript pages.
Many open source JSON solutions and advanced Classic ASP modules rely on this hybrid script model.
It looks like the underlying scripting engine has changed, with resource management (IActiveScript::SetScriptState / ReuseEngine) now failing when both engines are loaded.
Has anyone found a permanent workaround or patch from Microsoft for this issue?
Is there a way to continue using both JScript and VBScript together in Classic ASP, or is this now a dead end on current Windows releases?
Has Microsoft acknowledged this as a bug or given any indication that a fix will be released?
There are thousands of business-critical, long-running Classic ASP apps that depend on this scripting combination (especially for JSON parsing).
Breaking this compatibility without warning or providing migration tooling is a major blocker for companies unable to rewrite entire applications in the short term.
"Execute In MTA" is a dangerous workaround, as it introduces potential concurrency and state issues in applications never designed for multi-threaded execution.
I tried uninstalling both KB5054979 and KB5058499 updates (as seen in the update history), but this did not resolve the issue. Previously, I was able to use a system restore point from 2025-06-01 to roll back changes, but now I can't even find the system restore interface anymore.
We found, due to the Windows 11 24H2, jscript9legacy.dll was getting used instead of jscript.dll (per this reference: Script errors in Working Papers Caseview - Windows 24H2 Update). According to Caseview, "Windows 11 24H2 has begun setting a local policy that, by default, causes applications to use the jscript9legacy.dll instead of jscript.dll. jscript9legacy.dll does not contain the full functionality" as jscript.dll.
To use jscript.dll instead of jscript9legacy.dll, we have two methods:
Generate Registry Keys and Value via .REG file
Open Notepad
Insert the following text:
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Internet Explorer\Main]
"JScriptReplacement"=dword:00000000
Save as a .REG file.
Execute the file by double clicking.
Manually generate the Registry Keys and Values via Registry Editor
Launch regedit.
Navigate to: HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Internet Explorer\Main (Keys Internet Explorer and Main may need to be created)
Right-click the Main key and select New | DWORD (32-bit) Value.
Name the new value JScriptReplacement.
Set the value of JScriptReplacement to 0.
Users can directly modify the registry key in either HKEY_LOCAL_MACHINE (as shown above) or HKEY_CURRENT_USER.
Now when we call a Server Side JavaScript function, it no longer produces an error.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With