CodeVerge.Net Beta


   Explore    Item Entry    Members      Register  Login  
NEWSGROUP
.NET
Algorithms-Data Structures
Asp.Net
C Plus Plus
CSharp
Database
HTML
Javascript
Linq
Other
Regular Expressions
VB.Net
XML

Free Download:




Zone: > NEWSGROUP > Asp.Net Forum > general_asp.net.security Tags:
Item Type: NewsGroup Date Entered: 7/16/2007 4:56:23 PM Date Modified: Subscribers: 0 Subscribe Alert
Rate It:
(NR, 0)
XPoints: N/A Replies: 4 Views: 72 Favorited: 0 Favorite
Can Reply:  No Members Can Edit: No Online: Yes
5 Items, 1 Pages 1 |< << Go >> >|
Pawelek
Asp.Net User
How to retrieve Windows user login name in intranet with Windows AD network?7/16/2007 4:56:23 PM

0/0

Hi. I have intranet portal in network with windows Active Directory. How to retrieve from current user session his Windows user login name or other properties such as e-mail adress from AD? Regards Pawel.

jackyang
Asp.Net User
Re: How to retrieve Windows user login name in intranet with Windows AD network?7/16/2007 5:27:30 PM

0/0

See this article: http://www.willasrari.com/blog/query-active-directory-users-using-c/000133.aspx

Also some examples: http://www.codeproject.com/dotnet/getuserfrmactdircsharp.asp

Assume the user is authenticated, then to retrieve the current user's login name, use Page.User.Identity.Name


Jack Yang
.NET Developer
cb3431
Asp.Net User
Re: How to retrieve Windows user login name in intranet with Windows AD network?7/16/2007 7:30:16 PM

0/0

I am using Windows authentication and I need to get the ID for the user. I am also using profile with .NET 2.0. I noticed that a record is created for the Windows user in the aspnet_Users table when a profile value is set. Is it possible to use the membership object to get the userid with Windows authentication?

Something like this

Membership.GetUser.ProviderUserKey

I guess I am asking if this web.config line can be configured to work with Windows authentication

<membership>

<providers>

<clear/>

<add

name="AspNetSqlMembershipProvider"

type="System.Web.Security.SqlMembershipProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"

passwordStrengthRegularExpression=""/></providers>

</membership>

jackyang
Asp.Net User
Re: How to retrieve Windows user login name in intranet with Windows AD network?7/16/2007 7:51:21 PM

0/0

You can replace the SqlMembershipProvider with ActiveDirectoryMembershipProvider: http://msdn2.microsoft.com/en-us/library/system.web.security.activedirectorymembershipprovider.aspx, see the property definitions related to what you will need.

Converning about roles, user role is likely associated with LDAP groups in you case, I'm not sure if you want to work it off the active directory, since it's all about leveled privileges, you probably won't have sufficient right to traverse your AD a lot, and I can't think of your network admin will hand you a service admin account and allow you to impersonate it either. I would use SqlRoleProvider for it.

 


Jack Yang
.NET Developer
cb3431
Asp.Net User
Re: How to retrieve Windows user login name in intranet with Windows AD network?7/16/2007 11:33:03 PM

0/0

Awesome thanks. I am using AZMAN for roles.

5 Items, 1 Pages 1 |< << Go >> >|


Free Download:

Books:
C# Network Programming Authors: Richard Blum, Pages: 672, Published: 2002
MCSA/MCSE Exam 70-291 Study Guide and DVD Training System: Implementing, Managing, and Maintaining a Windows Server 2003 Network Infrastructure Authors: Thomas W. Shinder, Debra Littlejohn Shinder, Susan Snedaker, Kirk Vigil, Laura (NRT) Hunter, Hal Kurz, Pages: 800, Published: 2003
IIS 5.0: A Beginner's Guide Authors: Rod Trent, Trent, Pages: 504, Published: 2001
Microsoft Office SharePoint Server 2007: The Complete Reference Authors: David Matthew Sterling, David Sterling, Pages: 788, Published: 2007
Windows Server Hacks: 100 Industrial-Strength Tips & Tools Authors: Mitch Tulloch, Pages: 357, Published: 2004
Windows Server 2003 Network Administration: network administration Authors: Craig Hunt, Roberta Bragg, Pages: 677, Published: 2005

Web:
Recipe: Enabling Windows Authentication within an Intranet ASP.NET ... For example, if there is a Windows group on the Active Directory network .... I use the user.identity.name result to do an active directory lookup for that ...
Intranet Access Management and Single Sign On If the Active Directory user previously used the UNIX workstation that used a ... logon can be presented to the Windows KDC to generate a service ticket. ...
Ignite Realtime: HOWTO: SSO Configuration for Windows (Server and ... If the Windows NetBIOS/Network name of your Openfire server is "WINSERVER01" and your Windows AD (Active Directory) domain name is "intranet.com" then the ...
ASP C# integrated Windows authentication (single sign-on ... Net framework retrieves the logged in user name and compares it to a list .... with Windows and the single sign on process uses Windows based login details. ...
retrieve windows username in php - PHP Is it possible to find out the windows user name in php ? Logon in windows ... an Intranet? the windoze login could be as useful as perhaps, .htaccess / ...
Can't retrieve Full User Name from Active Directory : 0x80070035 I've disabled anonomous access and enabled integrated windows... ... to use Asp. net to get the full user name of a user logged onto an intranet website. ...
[RESOLVED] Getting computer's system's login? [Archive ... eg; How do I retrieve a users login name through COM? ... This works on a windows intranet using IIS so long as anonymous access is disabled ...
Windows 2000 Active Directory Configuration Guide AD configuration. 2.1. Windows 2000 server. Checking user information in your .... name on the inter/intranet). The login names of your users will then be ...
User Guide for LDAP Integration with Autologin User Guide for using Auto-Login with Active Directory and LDAP Configurator ..... You will encounter errors if the Integrated Windows Security is not ...
Retrieve Windows Domain Username - SitePoint Forums The username/password box may be a WINDOWS induced logon than an IIS one. ... Domain Names, Manage Your Site, Advertising Sales & Affiliate ...




Search This Site:










change login

draganddrop functionality

add new portal error message

how to access dll with asp.net?

dnn 307 installation problems

windows control embedded in a web application

label control

sql server does not exist or access denied.

rss strange result

someone please confirm this

how to open a ms word documents

unhandled error title

dnn pa & form generator alpha version

passwordrecovery control without using iis authentication

error while trying to run project:unable to start debuging on the web server. the project is not configured to be debuged.

trim to a specific alphanumeric quotable

importing an html page into asp

menu selected item

index out of range - seraching active directory

portal store 6.1 and verisign payflowpro support

designing web parts for moss 2007

how to send emails from asp.net page??

target=_black problem

how to organise a website

user controls: a beginner

insertion of database

admin pages don't know they are admin pages

passing variables to nested user controls

css page and ie7

error tracking

 
All Times Are GMT