473,503 Members | 1,643 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Access Denied trying to create New Instantance of Object

Ian
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
Imports System.Data.SqlClient
Imports System.Xml

Public Class AdoHelper
Inherits ServicedComponent

Public Sub New()
MyBase.New()
End Sub 'New
*********************************

When I am in my application and trying to create a instantance of the object
it looks like this.
Private oSql As New DataLayer.AdoHelper

And it throws an access denied error when I use the word "NEW". This
assembly was working fine in my application until I added the
EnterpriseServices assembly so that I can have the object hosted in com+. So
I don't where the disconnect is for me. I know it has something to do with
EnterpriseServices but I just don't what?

Any help would be helpful
Jul 21 '05 #1
3 5689
Hi Lan,

It seems that you want to make a Serviced Component.
Here is a example.
Serviced Component Example
http://msdn.microsoft.com/library/de...us/cpguide/htm
l/cpconservicedcomponentexample.asp

Regards,
Peter Huang
Microsoft Online Partner Support
Get Secure! www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

--------------------
Reply-To: "Ian" <id*****@dlbabson.com>
From: "Ian" <id*****@dlbabson.com>
Subject: Access Denied trying to create New Instantance of Object
Date: Thu, 25 Sep 2003 10:17:54 -0400
Lines: 34
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2600.0000
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000
Message-ID: <ex*************@tk2msftngp13.phx.gbl>
Newsgroups: microsoft.public.dotnet.general
NNTP-Posting-Host: bh2.massmutual.com 63.66.112.5
Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!tk2msftn gp13.phx.gbl
Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.general:109860
X-Tomcat-NG: microsoft.public.dotnet.general

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
Imports System.Data.SqlClient
Imports System.Xml

Public Class AdoHelper
Inherits ServicedComponent

Public Sub New()
MyBase.New()
End Sub 'New
*********************************

When I am in my application and trying to create a instantance of the objectit looks like this.
Private oSql As New DataLayer.AdoHelper

And it throws an access denied error when I use the word "NEW". This
assembly was working fine in my application until I added the
EnterpriseServices assembly so that I can have the object hosted in com+. SoI don't where the disconnect is for me. I know it has something to do with
EnterpriseServices but I just don't what?

Any help would be helpful


Jul 21 '05 #2
Ian
I have the ServiceComponent setup correctly and the client, but my problem
is when I try to create an instantance of the com+ component I get the
following error.

"An unhandled exception of type 'System.UnauthorizedAccessException'
occurred in mscorlib.dll
Additional information: Access is denied"

I have given the ASPNET user full rights to that assembly and even put the
user in the admin group on my box just in case I missed something, but that
still doesn't work I still get the same error message.

Any help with be appreciated.

Ian

"Peter Huang [MSFT]" <v-******@online.microsoft.com> wrote in message
news:Yd**************@cpmsftngxa06.phx.gbl...
Hi Lan,

It seems that you want to make a Serviced Component.
Here is a example.
Serviced Component Example
http://msdn.microsoft.com/library/de...us/cpguide/htm l/cpconservicedcomponentexample.asp

Regards,
Peter Huang
Microsoft Online Partner Support
Get Secure! www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

--------------------
Reply-To: "Ian" <id*****@dlbabson.com>
From: "Ian" <id*****@dlbabson.com>
Subject: Access Denied trying to create New Instantance of Object
Date: Thu, 25 Sep 2003 10:17:54 -0400
Lines: 34
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2600.0000
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000
Message-ID: <ex*************@tk2msftngp13.phx.gbl>
Newsgroups: microsoft.public.dotnet.general
NNTP-Posting-Host: bh2.massmutual.com 63.66.112.5
Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!tk2msftn gp13.phx.gbl
Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.general:109860
X-Tomcat-NG: microsoft.public.dotnet.general

The beginning of my assembly that I am getting the access error from lookslike this.
*********************************
Imports System.EnterpriseServices
Imports System
Imports System.Collections
Imports System.Configuration
Imports System.Data
Imports System.Data.Common
Imports System.Reflection
Imports System.Data.SqlClient
Imports System.Xml

Public Class AdoHelper
Inherits ServicedComponent

Public Sub New()
MyBase.New()
End Sub 'New
*********************************

When I am in my application and trying to create a instantance of the

object
it looks like this.
Private oSql As New DataLayer.AdoHelper

And it throws an access denied error when I use the word "NEW". This
assembly was working fine in my application until I added the
EnterpriseServices assembly so that I can have the object hosted in com+.

So
I don't where the disconnect is for me. I know it has something to do withEnterpriseServices but I just don't what?

Any help would be helpful

Jul 21 '05 #3
Hi Lan,

Which version of OS and IIS do you use?

As for you issue, I think you may try to use impersonate.
Here is a KB Link.
306158 INFO: Implementing Impersonation in an ASP.NET Application
http://support.microsoft.com/?id=306158

Impersonate will let you use the authenticated user to access the COM+
component.
e.g. you set the Windows Integated authentication in the IIS setting, then
you will use the current logon user to access the webpage, and then access
the COM+ component. You also need to set the logon user the rights to
access the COM+ component.
You may run the dcomcnfg in the run dialog,navigate to the Component
Service/Computer/Mycomputer, right click on the Mycomputer,and select the
default com security tab. Then press the each Edit button and add the
current logon use to the permission dialog. This will add the current logon
use the lauch and access right.

