I just migrated an old classic ASP app to a Windows 2016 server running IIS 10 and I cannot use a DLL that ran flawlessly on Windows 2012 running IIS 8.
I've spent the last 2 days trying everything I could think of with no luck. Even building a new DLL with Visual Studio 2017 - that also didn't work. Has anyone run into this problem and solved it? I hope so because I hate to go backward at this point.
It happens when a call is made to "Server.CreateObject(nameOfDll)" and the error is either "Server.CreateObject Failed" or "entry-point DllRegisterServer was not found".
The DLL is installed with an MSI installer. I also tried regsvr32 and regasm with no luck. I'm thinking it's a compatibility issue that I hope one of you smart folks know how to work around.
** UPDATE **
I setup a new 2012 Server running IIS 8 to test the suggestion made by Lex Li and Lankymart. It worked on that server without any problems. I then made the changes to the Windows 2016 server running IIS 10 that was giving me a problem and it did not fix the problem, but the error message changed: "Object doesn't support this property or method". It appears to be reading the DLL but doesn't recognize the methods.
After 4 days I discovered a rock solid solution for installing a 32 bit COM DLL into a Windows 2016 Server running IIS 10. It's a bit complicated but here it is:
There are two registration utilities that must be used to register the 32 bit COM DLL, gacutil.exe and RegAsm.exe. You should make sure you uninstall any previous DLL before installing a new one. The program RegSvr32.exe will not work. This is a MANAGED CODE DLL.
Windows Server 2016 has a quirk when this was written on 7/21/18. If you try to register the COM DLL by copying it to the System32 folder, RegAsm cannot find it.
However, if you copy it to the SysWow64 folder and run RegAsm, you will see that RegAsm EXPORTS the file to System32 folder. This is obviously a bug of some kind. The solution is to copy the DLL files to both the System32 and SysWow64 folders.
RegASM.exe can be found in C:\Windows\Microsoft.NET\Framework\v4.0.30319
Gacutil.exe can be found in C:\Program Files (x86)\Microsoft SDKs\Windows\v8.1A\bin\NETFX 4.5.1 Tools
If the Microsoft SDKs folder is not found, you will have to install Windows 8.1 SDK, which has the Gacutil.exe for registering 32 bit COM DLLs. It can be downloaded from https://developer.microsoft.com/en-us/windows/downloads/sdk-archive.
Important: only install the .NET Framework 4.5.1. Software Development Kit when you are prompted to select the features you want to install.
Copy the DLL and TLB to Windows/System32 AND SysWOW64 folders. If the tlb does not exist, just copy the dll.
Open the Command Prompt as administrator.
Type regasm.exe mydll.dll /tlb:mydll.tlb /codebase. It should say that the type library was registered successfully. If the DLL does not install, try installing it using Regsvr32.exe. Certain dll’s like csguid.dll require the old installation process.
Type gacutil.exe /i mydll.dll, this installs the DLL to the GAC. You may have to type gacutil /i c:\windows\system32\mydll.dll if the file is not found. The GAC is the Global Assembly Cache and keeps track of all of the assemblies on the computer so that when they are called there is no conflict.