2
votes

I need inputs on:

I've created a DLL file using .NET. This DLL file is intended to use for ASP Classic and ASP.NET applications. I've created a setup and deployment package, and I added the solution's output to GAC folder. After that, creating an instance in ASP Classic didn't work. I am not sure, if it can load from the GAC folder.

Alternatively, I converted this .dll as COM by adding inheriting from ServiceComponent and other necessary changes, but while registering on client as COM, it throws an error:

one or more files do not contain components or type libraries

What am I missing? What shall I do so that the DLL file can be used by ASP Classic and ASP.NET?

1

1 Answers

1
votes

Steps...

Visual studio: start a new class library
Properties > Application : make assembly COM-Visible
Properties > Build : Register for COM interop
Properties > Signing: Sign the assembly

Then build the project.

Start the Visual Studio command prompt as administrator (look in the OS menu for this one):

cd <path to your dll>
RegAsm /register <name of your dll>.dll /tlb:<name of your dll>.tlb
gacutil -i <name of your dll>.dll
IISreset (not a bad idea to reset after these stepts in your development environment because the dll gets cached)

That should do the trick...

One last word of advice... Build a new project from scratch (just an Hello World) and get the above steps in your DNA. This is one of those areas where ... it works - noop, it doesn't - and now it works again plays a big role ;-)