Simon Hartcher Simon Hartcher - 4 months ago 36
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


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