How to retrieve current Windows User Handle from ASP

S

Stefano

Hi all,

is it possibile to retrieve the current Windows User Handle from ASP code?

I would like to retrieve the correspondent in ASP for thi piece of ASP.NET
code:

WindowsIdentity id = HttpContext.Current.User.Identity as WindowsIdentity;
if (id != null)
{
IntPtr handle = id.Token;
}

I need to pass "handle" variable to a .NET method (using interop).

Thank you so much.

Bye
 
K

Ken Schaefer

I don't think ASP provides any intrinsic way to access the user token - you
might be able to do it in a COM object.

Cheers
Ken
 
S

Stefano

I use Basic Authentication (over SSL), so I retrieved the Base64 string from
ASP code, using HTTP_AUTHORIZATION servervariable.

In this way, I can decode the string and so I can have the user's
credentials.

So, I solved my problem.

But... I'm curious... what about retrieving user token by COM object?

Thanks!

Bye
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,768
Messages
2,569,575
Members
45,053
Latest member
billing-software

Latest Threads

Top