By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,836 Members | 2,023 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,836 IT Pros & Developers. It's quick & easy.

How to retrieve current Windows User Handle from ASP

P: n/a
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
Jul 19 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
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

"Stefano" <st*******************@giasoft.it> wrote in message
news:OC****************@TK2MSFTNGP12.phx.gbl...
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

Jul 19 '05 #2

P: n/a
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
"Ken Schaefer" <ke*******@THISadOpenStatic.com> ha scritto nel messaggio
news:%2****************@TK2MSFTNGP12.phx.gbl...
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

"Stefano" <st*******************@giasoft.it> wrote in message
news:OC****************@TK2MSFTNGP12.phx.gbl...
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


Jul 19 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.