ASP and COM

  • Thread starter Thread starter John Devlon
  • Start date Start date
J

John Devlon

Hi,

With this mail I would like to ask some professional expertise.

I've created an ASP form in vb.net which uses an external application.
Everything works fine. However, Currently, Only 1 user at a time uses the
webpage.

What I would like to know:
If, for example, 25 users at one time, are using the same webform,
triggering the same application (Word, Excell or something else for
example), what would happen ? Is every request automaticly in a que and
waits its turn or does an error occure? Let's assume that every action to be
executed by the external application takes 1 second. Or do I have to create
some sort of applications which holds a request que?

I know that using external applications is not the right approach but in
this case I do not have a work arround.

Looking forward to you responses

Thanks

John
 
I've created an ASP form

Presumably you mean an ASP.NET form...?
If, for example, 25 users at one time, are using the same webform,
triggering the same application (Word, Excel or something else for
example), what would happen?

There's a strong possibility that your web app will crash, and may even hang
your web server...

Office is simply not designed to be used via server-side Automation -
Microsoft do not recommend it because it is so risky and unstable, and will
not support any solution which tries to do this...
http://support.microsoft.com/default.aspx?scid=kb;EN-US;q257757#kb2
http://support.microsoft.com/default.aspx/kb/288367
I know that using external applications is not the right approach but in
this case I do not have a work arround.

http://www.aspose.com/Products/Default.aspx
 
Thanx Mark,

Yes, ASP.NET, that's what I meant.

An Office product was just an example. But then the same thing will happen
with other applications I asume.
I hoped that the os would que the requests.

But, again, thanx for the intel.

John
 
No, other applications don't have to crash. It depends on what they are
doing and how they are built. Can 25 instances of them run in the same time?

--
Eliyahu Goldin,
Software Developer
Microsoft MVP [ASP.NET]
http://msmvps.com/blogs/egoldin
http://usableasp.net


John Devlon said:
Thanx Mark,

Yes, ASP.NET, that's what I meant.

An Office product was just an example. But then the same thing will happen
with other applications I asume.
I hoped that the os would que the requests.

But, again, thanx for the intel.

John
 
But then the same thing will happen with other applications I asume.

Impossible to generalise...

Office doesn't work in this environment principally because it's
single-threaded and designed to interact with the desktop i.e. pop message
boxes, etc...
 
Webform using Office bits to produce something?

If so, it could cause problems, especially if you are actually spinning up
the application on the server, rather than using the DLLs from Office. I am
not sure whether or not it would crash, however. This would depend on what
you are doing and how long the process takes to complete. And, probably most
importantly, whether or not you are locking data in the Office application.

If you are not locking data in the database, it is unlikely, with 25 users,
that two will hit the application instance at the precise same moment, so
you might have no problem. This is, of course, assuming you are only using
the application to produce a result you do not feel you could produce with
other bits. If you are somehow stacking 25 users on a single thread, you
will blow up. I can pretty much guarantee that.

So far I have focused on Office, but it appears you also have other
applications in mind. And, they too may cause problems, but it really
depends on how they are instantiated. Anything that only allows a single
instance could be a blocking point if it does not contain some form of
standard in and standard out for you to use it like a server/service. With
some applications, however, you might be able to spin up 25 instances of the
application without a problem and none of the clients will block another
client. The big issue here is how much memory the application takes when it
is in memory and how long it takes to spin up.

Without having a specific, this is about the best answer I can give you.

--
Gregory A. Beamer
MVP, MCP: +I, SE, SD, DBA

*************************************************
| Think outside the box!
|
*************************************************
 
An Office product was just an example. But then the same thing will happen
with other applications I asume.
I hoped that the os would que the requests.

As long as the object was designed for this purpose in mind it'll be ok.
The main difference with Office apps is that they need to interact with the
desktop and are not designed to be automated from the web. Most COM
components will work fine via asp as long as they don't do anything that
interacts with the desktop, or puts locks on common resources etc.

But as has been said, "it depends", you can't generalise, but COM as a
technology is perfectly suitable for automation via asp or asp.net, however
what your COM object does may reduce it's suitability for automation.
 
It's my opinion that using external applications, is not the best solution
and never to be used in a server applicication...Using components gets
better results...

However, some components are so expensive... It will make your head spin....
In some company's is buying a component up to 25.000 $ not an option ....

John
 
Back
Top