473,785 Members | 3,245 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Access Denied trying to instantiate a wrappered com object?

I have already used a third party com object in my code,
and it went easily. Add the reference, call the methods,
and get my results.
But I am integrating a legacy com object and I follow the
same steps, the auto complete works, the compiler likes
my code, but when I test, pressing the button that
triggers the code segment gives me an access is denied
error and a stack trace that claims the problem is in my
instantiation. (Error cut and pasted to the end of the
email)

I found some references to the same issue about working
with office from c# as well.

The only difference between teh 3rd party component and
mne is that the 3rd party piece is a dll, and the legacy
code is a exe. And I noticed that all the documentation
specifies that dll's can be wrappered. Is this my issue?
My goal is a stand alone process that does a specific
task outside my thread, so I do not want to have a dll
that runs in my process.

Thank you in advance.

The Error:
Access is denied.
Description: An unhandled exception occurred during the
execution of the current web request. Please review the
stack trace for more information about the error and
where it originated in the code.

Exception Details: System.Unauthor izedAccessExcep tion:
Access is denied.

ASP.NET is not authorized to access the requested
resource. Consider granting access rights to the resource
to the ASP.NET request identity. ASP.NET has a base
process identity (typically {MACHINE}\ASPNE T on IIS 5 or
Network Service on IIS 6) that is used if the application
is not impersonating. If the application is impersonating
via <identity impersonate="tr ue"/>, the identity will be
the anonymous user (typically IUSR_MACHINENAM E) or the
authenticated request user.

To grant ASP.NET write access to a file, right-click the
file in Explorer, choose "Properties " and select the
Security tab. Click "Add" to add the appropriate user or
group. Highlight the ASP.NET account, and check the boxes
for the desired access.

Source Error:
Line 204: }
Line 205: string jobid = "";
Line 206: MaintenanceRx.C JobRx
JobDel = new MaintenanceRx.C JobRx();
Line 207:
Line 208: if(Request.Form .ToString
() != "")
Source File:
c:\inetpub\wwwr oot\processrx\r eportrx\configr eports.aspx.c
s Line: 206

Stack Trace:
[UnauthorizedAcc essException: Access is denied.]
ProcessRx.Confi g.btnDelete_Cli ck(Object sender,
EventArgs e) in
c:\inetpub\wwwr oot\processrx\r eportrx\configr eports.aspx.c
s:206
System.Web.UI.W ebControls.Butt on.OnClick(Even tArgs e)
+108

System.Web.UI.W ebControls.Butt on.System.Web.U I.IPostBackEv
entHandler.Rais ePostBackEvent( String eventArgument) +57
System.Web.UI.P age.RaisePostBa ckEvent
(IPostBackEvent Handler sourceControl, String
eventArgument) +18
System.Web.UI.P age.RaisePostBa ckEvent
(NameValueColle ction postData) +33
System.Web.UI.P age.ProcessRequ estMain() +1277


----------------------------------------------------------
----------------------
Version Information: Microsoft .NET Framework
Version:1.1.432 2.573; ASP.NET Version:1.1.432 2.573

Nov 15 '05 #1
1 2000
Hey Ben
Were you able to solve the problem? I am getting into the same issue. I have a COM object that I have wrapped inside a .Net dll(no compilation errors there). When I try to invoke a function from the .Net dll via a ASPX page, I get an "Access is denied" error at the point in the .Net dll where an instance of the COM class object is created.
Nov 15 '05 #2

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

Similar topics

3
5723
by: Ian | last post by:
The beginning of my assembly that I am getting the access error from looks like this. ********************************* Imports System.EnterpriseServices Imports System Imports System.Collections Imports System.Configuration Imports System.Data Imports System.Data.Common Imports System.Reflection
3
2407
by: vincentw56 | last post by:
This is the first time I have tried this. What we have is a com object the generates keys. A developer here wrote a .Net wrapper in C# for this com object. I am trying to call her dll wrapper with my ASP.NET page and I get an access denied error. I can use the test Windows Form just fine, but not my ASP.NET form. This is all local to my machine. The error is below. Thanks. Vincent Here is the error that I get:
0
1682
by: Jon Rista | last post by:
Hello. I'm trying to automate Excel in a C# Windows Service. This windows service has to be able to access files on network shares, so it uses a domain account on a WinNT 4.0 domain server, rather than the Local Service or Network Service, or System account. I'm running into a problem, though, with trying to instantiate Excel. When I execute the following: using Excel = Microsoft.Office.Interop.Excel; using Microsoft.Office.Core; //...
3
2549
by: buran | last post by:
Dear ASP.NET Programmers, I am trying to save a new created Word document, but getting the following the error. I granted the necessary rights to the ASPNET user, but I'm still getting this error. Thanks in advance, Buran Dim objWordApp As New Microsoft.Office.Interop.Word.Application()
2
18941
by: Brent Burkart | last post by:
I am trying to send an email using SMTP server through IIS. I am recieving the following error. Access is denied. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.UnauthorizedAccessException: Access is denied.
1
1115
by: Roopam | last post by:
Hey Guys I think many of you might have already encountered this problem before. Here is the problem I have a COM dll in VB6. I am using it in a .Net DLL(C#). Then I try to use the functions from the .Net DLL from within an ASP.Net page(C#). There are no compilation errors at this point When I try to browse the web page, I get an "Access denied" error at the point in my .Net DLL where I try to instantiate the class object from the VB6 dll...
0
2477
by: Efi | last post by:
Hi, We have a simple 3 tier application which its core application is VC++ 6.0 ATL COM running as a server application in the COM+. An asp pipe is in charge of handling the requests and passes it to the COM for processing. We are now trying to migrate the asp pipe to Asp.Net. When running the above configuration with Asp.Net on IIS 5.0 (W2K) we have no problems but when trying the do it on IIS 6.0 (W2K3) we are getting the following...
1
1273
by: Jack Jiao | last post by:
Hi, I am using MS Word inside C# application. The application is using impersonation as Administrator. The application works fine for a few days then suddenly I started to get "access is denied" message everytime I instantiate instantiate MS word like "oWordApp = new Word.ApplicationClass();" Not just this application, any application uses word automation now don't work any more. There's nothing I can do to make the error go away. ...
1
2367
by: marijuanated | last post by:
Hi, I am getting the following error while trying to access an ASP page. Server object error 'ASP 0178 : 80070005' Server.CreateObject Access Error /hypoccs/Report/PFR85.asp, line 15
0
9645
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
10325
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...
1
10091
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8972
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7499
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
6740
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
5511
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3646
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2879
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.