Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > asp.net and creating word docs on the server

Reply
Thread Tools

asp.net and creating word docs on the server

 
 
matthew rutherford via .NET 247
Guest
Posts: n/a
 
      04-28-2004
When I use the word automation object (registered word10 andusing the namespace in the .cs file)
I get 'access denied' error when trying to run the thing on mylocal pc. I am using the ASPNET user.

I have heard this is due to the ASPNET user never having openedword before and it is subsequently prompted by word for ausername and password dialog, which obviously ASPNET canthandle. I can actually hear the system beep as the dialog iscalled in the background when testing the ASPX page on mylocalhost but after this i guess it just times out, returningthe access denied error.

I have used dcomcnfg.exe and ASPNET has full access to the wordapplication.

What is the solution?

I have tried changing the user context in web.config but to noavail ie still the access denied message.

Somebody must have come across a solution to this.



--------------------------------
From: matthew rutherford

-----------------------
Posted by a user from .NET 247 (http://www.dotnet247.com/)

<Id>8sgLMDF1YU2eZIYz9Avm6A==</Id>
 
Reply With Quote
 
 
 
 
Steve C. Orr [MVP, MCSD]
Guest
Posts: n/a
 
      04-28-2004
Using COM automation to interact with Word on the server is not a very good
idea.
This article covers various options for generating Word & Excel documents:
http://www.aspnetpro.com/NewsletterA...200309so_l.asp

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://Steve.Orr.net


"matthew rutherford via .NET 247" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
When I use the word automation object (registered word10 and using the
namespace in the .cs file)
I get 'access denied' error when trying to run the thing on my local pc. I
am using the ASPNET user.

I have heard this is due to the ASPNET user never having opened word before
and it is subsequently prompted by word for a username and password dialog,
which obviously ASPNET cant handle. I can actually hear the system beep as
the dialog is called in the background when testing the ASPX page on my
localhost but after this i guess it just times out, returning the access
denied error.

I have used dcomcnfg.exe and ASPNET has full access to the word application.

What is the solution?

I have tried changing the user context in web.config but to no avail ie
still the access denied message.

Somebody must have come across a solution to this.



--------------------------------
From: matthew rutherford

-----------------------
Posted by a user from .NET 247 (http://www.dotnet247.com/)

<Id>8sgLMDF1YU2eZIYz9Avm6A==</Id>


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Library to parse MS word docs & convert Word docs to PDF KYG C++ 2 08-18-2008 07:08 PM
Do Printed Word Docs Look Any Differently From PDF Docs? Martin Computer Support 5 09-20-2006 11:06 PM
Word file not opening from Adm -My recent docs but opening from file menu of Word Thaqalain Computer Support 0 06-30-2005 02:20 AM
Error creating big Word docs in asp.net =?Utf-8?B?TWVrZW4=?= ASP .Net 1 06-08-2005 06:08 AM
Creating Word docs with previous text not moving Martin Computer Support 9 05-11-2005 04:53 AM



Advertisments