473,387 Members | 1,504 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,387 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 1765

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: 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:
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.