I moved some old code (WS 2008) to a new server (WS2016). The new server gives HTTP 500 errors and in the C:\inetpub\logs\LogFiles\W3SVCx log shows "Server.CreateObject_Failed 4000" despite the fact that no DLL is (intentionally) being referenced. Another site on the same server (different port) works fine.
I compared website and app-pool settings on both servers and on both sites. I have verified that a simple HTM works. I am testing by using IIS (v10) to go to 'Content View' and right click to browse ASP.
http://localhost:3000/hello.asp
I tried a few registry hacks as suggested on similar SO questions.
My code (hello.asp) has two words
hello world
I expect to get back just those two words but instead get "HTTP 500 Internal Server Error".
Any suggestions are appreciated.
Updates:
I created a new site from scratch with just the hello.asp and that worked fine. I slowly started pulling over one file at a time from the the failed site to the working site. When I pulled over global.asa, it blew up (http 500). I am not that familiar with the file, but researched it and see that it gets invoked at start up. Looking at the contents of mine, I saw what looked like references to a DLL. I found and copied it from the old server to the new server (in the SysWow64 folder) and then used CMD as Admin to register it using REGSVR32. The register worked, but I still get 500 (after site restart, app-pool recycle, and iisreset)
Using @Lankymart 's suggestion, I was able to get the following error to display
Microsoft VBScript runtime error '800a01ad'
ActiveX component can't create object
/LM/W3SVC/5/ROOT/global.asa, line 13
which points to a line of code in global.asa that says
set objServiceMgr = server.CreateObject("XMLMGR.FedXReqMgr")
XMLMGR is the DLL that I registered (to no avail).
This is in fact an indirect duplicate of Error ASP 0177: 8007007e Server.CreateObject fails for COM DLL
The trick was finding the real error using the tips at Detailed 500 error message, ASP + IIS 7.5
The process also taught me that global.asa is invoked when the site is accessed even if the ASP you are pointing to is a simple helloworld.asp with no code. Since the global.asa (in my case) is referencing a DLL, that DLL has to be dealt with (properly registered) before any other ASPs in the same folder can be invoked.
For my app, I also add to set the App Pool to Enable 32-Bit Applications (Classic ASP and COM DLL Does not work in Server 2008 R2 (Microsoft VBScript runtime error '800a01ad' ActiveX component can't create object ). Only then could I display my simple ASP.
Thanks for everyone's help!