Is Detect IP Address of Thin Client User Possible?

The 1C:Enterprise developers forum

#1
People who like this:0Yes/0No
Just came
Rating: 1
Joined: Sep 17, 2018
Company: Adinsoft

Hi all,
I'm new here and if topic is duplicated i m sorry.

Is there a chance to detect ip address when user login to thin client?
I can get public IP via HTTPConnection with some services but i need local IP address.

Thank you in advance.

 
#2
People who like this:0Yes/0No
Active user
Rating: 5
Joined: Mar 29, 2016
Company: DND YAZILIM LTD.

Hi Ugur,

I think this code helps for you.

Function GetIP()
fResult = "";
ResponseFile = GetTempFileName("json");        
Try
HTTP = New HTTPConnection("api.ipify.org",,,,,,New OpenSSLSecureConnection());
HTTP.Get("/?format=json", ResponseFile);
Except
pError = BriefErrorDescription(ErrorInfo());
fResult = pError;
Return fResult;
EndTry;

JSONReader = New JSONReader;
JSONReader.OpenFile(ResponseFile);
Data = ReadJSON(JSONReader);
JSONReader.Close();
fResult = Data.ip;
BeginDeletingFiles(, ResponseFile);
Return fResult;
EndFunction

 
#3
People who like this:0Yes/0No
Just came
Rating: 1
Joined: Sep 17, 2018
Company: Adinsoft

Hi,

Yes this code might help but if client inside an intranet, it can't get local ip address. To find local IP I need to find / write an extarnal script on any programming language. So, as i understand there is no native solution inside 1C platform but many thanks for your help.

 
Subscribe
Users browsing this topic (guests: 1, registered: 0, hidden: 0)
Be the first to know tips & tricks on business application development!

A confirmation e-mail has been sent to the e-mail address you provided .

Click the link in the e-mail to confirm and activate the subscription.