473,396 Members | 1,966 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,396 software developers and data experts.

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.
Nov 22 '05 #1
0 647

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

Similar topics

0
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
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
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
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
by: Manoj | last post by:
Hi, Is it possible to write a ATL COM server in c# ? Thanks Manoj
3
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
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
by: Simon Hart | last post by:
Hi, Does anyone have an example of doing this? Regards Simon.
1
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
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
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
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...
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
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,...

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.