|
FRIDAY, APRIL 06, 2007
Registering .NET created COM objects for ASP
You cannot use regsvr32.exe to register a COM object that was created using .NET (It is possible to create COM objects in .NET, btw).
I do not know what happens if you try; I skipped that blunder. You use the regasm.exe program, which mimics certain required COM functionality and registers the dll file. However, if you just run regasm.exe ASPemail.dll it will say that it worked, but when you try and actually instantiate it in ASP, it will fail: Server object error 'ASP 0177:80070002' Server.CreateObject Failed /<path>/<aspfile.asp><line #> The call to Server.CreateObject failed. You are missing a critical switch, codebase. I don't know exactly what it does, but it fixes the problem. Just run: regasm.exe ASPemail.dll /codebase and try it again. This assumes that you are calling the correct ProgID, you can set that as an attribute on your class, or you can just let the compiler set it for you (it will be Namespace.AssemblyName).
Posted by Chet at 7:00 PM
Comments
Register on GAC
gacutil /if AssemblyName.dll Register as COM Server regasm AssemblyName.dll hope this helps regards, André Luiz Sobreiro
Posted by André Luiz Sobreiro at 1:07 PM on Mon, Oct 1, 2007
Post a Comment
Feel Free To Share Your Thoughts
You can use [b], [u], [i], and [url] |