|
Shane, If you are running this application thru WDSC, you will receive the 127.0.0.1 as the return IP address. If you deploy this application to a WAS server on your iSeries, you will get the 10.69.4.25. Nick W. Mart Programmer Analyst Solutions, Inc. 2311 West 18th Street PO Box 857 Spencer, IA 51301 712-262-4520 ext. 33 -----Original Message----- From: web400-bounces@xxxxxxxxxxxx [mailto:web400-bounces@xxxxxxxxxxxx] On Behalf Of Shane_Cessna@xxxxxxx Sent: Monday, August 08, 2005 8:42 AM To: Web Enabling the AS400 / iSeries Subject: RE: [WEB400] webfacing & IP address... Nick, Thanks for the reply and the code...I tried it out and it didn't work for me... It showed my IP address as 127.0.0.1...however I did an "ipconfig" in a dos prompt and it showed my IP address as 10.69.4.25... do I need to do something to my HTTP server config to get this to work? Shane "Nick Mart" <nick@xxxxxxxxxxxxxxxx> Sent by: web400-bounces@xxxxxxxxxxxx 08/08/2005 08:09 AM Please respond to Web Enabling the AS400 / iSeries <web400@xxxxxxxxxxxx> To "'Web Enabling the AS400 / iSeries'" <web400@xxxxxxxxxxxx> cc Subject RE: [WEB400] webfacing & IP address... Shane, We had a need for IP address as well. Here is an example that we used for this. This source was shared by Wilfried Blankertz. He is one of the authors of the Mastering the IBM WebFacing Tool Redbook. CLIENTIPF Display File A*%%TS DD 20050804 083715 nick REL-V5.0.1 WDSc A************************************************************************** A*%%EC A DSPSIZ(24 80 *DS3) A CHGINPDFT A INDARA A CF03(03 'exit') A R F01 A*%%TS DD 20050804 083549 nick REL-V5.0.1 WDSc A CLIENTIP 15A H A*%%WB 19 FLD A 2 3'Remote IPAdr' A DSPATR(HI) A TEXT1 512A B 4 3CNTFLD(64) A COLOR(BLU) A DSPATR(UL) A CHECK(LC) A 13 3'F3=Exit' A*%%GP SCREEN1 01 A*%%WB 18 REC 1 &{CLIENTIP}.value ="<%=request.getRemoteAddr() %>"; CLIENTIPR RPGLE Program H Dftactgrp(*NO) H Actgrp(*Caller) //************************************************************************* FclientIPF CF E WORKSTN USROPN f infds(wsinfds) d/copy standard/qsrc,cpywsinfds DQcmdExc pr ExtPgm('QCMDEXC') D CmdString 3000 Options(*Varsize) D Const D CmdLength 15P 5 Const D CmdOpt 3 Options(*NoPass) D Const D CmdString S 1024 /Free ... 1 ...+... 2 ...+... 3 ...+... 4 ...+... 5 ...+... 6 ...+... 7 ... open clientIPF; write f01; clear CmdString; clear Text1; Text1 = 'Show Remote IP-Address pl. hit Enter...'; clear clientIP; // webfacing runtime fills this field dow (not *in03); Exfmt F01; if clientIp <> ' ' ; // via TCP/IP Sockets CmdString = 'ping ' + '''' + clientIp + ''' ' ; Text1 = CmdString; QcmdExc( CmdString : %Len(CmdString)); else; Text1 = 'Sorry.. i am not in Webfacing-Session....... '; endif; enddo; CLOSE clientIPF; RETURN; /End-Free Nick W. Mart Programmer Analyst Solutions, Inc. 2311 West 18th Street PO Box 857 Spencer, IA 51301 712-262-4520 ext. 33 -----Original Message----- From: web400-bounces@xxxxxxxxxxxx [mailto:web400-bounces@xxxxxxxxxxxx] On Behalf Of Shane_Cessna@xxxxxxx Sent: Monday, August 08, 2005 7:43 AM To: WEB400@xxxxxxxxxxxx Subject: [WEB400] webfacing & IP address... Does anyone know if it's possible to obtain the IP address of a client running a webfaced application?...if so, how might I go about capturing this? Shane
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.