How do you set up Word in a web application?

A

aualias

I have a dll that I am using in a web application.
The code in the dll works correctly when used in a WinForms application, but
fails on the web server.
I am using IIS 6.0, Windows Server 2003.

The only error message I get is "Command failed". I suspect that the
application might not be set up correctly in DCOM Config, although I tried
to give NETWORK SERVICE all the permissions it needs.

Here is the code...
private Word.Application _app = null;

_app = new Word.ApplicationClass(); // _app seems ok here

// exception here, the message is "Command failed"
doc = _app.Documents.Add(
ref oPath,
ref oMissing,
ref oDocType,
ref oVisible);

How does one configure Word to use in a web application?

Thanks.

David
 
A

aualias

I just got this to work using impersonation in the web.config file.

However...

Is there a correct way to set this up, if so what are the steps?
Is impersonation the only way to get this to work? I could not get Word to
run under NETWORK SERVICE.
Can someone explain how security works on this?

Thanks.

David
 

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