Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / Distributed Applications / February 2004

Tip: Looking for answers? Try searching our database.

from COM to .NET

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
jano - 08 Feb 2004 22:16 GMT
Hi all

My company are slowly migrating from vb6/com environment to a .net/web service environment. At the moment we have a financial system running on our intranet that allows user to request and retrieve reports- we have a .Net web service that retrieves these requests and passes them on to a COM dll, which queries the database and generates the reports using Crystal.
After some testing, we've found that when there's more than one person running reports, the system crashes. After some research i've found out that calling a COM component with a .net web service can have threading issues. The COM component works fine when called in serial though

The obvious solution is to rewrite the component in .NET as this would work perfectly with the .NET web service- but time is an issue. It took months to create the exisiting component and we want to continue to utilize it if we can

Does anyone have any suggestions?

Thanks a lot in advance

Neile
chandresh - 10 Feb 2004 00:37 GMT
>-----Original Message-----
>Hi all,
>
>My company are slowly migrating from vb6/com environment to a .net/web service environment. At the moment we have
a financial system running on our intranet that allows
user to request and retrieve reports- we have a .Net web
service that retrieves these requests and passes them on
to a COM dll, which queries the database and generates
the reports using Crystal.
>After some testing, we've found that when there's more than one person running reports, the system crashes.
After some research i've found out that calling a COM
component with a .net web service can have threading
issues. The COM component works fine when called in
serial though.

>The obvious solution is to rewrite the component in .NET as this would work perfectly with the .NET web service-
but time is an issue. It took months to create the
exisiting component and we want to continue to utilize it
if we can.

>Does anyone have any suggestions?
>
[quoted text clipped - 3 lines]
>.
>****************************************
I would suggest you try this first.

Type Library Importer
Use Type Library Importer (TlbImp.exe). TlbImp.exe is a
command-line tool that converts COM type library to
assembly containing metadata.

TypeLibConverter Class
The TypeLibConverter Class of the
System.Runtime.InteropServices namespace provides methods
to convert a type library to an assembly. This API can
convert in-memory Type library and produces output as
TlbImp.exe
Jim - 11 Feb 2004 04:13 GMT
The first thing that comes to mind is to change the apartment model of the
COM component to be a single threaded apartment model rather than free
threaded. I've never used VB to create a COM component though, so I dunno if
this is even possible.

The other thing you could do, is to create a .NET wrapper class around the
COM component that performs the thread synchronization. Then, call the .NET
wrapper in your web application. This has the added bonus of allowing you to
incrementally replace the COM method implementations with .NET
implementations without changing the interface.

Hope this helps!

-Jim

> Hi all,
>
> My company are slowly migrating from vb6/com environment to a .net/web service environment. At the moment we have a financial system running on our
intranet that allows user to request and retrieve reports- we have a .Net
web service that retrieves these requests and passes them on to a COM dll,
which queries the database and generates the reports using Crystal.
> After some testing, we've found that when there's more than one person running reports, the system crashes. After some research i've found out that
calling a COM component with a .net web service can have threading issues.
The COM component works fine when called in serial though.

> The obvious solution is to rewrite the component in .NET as this would work perfectly with the .NET web service- but time is an issue. It took
months to create the exisiting component and we want to continue to utilize
it if we can.

> Does anyone have any suggestions?
>
> Thanks a lot in advance.
>
> Neile
Dilip Krishnan - 11 Feb 2004 14:55 GMT
Jano,
   Is the com component global multiuse. You could try that if you have
access to the component. If not you may have to go with a .net wrapper
over the com object
Regards
Dilip

> Hi all,
>
[quoted text clipped - 8 lines]
>
> Neile

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.