473,656 Members | 2,756 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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.Offic e.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.Applicatio n();

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:
[UnauthorizedAcc essException: Access is denied.]
WebQuote.docume nt.doc() in d:\inetpub\wwwr oot\webquote\do cument.cs:26
WebQuote.start. Step3() in d:\inetpub\wwwr oot\webquote\st art.aspx.cs:110
WebQuote.start. SiteProcessing( ) in
d:\inetpub\wwwr oot\webquote\st art.aspx.cs:129
WebQuote.start. cmdProcess_Clic k(Object sender, EventArgs e) in
d:\inetpub\wwwr oot\webquote\st art.aspx.cs:260
System.Web.UI.W ebControls.Butt on.OnClick(Even tArgs e) +108

System.Web.UI.W ebControls.Butt on.System.Web.U I.IPostBackEven tHandler.RaiseP o
stBackEvent(Str ing eventArgument) +57
System.Web.UI.P age.RaisePostBa ckEvent(IPostBa ckEventHandler
sourceControl, String eventArgument) +18
System.Web.UI.P age.RaisePostBa ckEvent(NameVal ueCollection postData) +33
System.Web.UI.P age.ProcessRequ estMain() +1277

Nov 16 '05 #1
0 1786

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

Similar topics

9
6321
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 the attribute for the Main() function, I get "access denied error", if I use a ManagementEventWatcher to connect to the local machine to receive events. Is there anybody out there, how possibly can explain why this happens?? If I remove this...
0
272
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 c#. Office Version 2002 (Microsoft Word 10.0 Object Library version 8.2). All works fine.
12
5094
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 Files\projects_cig\e4e3b3da\3c20ac69" is denied. The error goes on to say that the ASP.NET is not authorized...
0
3532
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 original question, the subject line is: ADODB.NET and "Access Denied" I have an ASP.NET page writtein in VB that uses ADODB. I just had to
3
7953
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 C:\Inetpub\wwwroot\RunReportASP is the directory of my virtual directory for my app. In it's properties I did check "Write" as a permission. What else do I need to do?
2
5271
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, I always get ERROR: Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED)). First I thought its the permission problem, so I set permission of that directory to everyone (not an secure idea, but for test only). I found out that...
3
5417
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 determine from the cluster which node is active (this is a active/standby configuration) and either proceed or sleep depending on the status. The interface to the cluster is that advertised by the standard interop layer built by Visual Studio for the...
7
20425
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 "Access is Denied" Win32Exception. What do i do to not generate this exception ? Any help highly appreciated, Thanks, Jay
8
6041
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 ASP.NET 1.1, but was migrated to 2.0 during development. The reason this is an issue is because the application is using the Microsoft.Web.UI.WebControls.dll for the tree view and tab strip controls that didn't exist prior to 2.0. Well, that is...
2
1772
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. Thnks in advnz..
0
8382
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8816
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8717
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8600
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6162
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5629
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4150
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4300
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
1930
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.