Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > How to retrieve current Windows User Handle from ASP

Reply
Thread Tools

How to retrieve current Windows User Handle from ASP

 
 
Stefano
Guest
Posts: n/a
 
      10-12-2004
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


 
Reply With Quote
 
 
 
 
Ken Schaefer
Guest
Posts: n/a
 
      10-12-2004
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" <(E-Mail Removed)> wrote in message
news:OC%(E-Mail Removed)...
> 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
>
>



 
Reply With Quote
 
 
 
 
Stefano
Guest
Posts: n/a
 
      10-12-2004
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" <(E-Mail Removed)> ha scritto nel messaggio
news:%(E-Mail Removed)...
> 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" <(E-Mail Removed)> wrote in message
> news:OC%(E-Mail Removed)...
> > 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
> >
> >

>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: How include a large array? Edward A. Falk C Programming 1 04-04-2013 08:07 PM
printing out the current URL for current ASP page in Perl Jack Perl Misc 3 12-22-2008 02:35 PM
Retrieve Widnow Handle with Java v_gilmor@bellsouth.net Java 4 09-30-2005 07:43 PM
Possible to handle web requests without an ASPX page? i.e. have DLL handle request. jdlwright@shaw.ca ASP .Net 2 05-31-2005 05:42 PM
File Handle Reading Blues: Rereading a File Handle for Input Dietrich Perl 1 07-22-2004 10:02 AM



Advertisments