Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Find Clients Current User with ASP 4

Status
Not open for further replies.

PsychoticBadgers

IS-IT--Management
Jan 25, 2005
10
GB
[COLOR=red yellow]How can I make ASP show the Logon of the Current User?[/color]

My ASP runs SQL code on our server OK, and is located on my machine. This page can be accessed from other machines, but will always run from mine.

I need to be able to run the code based on the Username of the person using my ASP page, regardless of which machine they are using.

Any help appreciated!
 
aha!

Start -> Setting -> Control Panel -> Administrative Tools -> Internet Services Manager -> Right click Default Web Site choose Properties.


Well if you don't need to be a server admin, it's not something to learn just for the fun of it.
Unless you are a "dyed in the wool" total geek that is [smile]

Chris.

Indifference will be the downfall of mankind, but who cares?
Woo Hoo! the cobblers kids get new shoes.
Nightclub counting systems

So long, and thanks for all the fish.
 
[COLOR=red yellow]Spot on, thank you all![/color]

If you're still curious mlowe9, I can now use this information to search against an SQL server table we have, to find out if the user is authorised to make changes on our databases before executing an SQL update query.
 
Whats really fun is using that to get your user's logged on name, then hitting Active Directory, getting there info and bvefore they've done anything but load the page already have half a form filled out, as well as listing their managers name/email/etc so it can be sent the correct route for approval :)
Sorry, couldn't resist adding my two cents, wrote an application recently that was doing crazy stuff integrating Active Directory, Exchange, my web app, purchasing, etc and it was a pain to write but was realy cool when I was done and half the form just magically filled in on first load.

-T

barcode_1.gif
 
I agreee with Tarwn...it's nice to populate the form from AD after LOGON is known...no manual mistakes/typo's and yes...too cool when form is populated with info already!


<%
Set strSysInfo = CreateObject("ADSystemInfo")
Set CrUser = GetObject("LDAP://" & strSysInfo.Username & "")
Set WShell = CreateObject("WScript.Shell")


strFirstName = CrUser.givenName
strLastName = CrUser.sn
strEmail = CrUser.mail
%>

BSL
 
Hi Tarwn,

I'm working on an Intranet where I work...I'd love to know more about how you are integrating Active Directory, Exchange, my web app, purchasing, etc. It sounds like great stuff!

Jambou
 
I got erreor message from the script (bslntx)
but only when I access page from other client, it works directly on the computer where app is running.

HTTP 500.100
 
yjaba123,
Are your domain controllers running Windows 2003? When we upgraded our DC's, my Active Directory query stopped working. I can make the query work if I make the IIS app run as an AD user, but then I cannot see the username of the person viewing the page. Has anyone found a work-around for this?

Error Type:
Provider (0x80040E09)
Permission denied.
/page.asp, line 579

AP
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top