473,385 Members | 1,427 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,385 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.
Jul 21 '05 #1
0 859

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: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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...

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.