ASP.NET capture login id... LDAP?

C

Chris

I want to capture a users windows login Id and display it in asp.net
web page (using VB.net).
Any and all suggestions accepted..
A code snippet wud be really appreciated.

Read an article in MSDN (LDAP), but cud'nt make it working.
 
E

Erik Funkenbusch

I want to capture a users windows login Id and display it in asp.net
web page (using VB.net).
Any and all suggestions accepted..
A code snippet wud be really appreciated.

Read an article in MSDN (LDAP), but cud'nt make it working.

You need to be more specific about what you're asking for.

"capture a users windows login id" can mean any number of things. What are
you trying to do?
 
C

Chris

I have a page which needs the user to fill his/her info.
The application needs to get some infor about the user (to identify
him/her), which he wont be able to change it. This is to avoid trash
data..

All the user logs in the system using an id and password. I want to
display that user id in the asp.net application.

The application runs inside the firewall and is used internally in our
organization.

Thanks!
 
E

Erik Funkenbusch

I have a page which needs the user to fill his/her info.
The application needs to get some infor about the user (to identify
him/her), which he wont be able to change it. This is to avoid trash
data..

All the user logs in the system using an id and password. I want to
display that user id in the asp.net application.

The application runs inside the firewall and is used internally in our
organization.

It sounds like this would be a perfect candidate for ASP.NET 2.0 Login
controls and Membership functionality. You just drag and drop the login
control onto the form, and, depending on the data source you need to
authenticate against, do a little configuration.

Start here:

http://www.asp.net/QuickStart/aspnet/doc/security/default.aspx
 
J

Jim Andersen

Chris said:
I want to capture a users windows login Id and display it in asp.net
web page (using VB.net).

In inetmgr view properties for the webapp. In tab "document security" remove
the "allow anonymous access" checkmark.

In the App use:
User.Identity.Name

/jim
 
Joined
Jul 21, 2007
Messages
1
Reaction score
0
windows authentication

I set annonymous logon unchecked. in web.config i used windows authentication and impersination to true. in the code part I used
several ways to capture the name. it's working fine on my mechine(localhost). when i try it on other machine using my computer url, the application asking for userid and password. after that it's showing you are not authorise to access this page/access denyed.

can any one help me please......

thanks in advance.

cenimalu










=?Utf-8?B?Qmx1ZVNreQ==?= said:
Check out this site --
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnnetsec/html/SecNetHT02.asp

Request.ServerVariables["LOGON_USER"];
will give you the LAN ID of the user who is logged into this computer. With
this information you can use the above link and retrieve further info about
the user (first name, last name, etc).


"Jim Andersen" wrote:

>
> "Chris" <[email protected]> skrev i en meddelelse
> news:[email protected]...
> >I want to capture a users windows login Id and display it in asp.net
> > web page (using VB.net).

>
> In inetmgr view properties for the webapp. In tab "document security" remove
> the "allow anonymous access" checkmark.
>
> In the App use:
> User.Identity.Name
>
> /jim
>
>
>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,015
Latest member
AmbrosePal

Latest Threads

Top