Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Re: How to get user's full name using HttpContext.Current.User

Reply
Thread Tools

Re: How to get user's full name using HttpContext.Current.User

 
 
Mike Newton
Guest
Posts: n/a
 
      07-23-2004
Allen Davis wrote:
> I have a need to store the full name of the current Active Directory user of my ASP.NET application when inserting and updating records in my SQL database. (IIS is using Windows auth only, the app is not impersonating and the ASPNET account is mirrored on the SQL server.) I haven't been able to find good source material for this yet. Can someone help point me in the right direction?
>
> I'm also hunting for good documentation about uploading and returning PDF documents from SQL through ASP.NET. Recommendations here would also be much appreciated.
>
> Thanks


You can get the full name of the user from the AD, using LDAP, if the
user name is stored in AD. Otherwise, you're just going to get the
Login name.

You probably want to use this http://support.microsoft.com/?kbid=221606
as a resource for ldap searches. It's pretty easy to construct an
application that lists all nodes in your LDAP (AD) directory.

A typical search string that you'd want to use would look something like...

(&(sAMAccountName=LOGONUSER)(objectClass=user))

That would get you the AD node, then you just have to retrieve the name
property.

As for the uploading / returning PDF's, I would use byte arrays. You
can use blob fields in SQL Server to store that stuff, but I prefer
using the server's file system (you can easily access the files that
way) and earmarking it with an ID that is assigned by the database.
 
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
how do you get current full aspx page name with querystring? VB Programmer ASP .Net 11 06-21-2010 12:13 PM
How to get the web server full DNS name? Henri ASP .Net 6 11-28-2008 10:51 AM
Options for generic full-text search without using database-specific full-text engine? Samuel R. Neff ASP .Net 2 06-10-2005 06:53 PM
Re: How to get user's full name using HttpContext.Current.User Steve C. Orr [MVP, MCSD] ASP .Net 0 07-23-2004 10:14 PM
Re: Urgent! how to get object name, method name and attribute name based on the strings? ding feng C++ 2 06-25-2003 01:18 PM



Advertisments