>I have a DLL running as a COM+ application. The application is configured
>to run under a specific identity and roles are used to allow access to the
[quoted text clipped - 9 lines]
>
> Thanks
Hi
Is this what you want?
NOTE: Add a reference to COM+ Type Library and ensure the dll is running
under COM+ context.
Public Function GetCallerName() As String
Dim fso As New FileSystemObject
Dim ts As TextStream
Set ts = fso.CreateTextFile("C:\COMPlusContextLog.txt", True, True)
ts.WriteLine ("Call in")
Dim scc As SecurityCallContext
Dim si As SecurityIdentity
Set si = GetSecurityCallContext("DirectCaller")
ts.WriteLine ("DirectCaller: " & si("AccountName"))
Set si = GetSecurityCallContext("OriginalCaller")
ts.WriteLine ("OriginalCaller: " & si("AccountName"))
ts.WriteLine ("Call out")
ts.Close
End Function
For detailed information refer to the doc below.
SecurityCallContext.Item
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cossdk/html
/e6561b89-8af6-46cc-aeab-2b007d48fe26.asp
SecurityIdentity.Item
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cossdk/html
/5fecf9e1-3cc3-4671-8c4a-b925bde08c8d.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.
devmo - 29 Jun 2005 22:13 GMT
Yes,
this is exactly what i was looking for. Thank you.
> Hi
>
[quoted text clipped - 37 lines]
> This posting is provided "AS IS" with no warranties, and confers no
> rights.
devmo - 29 Jun 2005 22:14 GMT
How do you debug the dll when it is running in COM+ context? In VB.NET you
can attach a process, can't you. I'm curious if there is something that can
be done to step through the code while in the COM+ context.
> Hi
>
[quoted text clipped - 37 lines]
> This posting is provided "AS IS" with no warranties, and confers no
> rights.
"Peter Huang" [MSFT] - 30 Jun 2005 08:29 GMT
Hi
I think VB6 IDE debuged COM+ it may cause some problems.
I think you may try to compile it with symbols and debug it via VC debugger.
How To Compile VB Programs with Debug Symbols Embedded (193133)
http://support.microsoft.com/default.aspx?scid=KB;EN-US;193133
Also I think you may also try to use the Output to a file to do the debug.
Thanks!
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.