Server.CreateObject Failed in Classic ASP

37,612

Solution 1

You have to register your DLL first, and if the problem persists, do this:

  • Locate and then click the following registry subkey: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet Explorer\MAIN\ FeatureControl\FEATURE_IGNORE_ZONES_INITIALIZATION_FAILURE_KB945701
  • Note If the FEATURE_IGNORE_ZONES_INITIALIZATION_FAILURE_KB945701 subkey does not exist, you must manually create it. If you're using a 64 bit OS, you may need to use HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Internet Explorer\MAIN\ FeatureControl\FEATURE_IGNORE_ZONES_INITIALIZATION_FAILURE_KB945701 instead
  • Right-click FEATURE_IGNORE_ZONES_INITIALIZATION_FAILURE_KB945701, point to New, and then click DWORD Value
  • Type w3wp.exe to name the new registry entry, and then press ENTER.
  • Right-click w3wp.exe, and then click Modify.
  • In the Value data box, type 1, and then click OK.

After setting this registry key, a simple app pool restart will apply the change. No longer will your .NET COM components randomly stop working with no real solution except shuffling application pools!

Solution 2

Did you register your dll with regasm.exe on your server ?

http://msdn.microsoft.com/en-us/library/tzat5yw6%28VS.71%29.aspx

Solution 3

I just had this error appear on a site that had been running perfectly for years. It seems a DLL had somehow become unregistered. It was an unmanaged DLL so I was able to re-register it using regsvr32:

%SystemRoot%\Microsoft.NET\Framework\v2.0.50727\regsvr32 "C:\path\to\myAssembly.dll"

(Also see the difference between regasm and regsvr32)

Solution 4

I had this problem. When you register .NET COM modules you must use regasm and if you want to call them from applications like IIS you must use /codebase with this command:

regasm yourfilename.dll /codebase
Share:
37,612
Navaneethan
Author by

Navaneethan

Working as Architect - Technology in Cognizant in Chennai@navanneethan

Updated on April 27, 2020

Comments

  • Navaneethan
    Navaneethan about 4 years

    I created the ASP.NET dll with one function that i need to use in Classic ASP page.

    I used the below code for creating object in classic asp page

    set PeopleSoft = server.createobject("OPS.PSL")
    

    I am getting the below error while executing

    Server object error 'ASP 0177 : 80070002' 
    
    Server.CreateObject Failed 
    

    I searched in stackoverflow i saw some solution. By enabling the "Make assembly COM-visible" and "Register for COM interop".

    Please Help me to come out from this issue