System.UnauthorizedAccessException from COM+ app

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,

I am trying to connect to a COM+ library application from a Windows forms
exe. When I try to create the serviced component I get a not authorized
exception.

The serviced component has these attributes:

[EventTrackingEnabled(true)]
[JustInTimeActivation(true)]
[Transaction(TransactionOption.Required, Timeout = 2000)]
[SecurityRole("Developer")]
[SecurityRole("Tester")]
[ComponentAccessControl(true)]

What am I doing wrong?
How can I configure my client so it has enough security?
 
Hi

Based on my understanding, you have created a Serviced Component and put it
into COM+ and run it as a Library Application. For a Library Application,
it will run in the Creator's process just as a common dll.

By default the client(Winform) will use the user's credential who lauched
the client to access to the COM+ application, you so may check if your
acount has the permission to access the COM+.

Also I think you may try to start from the example in the msdn below to see
if that works for you.
Serviced Component Example
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/htm
l/cpconservicedcomponentexample.asp

Here is also a good start for your reference.
Writing Serviced Components
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/htm
l/cpconwritingservicedcomponents.asp

Best 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.
 
Back
Top