views:

365

answers:

3

I've created a .Net library at work that is used by all of our developers. The security part of it uses Microsoft AzMan for the security backend. In order to create a security (AzMan) ClientContext I have to pass it a token value (as a uint). This is all fine an dandy until I needed to make a COM wrapper for our common library so some of our legacy pages could take advantage of it without being rewritten for now.

I cannot figure out how to get the token value to pass to AzMan from legacy ASP. The COM wrapper is setup to run as a COM Server and runs as a specific user that we use here for all COM objects, therefor the common library can't just pull the identity using .Net.

Any ideas?

A: 

Are you using anonymous logons in the IIS configuration? If you use Windows Authentication and do the following in classic ASP you should get the logged on user:

Request.ServerVariables("LOGON_USER")
silverbugg
It's Windows authentication, but I need the Token like you can get from System.Security.Principal.WindowsIdentity.GetCurrent().Token in .Net.
Max Schmeling
A: 

In classic ASP you have to get the token from an external COM object.

It has been a long time since I have dealt with classic ASP... but someone on here who has dealt with impersonation in classic ASP might have some code snippet that they can share.

tyndall
A: 

If your not able to get to token, you could always use the IAzApplication.InitializeClientContextFromName while retrieving the user name from the request in your asp page and passing it to your com+ component.

http://msdn.microsoft.com/en-us/library/aa377363(VS.85).aspx

Wyvern