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
aualias - 12 Oct 2005 20:07 GMT
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
>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,
[quoted text clipped - 22 lines]
>
> David