Home » Developer & Programmer » Forms » Pick session IP address in Web mode (Forms 10g)
Pick session IP address in Web mode [message #660720] Sat, 25 February 2017 04:49 Go to next message
chat2raj.s
Messages: 108
Registered: October 2010
Location: Chennai, India
Senior Member
How can i log (audit) the local computer name and IP address of each user, who is using a particular form in WEB mode. Some existing code actually retrieves the ip address of the application server and with this am unable to identify who is the actual user of that session.
Re: Pick session IP address in Web mode [message #660722 is a reply to message #660720] Sat, 25 February 2017 06:23 Go to previous messageGo to next message
BlackSwan
Messages: 26076
Registered: January 2009
Location: SoCal
Senior Member
chat2raj.s wrote on Sat, 25 February 2017 02:49
How can i log (audit) the local computer name and IP address of each user, who is using a particular form in WEB mode. Some existing code actually retrieves the ip address of the application server and with this am unable to identify who is the actual user of that session.
Code that runs on application server must be changed to obtain IP# of web client & then write it to logfile.
Re: Pick session IP address in Web mode [message #660730 is a reply to message #660722] Sun, 26 February 2017 00:34 Go to previous messageGo to next message
chat2raj.s
Messages: 108
Registered: October 2010
Location: Chennai, India
Senior Member
Let me try using the following way and feedback. Need to install webutil.pll to compile this.
  IF GET_APPLICATION_PROPERTY(USER_INTERFACE) = 'WEB' THEN
  	M_CLIENT_HOST := WEBUTIL_CLIENTINFO.GET_HOST_NAME;
  	M_CLIENT_IP   := WEBUTIL_CLIENTINFO.GET_IP_ADDRESS;
  END IF;
Re: Pick session IP address in Web mode [message #660746 is a reply to message #660730] Sun, 26 February 2017 02:06 Go to previous messageGo to next message
Michel Cadot
Messages: 65634
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator

Thanks for sharing the idea, let us know if you succeed with it.

Re: Pick session IP address in Web mode [message #666556 is a reply to message #660746] Mon, 13 November 2017 01:59 Go to previous messageGo to next message
chat2raj.s
Messages: 108
Registered: October 2010
Location: Chennai, India
Senior Member
Even though Webutil configuration is done and able to successfully compile the script mentioned above, the output is just NULL for Host and IP. Any help on this ?
Re: Pick session IP address in Web mode [message #666558 is a reply to message #666556] Mon, 13 November 2017 06:47 Go to previous messageGo to next message
Littlefoot
Messages: 21425
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Remove IF and try again. Maybe GET_APPLICATION_PROPERTY(USER_INTERFACE) doesn't return WEB at all.
Re: Pick session IP address in Web mode [message #668812 is a reply to message #666558] Thu, 15 March 2018 05:58 Go to previous message
chat2raj.s
Messages: 108
Registered: October 2010
Location: Chennai, India
Senior Member
In forms 10g version after subclassing WEBUTIL.OLB and writting the below code in a Button, it worked fine.
I tried initially in Pre-form which was throwing some errors, but inside a button click it is perfect.

IF GET_APPLICATION_PROPERTY(USER_INTERFACE) = 'WEB' THEN
   M_CLIENT_HOST := WEBUTIL_CLIENTINFO.GET_HOST_NAME;
   M_CLIENT_IP   := WEBUTIL_CLIENTINFO.GET_IP_ADDRESS;
END IF;
Previous Topic: send sms from smsCaster from website on local host
Next Topic: set_menu_item_property error in 12c - FRM41068
Goto Forum:
  


Current Time: Tue Aug 14 18:08:36 CDT 2018