COM Interop Via Web

G

Guest

I have a basic web app that is using Word (I know, big no no) to fill out a
Word Template based on form input and save the resulting document to
SharePoint. When I'm running the application locally (logged onto Windows
Server) it works great. Remotely, it hangs when opening the Word application
instance. I assume I have some DCOM or other security issue. Any ideas on
where it may be?

Thanks!
Tyler Allbritton
 
M

Mark Rae

I have a basic web app that is using Word (I know, big no no)

Hmm - just to be clear, you already *know* that what you're doing is a "big
no no", and now you're wondering why it doesn't work...?
I assume I have some DCOM or other security issue.

Who knows - it could be any number of things...

The simple fact is that server-side Office automation is not supported by
Microsoft because it's not designed to work this way:
http://support.microsoft.com/default.aspx?scid=kb;EN-US;q257757#kb2

Use this instead: http://www.aspose.com/Products/Aspose.Words
 
G

Guest

Mark - Thanks for the comment.

If anyone is interested in an actual solution though, Word and other Office
apps need to run under normal user accounts as opposed to a built-in accounts
like LOCAL SERVICE. This is why it worked when I was logged in, but not
remotely. Microsoft outlines how to do this specifically for Office/COM here:
http://support.microsoft.com/default.aspx/kb/288367.

In my case I set the Idenity for Word to the new OfficeAutomationUser
account via DCOMCNFG. It works great!
 
M

Mark Rae

If anyone is interested in an actual solution though, Word and other
Office
apps need to run under normal user accounts as opposed to a built-in
accounts
like LOCAL SERVICE. This is why it worked when I was logged in, but not
remotely. Microsoft outlines how to do this specifically for Office/COM
here:
http://support.microsoft.com/default.aspx/kb/288367.

Sigh... Did you actually *read* that article...? Specifically, the bits
saying things like "We do not recommend or support...", "...risky and
unstable...", "stop responding (hang)", "...corrupt data...", "...crash the
calling process...", "...bring down your Web server...", "Office was not
designed, and is not safe, for unattended execution on a server. Developers
who use Office in this manner do so at their own risk."

Etc.
In my case I set the Idenity for Word to the new OfficeAutomationUser
account via DCOMCNFG. It works great!

Best of luck - you're really going to need 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

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,901
Latest member
Noble71S45

Latest Threads

Top