![]() |
How to retrieve current Windows User Handle from ASP
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 |
Re: How to retrieve current Windows User Handle from ASP
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" <stefano__REMOVETHIS__@giasoft.it> wrote in message news:OC%23lTTEsEHA.2008@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 > > |
Re: How to retrieve current Windows User Handle from ASP
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" <kenREMOVE@THISadOpenStatic.com> ha scritto nel messaggio news:%233riqHFsEHA.4032@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" <stefano__REMOVETHIS__@giasoft.it> wrote in message > news:OC%23lTTEsEHA.2008@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 > > > > > > |
| All times are GMT. The time now is 02:08 AM. |
Powered by vBulletin®. Copyright ©2000 - 2013, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.