You may have a try and let me know if this does the job for you.

Regards,
Peter Huang
Microsoft Online Partner Support
Get Secure! www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

--------------------
Reply-To: "Ian" <id*****@dlbabson.com>
From: "Ian" <id*****@dlbabson.com>
References: <ex*************@tk2msftngp13.phx.gbl> <Yd**************@cpmsftngxa06.phx.gbl>Subject: Re: Access Denied trying to create New Instantance of Object
Date: Fri, 26 Sep 2003 07:57:30 -0400
Lines: 94
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2600.0000
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000
Message-ID: <eB**************@TK2MSFTNGP12.phx.gbl>
Newsgroups: microsoft.public.dotnet.general
NNTP-Posting-Host: bh2.massmutual.com 63.66.112.5
Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTN GP12.phx.gbl
Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.general:110006
X-Tomcat-NG: microsoft.public.dotnet.general

I have the ServiceComponent setup correctly and the client, but my problem
is when I try to create an instantance of the com+ component I get the
following error.

"An unhandled exception of type 'System.UnauthorizedAccessException'
occurred in mscorlib.dll
Additional information: Access is denied"

I have given the ASPNET user full rights to that assembly and even put the
user in the admin group on my box just in case I missed something, but that
still doesn't work I still get the same error message.

Any help with be appreciated.

Ian

"Peter Huang [MSFT]" <v-******@online.microsoft.com> wrote in message
news:Yd**************@cpmsftngxa06.phx.gbl...
Hi Lan,

It seems that you want to make a Serviced Component.
Here is a example.
Serviced Component Example

http://msdn.microsoft.com/library/de...-us/cpguide/ht

m
l/cpconservicedcomponentexample.asp

Regards,
Peter Huang
Microsoft Online Partner Support
Get Secure! www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

--------------------
>Reply-To: "Ian" <id*****@dlbabson.com>
>From: "Ian" <id*****@dlbabson.com>
>Subject: Access Denied trying to create New Instantance of Object
>Date: Thu, 25 Sep 2003 10:17:54 -0400
>Lines: 34
>X-Priority: 3
>X-MSMail-Priority: Normal
>X-Newsreader: Microsoft Outlook Express 6.00.2600.0000
>X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000
>Message-ID: <ex*************@tk2msftngp13.phx.gbl>
>Newsgroups: microsoft.public.dotnet.general
>NNTP-Posting-Host: bh2.massmutual.com 63.66.112.5
>Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!tk2msftn gp13.phx.gbl
>Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.general:109860
>X-Tomcat-NG: microsoft.public.dotnet.general
>
>The beginning of my assembly that I am getting the access error fromlooks >like this.
>*********************************
>Imports System.EnterpriseServices
>Imports System
>Imports System.Collections
>Imports System.Configuration
>Imports System.Data
>Imports System.Data.Common
>Imports System.Reflection
>Imports System.Data.SqlClient
>Imports System.Xml
>
>Public Class AdoHelper
> Inherits ServicedComponent
>
> Public Sub New()
> MyBase.New()
> End Sub 'New
>*********************************
>
>When I am in my application and trying to create a instantance of the

object
>it looks like this.
>Private oSql As New DataLayer.AdoHelper
>
>And it throws an access denied error when I use the word "NEW". This
>assembly was working fine in my application until I added the
>EnterpriseServices assembly so that I can have the object hosted in
com+. So
>I don't where the disconnect is for me. I know it has something to do

with >EnterpriseServices but I just don't what?
>
>Any help would be helpful
>
>
>



Jul 21 '05 #4

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

Similar topics

0
1054
by: Chris Warr | last post by:
Hi, I have a VB6 COM dll compiled on an NT 4 sp6a server installed in an MTS package. I've exported this package to a windows 2000 machine where I've created a .net application and added a...
1
412
by: Cristiano Trebian | last post by:
Hi all, This is my problem: I try to create the Msxml 4.0 object in an vb.net class in an asp.net project and it return me the following error message: System.UnauthorizedAccessException:...
1
1979
by: Ben Pryhoda | last post by:
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...
12
3069
by: Ron Weldy | last post by:
I have a test server runinng 2003/IIS 6 with a mixture of asp and asp.net files. On my workstation I have a share set up to the folder where the web files reside. I am just doing quick and dirty...
8
1737
by: lightcap | last post by:
Server Windows 2003. Created one web site, everything works fine. Copied the content to another folder and created another web site pointing to the copied contecnt for test purposes. Configuration...
3
307
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...
4
3986
by: Chrisser | last post by:
Hi I have an Intranet webpage starting with a mainpage from which the user can open a new window using a link that is calling a function: function openWindows(){ var left, top; width =...
1
2133
by: vamsioracle | last post by:
I am working on discoverer reports on 10g. When i create a new EUL, it says the user (SCOTT) doesn't have enough privileges to create a view. Though the user scott is created at the time of...
0
7202
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
7084
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
7278
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
7458
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
5578
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,...
1
5013
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...
0
3154
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1512
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
736
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.