Simon Hartcher Simon Hartcher - 1 year ago 79
C# Question

Accessing a .NET Assembly from classic ASP

I have been trying to access a .NET Assembly that I have created in classic ASP using

dim foo
set foo = Server.CreateObject("TestAssembly.MyClass")

The problem is I'm getting an error:

Server object error 'ASP 0177 : 800401f3'

Server.CreateObject Failed

/test.asp, line 4

Invalid class string

I have registered the assembly (TestAssembly.dll) using gacutil and regasm as instructed in the article: Replacing Old Classic ASP COM Components with .NET Assemblies which I referenced from another question. It supplies two methods in which to install the assembly and I have tried both, but to no avail.

Getting this working would be great because it would allow me to gradually migrate a classic ASP site to .NET

Answer Source

Another thing to check: make sure your .Net assembly is set to be COM Visible.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download