"Server execution failed" when trying to use COM

G

Guest

I am trying to load Microsoft Word and create a document in ASP.NET (C#). But the call to application creation 'Word._Application app = new Word.ApplicationClass();' takes quit a bit of time, and eventually "Server Execution Failed" page appears.

"Exception Details: System.Runtime.InteropServices.COMException: Server execution failed
...
[COMException (0x80080005): Server execution failed]"

The same call inside a WIndows Form succeeds. But for some reason, in ASP.NET it doesn't.

Quick search on the internet didn't reveal anything new. I would appriciate if anyone would throw some light on it.

TIA,
Ravi
 
S

S. Justin Gengo

Ravi,

That's because a call like that is creating the word document on the server
not the client. When dealing with web applications you have to remember that
the code you are writing is being executed on the server. All that the
client receives is the html result of that code execution.

You can not open a word document on a client without first downloading an
ActiveX object or something similar to the client.

--
Sincerely,

S. Justin Gengo, MCP
Web Developer / Programmer

www.aboutfortunate.com

"Out of chaos comes order."
Nietzsche
Ravi J said:
I am trying to load Microsoft Word and create a document in ASP.NET (C#).
But the call to application creation 'Word._Application app = new
Word.ApplicationClass();' takes quit a bit of time, and eventually "Server
Execution Failed" page appears.
"Exception Details: System.Runtime.InteropServices.COMException: Server execution failed
..
[COMException (0x80080005): Server execution failed]"

The same call inside a WIndows Form succeeds. But for some reason, in ASP.NET it doesn't.

Quick search on the internet didn't reveal anything new. I would
appriciate if anyone would throw some light on it.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top