473,320 Members | 1,845 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,320 software developers and data experts.

Access is denied - web application in csharp

Hi all,

some strange things are going on.

I have a c# project to automate word written under VS.NET with Office
XP PIAs. It is a web application project using ASP.NET, programming language
is c#.

Office Version 2002 (Microsoft Word 10.0 Object Library version 8.2).
All works fine.

I switched me local machine and also the environment. The same project don't
work on with VS.NET 2003. Googeling helps, in VS.NET 2003 I must remove
"using Word = Microsoft.Office.Interop.Word;". I was wondering that I also
have to change some code, e.g.

oTable.Columns[1] is now oTable.Columns.Item(1)
oDoc.Bookmarks.get_Item is now oDoc.Bookmarks.Item
and so on ...

Not nice to change exist code, but ok. After changing the project, it
compiled without an error. Now i come to the sticky thing! Requesting the
page caused an exception. Access denied.

Source Error points to the following line (Full stack trace can you find at
the end):
Line 26: oWord = new Word.Application();

I have tried the suggestion from the error page (grant asp.net write access,
....) without any luck. I have also tried it with the administrator account!

Googeling again show me a lot of hints, but no solution work for me.
- using DCOMCNFG tool
- changing ASPNET user privilege
- ...

Last try was to install Office Version 2003 and after installing (no reboot
after installation!) it seems to work perfect. Yeah, the luck is back. But
my first impression was false. After rebooting my maschine, I get the same
exception: Access is denied.

I'm frustrated. But hopefully that anyone can help me.

Does anyone can explain me, what is going (wr) on (g).

Thx in advance.

Michael
Appendix:

Stack Trace:
[UnauthorizedAccessException: Access is denied.]
WebQuote.document.doc() in d:\inetpub\wwwroot\webquote\document.cs:26
WebQuote.start.Step3() in d:\inetpub\wwwroot\webquote\start.aspx.cs:110
WebQuote.start.SiteProcessing() in
d:\inetpub\wwwroot\webquote\start.aspx.cs:129
WebQuote.start.cmdProcess_Click(Object sender, EventArgs e) in
d:\inetpub\wwwroot\webquote\start.aspx.cs:260
System.Web.UI.WebControls.Button.OnClick(EventArgs e) +108

System.Web.UI.WebControls.Button.System.Web.UI.IPo stBackEventHandler.RaisePo
stBackEvent(String eventArgument) +57
System.Web.UI.Page.RaisePostBackEvent(IPostBackEve ntHandler
sourceControl, String eventArgument) +18
System.Web.UI.Page.RaisePostBackEvent(NameValueCol lection postData) +33
System.Web.UI.Page.ProcessRequestMain() +1277

Nov 16 '05 #1
0 1757

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

Similar topics

9
by: | last post by:
Hi All, I have allready tried to ask a similar question , but got no answer until now. In the meantime, I found, that I cannot understand some thread-settings for the Main() function . If I use...
0
by: Michael Meckelein | last post by:
Hi all, some strange things are going on. I have a c# project to automate word written under VS.NET with Office XP PIAs. It is a web application project using ASP.NET, programming language is...
12
by: Chad Crowder | last post by:
Hi all, I hope someone can give me a hand, because I'm out of ideas. I keep getting this message: Access to the path "C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\Temporary ASP.NET...
0
by: ASP.Confused | last post by:
The old message looked a little stale, so I am re-posting it here. Anybody have any ideas of what I could do?!? The previous responses to this question are below. If you want to look at the...
3
by: David Thielen | last post by:
Hi; I created a virtual directory in IIS 6.0 and my asp.net app runs fine. But when it tries to write a file I get: Access to the path is denied. - C:\Inetpub\wwwroot\RunReportASP\images ...
2
by: rockdale | last post by:
Hi, all: My asp.net application calles MS speech 5.1 and generate a wav file on server's path. Everything runs perfectly on my development machine. But when I move the appl to production server,...
3
by: Simon | last post by:
Hi All, I'm hoping someone will have some words of wisdom for me regarding MS Clustering on Windows 2003. I have a service that runs on a cluster. During invocation it's supposed to...
7
by: =?Utf-8?B?ams=?= | last post by:
I am using System.Diagnostics.Process class to open a word document by call ing Process.Start("test.doc"). I am using C# as programming language. On some of the computers on running this code i get...
8
by: Jeremy Ames | last post by:
I am trying to move an application from my system to a new test system. I really should have tried an easier program first, but I didn't really have a chance. My application was originally written in...
2
by: =?Utf-8?B?U2hhbQ==?= | last post by:
I am having the error when i execute my .net application i got this error. "Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED)) ". Can anyone help me to resolve this error....
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
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...

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.