473,513 Members | 6,210 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Wondering about COM+ (EnterpriseServices)

Hi,
This problem is really a jerk. See the following code:

<Assembly: ApplicationActivation(ActivationOption.Library)

<Assembly: ApplicationAccessControl(False)>
<Transaction(TransactionOption.Supported)> _
Public Class ComponentA : Inherits ServicedComponent
Public Sub New()
End Sub

<AutoComplete(True)> _
Public Function GetData(ByVal data As Integer) As
String
Return data.ToString
End Function

End Class

<Transaction(TransactionOption.Supported)> _
Public Class ComponentB : Inherits ServicedComponent

Public Sub New()
End Sub

<AutoComplete(True), Description("Function in
Component B")> _
Public Function GetData(ByVal data As Integer) As
String
Return data.ToString
End Function
End Class

Module COMPlusTest

Public Sub TestA()
Dim ca As New ComponentA()
Dim retVal As String
retVal = ca.GetData(100)
Console.WriteLine("Component A: " & retVal)
Console.ReadLine()
End Sub

Public Sub TestB()
Dim cb As New ComponentB()
Dim retVal As String
retVal = cb.GetData(100)
Console.WriteLine("Component B: " & retVal)
Console.ReadLine()
End Sub

Sub Main()
Try
Console.WriteLine("Testing Component A...")
TestA()

Console.WriteLine("Testing Component B...")
TestB()

Catch ex As Exception
Console.WriteLine(ex.Message)
End Try

Console.ReadLine()
End Sub

End Module

Why TestA succeeds and TestB throws Method level rolebased
security failed exception????????

Except the description attribute, everything seems to be
the same....

Please, if you know the answer do just tell me.. My email
id is: sr*********@mascon.co.in.
Jul 21 '05 #1
0 870

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

Similar topics

0
1348
by: Boomessh | last post by:
Hai all, can any one help me in solving he following problem? I am registering a COM+ component in a machine. While registering i am getting the following error. ...
1
3901
by: Pavel Kocar | last post by:
Hi, I can't start my service. This service run as user (with user right, security "run as service"). This service want to create COM + application run under this same user. If I want to start my...
26
4416
by: Lasse Edsvik | last post by:
Hello I'm trying to build a simple COM+ app in vs.net using C# and i cant register it in component manager..... what more is needed than this: using System; using...
12
1643
by: glenn | last post by:
How do you write a COM server in C# VS 2003? I can't believe it but I can't even find the words COM in the help for VS related to COM servers. Did Microsoft Rename it again or can VS C# not...
4
1616
by: Manoj | last post by:
Hi, Is it possible to write a ATL COM server in c# ? Thanks Manoj
3
2987
by: Keith Patrick | last post by:
I have the Beta 2 of VS 2005 running an ASP.Net 2.0 app. This thing worked yesterday, but today, it's telling me: Error 1 Could not load file or assembly 'System.EnterpriseServices,...
5
1714
by: platinumbay | last post by:
Two questions: 1) I have an VB.NET application that moves files, loads them in DTS, and updates a custom SQL database queue. I want to move everything into COM+ to be XA compliant. I built the...
2
4730
by: Simon Hart | last post by:
Hi, Does anyone have an example of doing this? Regards Simon.
1
1557
by: tassieboy | last post by:
Hi All I have a VB.NET application which runs on all client machines except one, where on startup, it gives the message system.enterpriseservices.thunk.dll, or one of its dependencies, were not...
1
1212
by: pbearne | last post by:
Hi all We have a 3-Tier Architecture that uses com+ from the days when our websites used just classic ASP. All the .net examples I have found are not using com+ or Enterprise Services. As I...
0
7153
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
7373
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
7432
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...
1
7094
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
5677
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
5079
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
3218
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1585
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 ...
0
452
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...

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.