473,396 Members | 1,767 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

COM component in web applications



Is there any issue in using COM component in web applications. The
problem I'm facing are

1. Though the dll is using non-static member variables which are being
instantiated on each call, Whenever I'm calling the (.aspx) pages using
the dll more than once simultaneously, both results in garbage. When
called once it is perfect in result.
2. The memory is not being released in web application of the dll even
after finishing properly with result. Again it is perfect when using in
non-web application (say VB exe application). Actually, the dll is using
PowerPoint classes and opening a ppt file. And the PowerPoint is
releasing memory long after.
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 16 '05 #1
1 1177
Amitava,

Yes, there is. You have to set the ASPCompat attribute on your pages
that use the COM component to true. This takes the thread that the page is
processed on, and creates a COM apartment for it. This is much less
performant than a solutuion without COM interop in it.

When you are using your powerpoint object, you have to be sure to call
the static ReleaseComObject method on the Marshal class, passing the COM
object you are using. You have to be careful when using the COM object,
because using properties that expose objects will leave references lying
around. For example, in Excel, if you did this in .NET (this is
psuedo-code):

Excel.Application app = new Excel.Application();
app.ActiveWorkbook.Worksheets.Cells(1, 1).Value = 4;

In the above example, there are five COM objects that are being used,
but never released. In this case, you would have to make sure that you
assign each property retrieval to a variable, and then pass it to the static
ReleaseComObject to make sure that it is released. This is especially true
for Office applications, since each object seems to have a reference to the
main Application object, and if one of those objects hangs around, the
Application instance hangs around, even if Quit is called on it.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Amitava Sengupta" <it********@rediffmail.com> wrote in message
news:u6**************@TK2MSFTNGP11.phx.gbl...


Is there any issue in using COM component in web applications. The
problem I'm facing are

1. Though the dll is using non-static member variables which are being
instantiated on each call, Whenever I'm calling the (.aspx) pages using
the dll more than once simultaneously, both results in garbage. When
called once it is perfect in result.
2. The memory is not being released in web application of the dll even
after finishing properly with result. Again it is perfect when using in
non-web application (say VB exe application). Actually, the dll is using
PowerPoint classes and opening a ppt file. And the PowerPoint is
releasing memory long after.
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Nov 16 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Nunya D. Bidness | last post by:
If anyone is interested in testing these components goto http://www.vibrantinnovations.com/vibrantlayouttools.asp The Vibrant Layout Tools ActiveX component is a suite of tools that allow...
8
by: Carel Lotz | last post by:
H We have ported our VB 6 application into VB .NET but are still integrating with a few COM + applications written in VB6 running on our application server (Win 2000 Server). We have the proxies...
5
by: David | last post by:
Hi everyone, I have a ActiveX EXE component written in VB6. This ActiveX EXE exposes various public methods that can be called by several other independent Windows EXE applications (also written...
0
by: Steve Jorgensen | last post by:
I'm posting a link here because I'm hoping it will be as enlightening to other Access developers as it has been to me. ...
1
by: Gary Townsend | last post by:
Server OS: Windows 2000 Server SP4 IIS: 5.0 Component Language: Visual Basic 6.0 Hey folks quick question hopefully be a quick answer too... I built an ActiveX DLL Component to manipulate file...
9
by: Roman | last post by:
Hello I have a component built in VB.2003. It has the following property: Public Shared mCONN As SqlConnection Public Property Connection() As SqlConnection Get Return mCONN End Get...
122
by: Edward Diener No Spam | last post by:
The definition of a component model I use below is a class which allows properties, methods, and events in a structured way which can be recognized, usually through some form of introspection...
0
by: fiona | last post by:
Yucca Valley, CA, - October 2007: Catalyst Development Corporation, publisher of SocketTools, SocketWrench and LogicGem, today announced the release of Catalyst File Transfer .NET V5.0. For...
0
by: fiona | last post by:
FOR IMMEDIATE RELEASE Catalyst releases Catalyst Internet Mail .NET V5.0 Message Delivery and Management .NET Component Yucca Valley, CA, - November 2007: Catalyst Development Corporation,...
0
by: bharathreddy | last post by:
In .Net COM+ components are referred to as serviced components, Namespace: System.EnterpriseServices; Advantage of Serviced Components: object pooling, database connection pooling,
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.