Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / October 2005

Tip: Looking for answers? Try searching our database.

How do you set up Word in a web application?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
aualias - 12 Oct 2005 19:30 GMT
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
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.