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
Did you register your dll with regasm.exe on your server ?
http://msdn.microsoft.com/en-us/library/tzat5yw6%28VS.71%29.aspx
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:
There is another reason you might get the error "Server.CreateObject Failed". A COM Visible DLL does not behave the same as a regular .NET DLL when it is being loaded by COM. You can't expect it to load other DLLs that are sitting in the same directory as your DLL, or downloaded through the Nuget package manager. If you want to load other DLLs you have to register them in the global assembly cache (GAC).
see: https://stackoverflow.com/a/23902131/2616170
If the assembly doesn't have a strong name then you won't be able to register it in the GAC.
Run this from the command prompt (replace myassembly.dll with your assembly path):
You have to register your DLL first, and if the problem persists, do this:
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!
I faced a similar issue and after much research i found the solution ,check if its working for you. Remote scripting causes tons of errors with different IE versions. If your are passing control from one page to another and creating a new object from there you will get this kind of unable to create object error.
Example:
It seems like the remoteScripting object is not getting initiated . As function1call() calls frmPost.submit().
If you combine these 2 functions it will start to work. I.E