Get LAN ID of intranet user by SQL

Niall Gallagher
Niall Gallagher used Ask the Experts™
on
We are using an older Rainbow Portal Intranet site at work which allows users to sign in (For certain permissions) or use without signing in to use default permissions.

We have set up a page which ALL associates must read. So we want to log the users name or LAN ID when they open the page, The site has a log built in , it logs the date, time, user name (which is always blank), what page they looked at and length of time they were there. This gives us everything we need except assoc name.

Is there away I can get the LAN name of the user if they have not signed into the site in the Stored Procedure.
If you have any questions I will try to answer, but trying to put code in the HTML of the site would be very difficult if possible
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Most Valuable Expert 2012
Distinguished Expert 2018

Commented:
Since it is the web server that is likely connecting to the database, unless that passes the information to the database server I don't think you can get the end user information.

If you think about it, it seems impossible and pretty dangerous:  You want the database server to reach out to the end user's browser to retrieve information about the machine.
Niall GallagherDeveloper

Author

Commented:
I never really thought of it that way and you are right that would be pretty dangerous. Oh but sorry something I forgot to put in the list of thing in the report. It returns the IP address they used. So can I query AD for who is signed on to that IP address, and/or would it use too many resources to run instantly
Most Valuable Expert 2012
Distinguished Expert 2018

Commented:
If you have the client IP address, I would think a call out to AD should be pretty quick.  It would all depend on your systems and number of simultaneous users accessing the website.
nociSoftware Engineer
Distinguished Expert 2018

Commented:
One note: You will need to do the call out at the moment the access is done.
In most networks DHCP is used and that change for the IP address for users in many cases.
Niall GallagherDeveloper

Author

Commented:
Yeah, I was thinking of doing the query to AD at the same time as the record is entered but honestly I'm not sure which way to do it

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial