473,382 Members | 1,353 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

asp.net and creating word docs on the server

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>
Nov 18 '05 #1
1 1384
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" <an*******@dotnet247.com> wrote in message
news:uD**************@TK2MSFTNGP12.phx.gbl...
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>
Nov 18 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Erik Ronne | last post by:
Hello Gurus I have an intranet web page with links to all kinds of Microsoft Word document that we use at my work, so my co-works can go to the web page when they need a special document....
19
by: Steve | last post by:
Can anyone point me to a primer for creating OCX controls in VB .net? In particular, I want to access a web service in a VB6 application (not an easy thing to do). So, if I can write an ActiveX...
6
by: Jason Steeves | last post by:
I am hoping someone can tell me how, or point me in the right direction for the following problem. I need to have word open a specified file, .mht, as a plug-in inside of IE so that I can edit...
7
by: mike | last post by:
Hi, I am having difficulty in creating a thread using pthread_create. It seems that pthread_create does not execute 'program', and returns -1; I have checked the API but I am not sure why this...
2
by: KnotKnormal | last post by:
I would like to dynamically load a HTML page (or a Word document), which is embedded in a table when the user clicks on a hyperlink to go from HTML page one to HTML page two. For example, I would...
9
by: Mike Fellows | last post by:
I'm trying to create a server side application (through a web front end) that allows me to print specific documents from the server im using: Dim wordapp = New Word.Application and have...
4
by: Thomas Scheiderich | last post by:
I can't seem to open a word document from any of my browsers except the one on my web server. Here is the .aspx file: ***************************************************************** <%@...
22
by: liya.tansky | last post by:
Hello, I'm developing an intranet (win XP, .NET 2, Visual Studio 2005, Microsoft.Office.Interop.Word.dll in references) and needed to implement find-replace in word doc before sending letter and...
0
by: dotNetDummi | last post by:
Hi experts, I have a task to print some data into a word document .I need to set the word document to readOnly. It's working but user still can edit. Is there any thing I can do whereby user...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.