-1

We are using on a C# COM component to link our asp classic app to SQL Server.

Since the windows update KB4338819, when I run the app we get the ASP exception:

Microsoft JScript runtime error '800a01ad'
Automation server can't create object

executing ASP line:

var foo = Server.CreateObject("MyComComponent");

If I uninstall the update it works.

The application pool is set to allow 32 bit applications (value: true) (even without the update, if this is set to false we get the same error)

Ideas? Is there a better place to ask such question?

Thanks!


UPDATE:

Microsoft acknowledges the issue but they are still working on a solution. Meanwhile they suggest some workarounds here:

Vetras
  • 99
  • 4

3 Answers3

1

Please verify if you can resolve the problem by adjusting your IIS config as described here https://stackoverflow.com/questions/51310868/c-sharp-com-object-can-no-longer-be-created-from-classic-asp-since-kb4338419/51312721#51312721

haltenberg
  • 13
  • 3
  • thank you! I tried to change to "Application pool identity" but it did not work for me or my colleague. We still get the same error. For now, we will uninstall the update KB4338819. – Vetras Aug 07 '18 at 14:25
0

I have same problem. In asp application I can't create COM objects from .Net assembly (independent on 32-bit or 64-bit application). I have Windows Authentication and identity NetworkService. I tried change it, but it didn't help. Only one thing helps - uninstall kb4338819.

-1
Default.asp file
----------------
<% 'Default.asp
' The application pool is set to allow 32 bit applications

Response.Write "hello<br/>"

' Microsoft Scripting Runtime Library ( C:\Windows\System32\scrrun.dll and C:\Windows\SysWOW64/scrrun.dll )

Set fso = Server.CreateObject("Scripting.FileSystemObject") ' OK
Set d = Server.CreateObject("Scripting.Dictionary") ' OK

' Primary Interop Assembly (PIA) for ADO ( C:\Program Files (x86)\Microsoft.NET\Primary Interop Assemblies\adodb.dll )

Set conn = Server.CreateObject("ADODB.Connection") ' OK

' fail when you comment the code of Application_OnStart (manually restart the pool after changes in Global.asa)
' Windows Update KB4338819 is to blame

Set arr = Server.CreateObject("System.Collections.ArrayList") ' Fails
Set md5 = Server.CreateObject("System.Security.Cryptography.MD5CryptoServiceProvider") ' Fails
Set utf16 = Server.CreateObject("System.Text.UnicodeEncoding") ' Fails
Set sha1 = Server.CreateObject("System.Security.Cryptography.SHA1Managed") ' Fails

Response.Write "done"

%>

Global.asa file
---------------
<script language="vbscript" runat="server">

Sub Application_OnStart

    ' Fix for Windows Update KB4338819
    ' Fix Microsoft VBScript error '800a01ad' when creating 'System.*'
    ' call ToString method (that always exists) to force initialization of objects

    fix_ArrayList.ToString
    fix_MD5CryptoServiceProvider.ToString
    fix_UnicodeEncoding.ToString
    fix_SHA1Managed.ToString

End Sub
</script>

<object id="fix_ArrayList" runat="server" scope="Application" progid="System.Collections.ArrayList"></object>
<object id="fix_MD5CryptoServiceProvider" runat="server" scope="Application" progid="System.Security.Cryptography.MD5CryptoServiceProvider"></object>
<object id="fix_UnicodeEncoding" runat="server" scope="Application" progid="System.Text.UnicodeEncoding"></object>
<object id="fix_SHA1Managed" runat="server" scope="Application" progid="System.Security.Cryptography.SHA1Managed"></object>

tolis.py
  • 1
  • 1