cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Did you get called away in the middle of writing a post? Don't worry you can find your unfinished post later in the Drafts section of your profile page. X

Is there any way to see from what server ip or host name that a request was made from?

oskarberntorp
11-Garnet

Is there any way to see from what server ip or host name that a request was made from?

Hi,

I am doing a request in Thingworx to a server that denies the request. The server in question is configured to only accept requests from a particular server.

 

So my question is, is there any way to see in Thingworx the origin of the request made from Thingworx?

 

Kindly

 

Oskar Berntorp

1 ACCEPTED SOLUTION

Accepted Solutions
nmutter
14-Alexandrite
(To:oskarberntorp)

Yes, you can create a service with the following content and JSON result

result = Resources["ContentLoaderFunctions"].LoadJSON({url: "https://httpbin.org/ip"});

The server contacted will respond the callers ip. You can check yourself by visiting the url in the browser.

 

View solution in original post

3 REPLIES 3

Thingworx can't know about the network infrastructure between itself and the server receiving the request, so no, you can't see this in Thingworx.

It could be visible in the error message or in the error log of the remote server.

nmutter
14-Alexandrite
(To:oskarberntorp)

Yes, you can create a service with the following content and JSON result

result = Resources["ContentLoaderFunctions"].LoadJSON({url: "https://httpbin.org/ip"});

The server contacted will respond the callers ip. You can check yourself by visiting the url in the browser.

 

nmutter
14-Alexandrite
(To:nmutter)

Additional hint: the solution I presented only shows the IP which is used to contact the server (which in this case is in the internet). If your destination server is in your local network the hint will not work.

Top Tags