Here is a list of good sample scripts that you could use..
http://www.activexperts.co
Cheers!!
Main Topics
Browse All TopicsHi experts,
Suppose the user login in Windows from Active Directory,I am writing a ASP to get the login user ID and user name from Active Directory. Therefore, the asp should get who is the currect user to login in Active Directory and show his/her login ID and login Name. Please advice!! Thanks a lot!!
Wilson
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Here is a list of good sample scripts that you could use..
http://www.activexperts.co
Cheers!!
Dear ap_sajith,
Thanks for your help first.
On my case, I use sharepoint as the front end portal to view discoverer reports. Suppose domain user can go to the web site without login(sharepoint and discoverer). Before go to main page, system needs to get user ID to login to discoverer server. Then user don't need to login to discoverer again. The user name and password is the same as AD. I have to write a asp to login discoverer server first and then redirect to sharepoint. I need to show the current user ID and user name on the front page. Actually, I have tried to use Request.ServerVariables before. It works inside sharepoint but it doesn't work outside. Do you have any ideas? Thanks a lot first.
Cheers,
wilson
Business Accounts
Answer for Membership
by: ap_sajithPosted on 2003-12-13 at 23:15:17ID: 9936860
You need to enable Integrated windows authentication for the website in order to achieve this.
sLoginUser ,sDomain ables("LOG ON_USER"), "\","/") UserID)) d(arrCurUs erID)-1)
oginUser)
strUser) ame
Add the following code to retrieve the Current users User ID and USer Name
<%
'** RETRIEVE THE CURRENT USER'S ID (LOGGED INTO THE DOMAIN) **
Dim strCurUserID,arrCurUserID,
strCurUserID = REPLACE(Request.ServerVari
arrCurUserID = Split(strCurUserID,"/")
sLoginUser = arrCurUserID(ubound(arrCur
sDomain=arrCurUserID(uboun
Response.write getUserFullname(sDomain,sL
Function getUserFullname(strDomain,
Dim User
Set User = GetObject("WinNT://" & strDomain & "/" & strUser & ",user")
getUserFullname=User.Fulln
End Function
%>