I have an old program made with Visual Basic 6.0. This program is run under MTS/COM+ on the server as business logic to supply data for the clients. It uses an ObjectContext object to obtain the user name who is using the client part of the application and thus calling the business logic.
Implements ObjectControl
Private m_ctx As ObjectContext
Set m_ctx = GetObjectContext()
l_nm_user = m_ctx.Security.GetDirectCallerName
However, for some reason, in Windows Server 2012 R2 GetDirectCallerName returns an emty string. This piece of code works nicely at least in Windows Server 2008 R2 and previous versions.
The following libraries are referred in the project:
stdole2.tlb - OLE Automation
COMSVCS.DLL - COM+ Services Type Library
What should I change to make this work also in Windows Server 2012 R2 and to return the user name correctly, so to return at least something?