Strange Problem!!!

  • Thread starter Thread starter Dinesh Upare
  • Start date Start date
D

Dinesh Upare

I am facing a strange problem.

I am using a existing Vb6.0 MTS component,hence i have created a service
component in C# and using wrapper of MTS component.
I created 2 projects and using my service component , they are running fine.
but now if i try to create a new project and try to use this component I am
getting
following exception:-
"Class does not support automation or an extended interface".

but my other two projects are running without any problem.
When I am using the same component in other projects,why it is throwing this
exception.

Is there any restriction of using mts component in .net.
Do i need to configure my service component.

The reason I am using this MTS component by creating a service component,is
because the component
is not working properly by using it directly.

Please help me out to solve this problem.

Thanks and Regards

Dinesh
 
Dinesh Hi,

VB6 Dll is STA COM component that got limitation when running from
ASP.NET application (Run as multi-threaded). to use STA COM you must add
aspcompat=true attribute to your page
(http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguid
e/html/cpconcomcomponentcompatibility.asp). note that using this
attribute your page wont run in multi-threaded mode.

you dont need to create your own wrapper you can use tlbImp.exe to
create wrapper assembly for you. then reference the wrapper assembly
from your application.

Try it and let me know.

Natty Gur, CTO
Dao2Com Ltd.
34th Elkalay st. Raanana
Israel , 43000
Phone Numbers:
Office: +972-(0)9-7740261
Fax: +972-(0)9-7740261
Mobile: +972-(0)58-888377
 
Back
Top