Automating MS Word w/ ASP.NET
Messages   Related Types
This message was discovered on ASPFriends.com 'ngfx-msoffice' list.


Feduke Cntr Charles R
I've ran into a bit of a problem. We have a web application written in
ASP.NET that maps data from a DataSet to an MS Word document, fills the
document out, saves the document on the server, then zips up the directory
where it was saved and allows the user to download it. The latter part of
this process is working, its just getting the ASP.NET user the proper
permissions to run MS Word on the server. I end up with:

"Access is denied" on

protected Word.ApplicationClass WordApp = new Word.ApplicationClass();

I've tried the standard things: the userName under processModel in the
machine.config has been set to "SYSTEM", the ASPNET user has been given full
access to the directory where the MS Word document resides and where it will
be output, the ASPNET user has been given full access to the Microsoft
Office directory, and as a last resort, the ASPNET user was added to the
Administrators group of the machine.

I am aware of the performance implications of automating MS Word on a server
running IIS.

Any ideas?

— Chuck
Reply to this message...
 
    
Dody Gunawinata
I've ran into a bit of a problem. We have a web application written in
ASP.NET that maps data from a DataSet to an MS Word document, fills the
document out, saves the document on the server, then zips up the directory
where it was saved and allows the user to download it. The latter part
of
this process is working, its just getting the ASP.NET user the proper
permissions to run MS Word on the server. I end up with:
=20
"Access is denied" on
=20
protected Word.ApplicationClass WordApp =3D new Word.ApplicationClass();
=20
I've tried the standard things: the userName under processModel in the
machine.config has been set to "SYSTEM", the ASPNET user has been given
full
access to the directory where the MS Word document resides and where it
will
be output, the ASPNET user has been given full access to the Microsoft
Office directory, and as a last resort, the ASPNET user was added to the
Administrators group of the machine.
=20
I am aware of the performance implications of automating MS Word on a server
running IIS.
=20
Any ideas?
=20
=E2=80=94 Chuck
Reply to this message...
 
    
Scott Hutchinson
I've ran into a bit of a problem. We have a web application written in
ASP.NET that maps data from a DataSet to an MS Word document, fills the
document out, saves the document on the server, then zips up the directory
where it was saved and allows the user to download it. The latter part
of
this process is working, its just getting the ASP.NET user the proper
permissions to run MS Word on the server. I end up with:

"Access is denied" on

protected Word.ApplicationClass WordApp = new Word.ApplicationClass();

I've tried the standard things: the userName under processModel in the
machine.config has been set to "SYSTEM", the ASPNET user has been given
full
access to the directory where the MS Word document resides and where it
will
be output, the ASPNET user has been given full access to the Microsoft
Office directory, and as a last resort, the ASPNET user was added to the
Administrators group of the machine.

I am aware of the performance implications of automating MS Word on a server
running IIS.

Any ideas?

— Chuck
Reply to this message...
 
    
Scott Hutchinson
Problem solved:

By searching HKCR for 00020906-0000-0000-C000-000000000046, I figured out
that Word is incorrectly (IMO) registered under the name 'Microsoft
Document' instead of 'Microsoft Word document'. Once I granted launch
permissions on 'Microsoft Document' to the ASPNET user, ASP .NET was able
to run this line of code without an access denied error:

Dim appWord As New Word.Application()

Scott Hutchinson
Click here to reveal e-mail address
(to contact me, remove all dots left of @)

"Scott Hutchinson" <Click here to reveal e-mail address> wrote in message
news:686431@ngfx-msoffice...
[Original message clipped]

Reply to this message...
 
    
Ramachandran Veluthattil
I am using Microsoft Word 2000 on Windows 2000 with Service Pack 3 installed on it. When i use the dcomcnfg to configure dcom i dont see the option of Microsoft Document. I have only Microsoft Document Explorer. I am able to configure Microsoft Word Document but then i get the "access is denied" error message. Can you help out ? Is Microsoft Document available on advanced versions of Office only ?

--------------------------------
From: Ramachandran Veluthattil
Reply to this message...
 
 
System.Data.DataSet
System.EventHandler




Ad
MBR BootFX
Best-of-breed application framework for .NET projects, developed by Matthew Baxter-Reynolds and MBR IT
 
 Copyright © Matthew Baxter-Reynolds 2001-2008. '.NET 247 Software Development Services' is a trading style of MBR IT Solutions Ltd.
Contact Us - Terms of Use - Privacy Policy - www.dotnet247.com