Hello.
I have a question for you.
I created a COM object. Before I compiled it on my computer, I checked the option "Register for COM interop" to be "True". After the compilation I register the dll file using "regasm MyDll.dll"
And now when I use it as a COM object in my computer, it works fine.
But on the server it's not the same.
I uploaded the dll and tlb files to the server. Then I executed the command "regasm MyDll.dll".
Then I tried to use the object I got the error "error '80070002' ". It means that the file not found. I tried to copy the dll and tlb files to c:\windows\system32 and also to c:\windows , and it didn't solve the problem.
Does anyone has an idea what to do Or how should I install the com object properly
(I'm so confused with all the registration commands: sn.exe, al.exe, regasm.exe)
Thank you very much !
I have a question for you.
I created a COM object. Before I compiled it on my computer, I checked the option "Register for COM interop" to be "True". After the compilation I register the dll file using "regasm MyDll.dll"
And now when I use it as a COM object in my computer, it works fine.
But on the server it's not the same.
I uploaded the dll and tlb files to the server. Then I executed the command "regasm MyDll.dll".
Then I tried to use the object I got the error "error '80070002' ". It means that the file not found. I tried to copy the dll and tlb files to c:\windows\system32 and also to c:\windows , and it didn't solve the problem.
Does anyone has an idea what to do Or how should I install the com object properly
(I'm so confused with all the registration commands: sn.exe, al.exe, regasm.exe)
Thank you very much !

Erorr in using an object
José Valim
When you call regasm on the server machine are you sure MyDll.dll is on the path
For general information on exposing managed components to COM see this page: http://msdn.microsoft.com/library/default.asp url=/library/en-us/cpguide/html/cpconexposingnetframeworkcomponentstocom.asp
Note that regasm is intended to be used mainly in development scenarios and that for deployment we recommend using the regasm /regfile:[outfile] option to create a regfile and add it to the registry at installation time. If you do this and place the assembly in the gac the native code should be able to find it.
c:\windows and c:\windows\system32 are not on the search path for managed assemby loading so that won't help, but placing them in the gac should allow them to be loaded at runtime (the dll will still need to be on the path if you decide to use regasm on the server).