Consume .NET assembly from classic ASP page

I have an old .net 2005 website that has several asp pages and a problem with an object link to a .net dll. The maintenance task was handed over to me, and the original developer was not found anywhere :( I started with .Net already, so I really can not handle the processing of this damn problem.

In the arrow below, I collect "(0x80131500) The object reference is not installed in the object instance."

Set objCommon = Server.CreateObject("Wrapper.CommonFunctions")
  Dim machineBuilding
--->>>  If objCommon.IsMachineAccount(strLogin, machineBuilding) Then

I have already completed the following steps:

  • regasm / tbl / codebase mycomdll.dll
  • gacutil / i mycomdll.dll
  • copy the file mycomdll.dll to the System32 directory
  • From the console, execute issreset
  • If your dll is created in the framework 2.0, create the file "dllhost.exe.config" in the system32 directory and put this:

<?xml version="1.0"?> <configuration> <startup> <supportedRuntime version="v2.0.50727"/> <requiredRuntime version="v2.0.50727"/> </startup> </configuration>

6.- Restart IIS with issreset

:

  • . \application\assembly information . " ". . . " Com Comop"
  • .
  • , IUSR .
  • IIS iisreset, .

. , ? !

+3
3

, , .

0

HRESULT . " " 0x80131500, 13 , . 1500 .

, , . , , . NullReferenceException, . , . , IIS, , Tools + Attach to Process. - , .

, MachineBuilding NRE. .

Btw: . .

+2

, , . , , regasm .

regasm mycomdll.dll /tlb :mycomdll.tlb

tbl tlb - , ?

, , .NET, , .

, ASP- ...

set obj = server.CreateObject("mycomdll.myclass")
...
call obj.method(false)
...
myvar = obj.method2(param1, param2, param3)
0

Source: https://habr.com/ru/post/1759308/


All Articles