473,399 Members | 3,832 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,399 software developers and data experts.

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.UnauthorizedAccessException:
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}\ASPNET 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="true"/>, the identity will be
the anonymous user (typically IUSR_MACHINENAME) 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.CJobRx
JobDel = new MaintenanceRx.CJobRx();
Line 207:
Line 208: if(Request.Form.ToString
() != "")
Source File:
c:\inetpub\wwwroot\processrx\reportrx\configreport s.aspx.c
s Line: 206

Stack Trace:
[UnauthorizedAccessException: Access is denied.]
ProcessRx.Config.btnDelete_Click(Object sender,
EventArgs e) in
c:\inetpub\wwwroot\processrx\reportrx\configreport s.aspx.c
s:206
System.Web.UI.WebControls.Button.OnClick(EventArgs e)
+108

System.Web.UI.WebControls.Button.System.Web.UI.IPo stBackEv
entHandler.RaisePostBackEvent(String eventArgument) +57
System.Web.UI.Page.RaisePostBackEvent
(IPostBackEventHandler sourceControl, String
eventArgument) +18
System.Web.UI.Page.RaisePostBackEvent
(NameValueCollection postData) +33
System.Web.UI.Page.ProcessRequestMain() +1277


----------------------------------------------------------
----------------------
Version Information: Microsoft .NET Framework
Version:1.1.4322.573; ASP.NET Version:1.1.4322.573

Nov 15 '05 #1
1 1969
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
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...
3
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...
0
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...
3
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...
2
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...
1
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...
0
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...
1
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...
1
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
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:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
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
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...
0
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...
0
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,...
0
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...

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.