<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: requestip does not work in ArcGIS Online Developers Questions</title>
    <link>https://community.esri.com/t5/arcgis-online-developers-questions/requestip-does-not-work/m-p/338957#M406</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Richard, are you sure that see IP correct? Peraphs in request token arcgisonline see an IP and in check token see another ip.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 21 Oct 2013 09:28:10 GMT</pubDate>
    <dc:creator>nicogis</dc:creator>
    <dc:date>2013-10-21T09:28:10Z</dc:date>
    <item>
      <title>requestip does not work</title>
      <link>https://community.esri.com/t5/arcgis-online-developers-questions/requestip-does-not-work/m-p/338956#M405</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I have an application that uses ArcGIS Online programmatically.&amp;nbsp; This means that it needs to generate tokens.&amp;nbsp; There are 2 ways that I do that.&amp;nbsp; The first way is using OAuth2 when I have the ability to interact with the user.&amp;nbsp; The second way is provide the username and password myself and I use this technique when doing integration testing.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Last week, I noticed that one of my tests was failing.&amp;nbsp; The failure occurred when ArcGIS Online returned an error message that my token was invalid.&amp;nbsp; That made no sense to me because there is no way that it could have expired because it was generated when the test started.&amp;nbsp; Using Fiddler, I finally figured out that the failure occurs when the server responding to the request changes.&amp;nbsp; You can see that by looking at the request properties (via the context menu).&amp;nbsp; That was insightful.&amp;nbsp; I believe that the problem was that the other server did not believe that the sender was correct.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;When I generated the token, I told ArcGIS Online that the referer was "requestip".&amp;nbsp; That meant that it was supposed to figure out my IP address.&amp;nbsp; The token worked fine so long as the responding server did not change.&amp;nbsp; In this case I was polling using a status request waiting for some asynchronous action to complete.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The way that I resolved this problem was to abandon using requestip and used some random website URL as the referer.&amp;nbsp; I have a centralized class that creates an HttpClient for me so now it generates one that always has this information in the header.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The bottom line here is that you should not use requestip in conjunction with ArcGIS Online.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 20 Oct 2013 10:51:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-developers-questions/requestip-does-not-work/m-p/338956#M405</guid>
      <dc:creator>RichardWatson</dc:creator>
      <dc:date>2013-10-20T10:51:56Z</dc:date>
    </item>
    <item>
      <title>Re: requestip does not work</title>
      <link>https://community.esri.com/t5/arcgis-online-developers-questions/requestip-does-not-work/m-p/338957#M406</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Richard, are you sure that see IP correct? Peraphs in request token arcgisonline see an IP and in check token see another ip.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Oct 2013 09:28:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-developers-questions/requestip-does-not-work/m-p/338957#M406</guid>
      <dc:creator>nicogis</dc:creator>
      <dc:date>2013-10-21T09:28:10Z</dc:date>
    </item>
    <item>
      <title>Re: requestip does not work</title>
      <link>https://community.esri.com/t5/arcgis-online-developers-questions/requestip-does-not-work/m-p/338958#M407</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I do know that my IP address is private, i.e. not fixed but privately assigned, as would be the case for most of the world.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Here is an example of the FLAGS, as seen by Fiddler, used when communicating with ArcGIS Online:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;SESSION STATE: Done.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Response Entity Size: 8482 bytes.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;== FLAGS ==================&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;BitFlags: [ClientPipeReused, ServerPipeReused, LoadedFromSAZ] 0x218&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;X-EGRESSPORT: 50266&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;X-RESPONSEBODYTRANSFERLENGTH: 8482&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;X-CLIENTPORT: 50265&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;X-CLIENTIP: 127.0.0.1&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;X-SERVERSOCKET: REUSE ServerPipe#6&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;X-HOSTIP: 50.19.238.218&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;X-PROCESSINFO: arcmap:9028&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;UI-COMMENTS: [#10] &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I believe that this says that my address is 127.0.0.1 (which I believe is localhost/loopback) and that the server address is 50.19.238.218.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;requestip should get my IP address, which is typically not very unique because of the above.&amp;nbsp; What I don't understand is why one server would see one thing and another see something different.&amp;nbsp; Perhaps ESRI is also looking at other information if the address is the loopback address?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Oct 2013 10:20:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-developers-questions/requestip-does-not-work/m-p/338958#M407</guid>
      <dc:creator>RichardWatson</dc:creator>
      <dc:date>2013-10-21T10:20:25Z</dc:date>
    </item>
    <item>
      <title>Re: requestip does not work</title>
      <link>https://community.esri.com/t5/arcgis-online-developers-questions/requestip-does-not-work/m-p/338959#M408</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;see this &lt;/SPAN&gt;&lt;A href="http://stackoverflow.com/questions/9726576/system-web-httpcontext-current-request-userhostaddress"&gt;http://stackoverflow.com/questions/9726576/system-web-httpcontext-current-request-userhostaddress&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Oct 2013 14:27:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-developers-questions/requestip-does-not-work/m-p/338959#M408</guid>
      <dc:creator>nicogis</dc:creator>
      <dc:date>2013-10-21T14:27:53Z</dc:date>
    </item>
    <item>
      <title>Re: requestip does not work</title>
      <link>https://community.esri.com/t5/arcgis-online-developers-questions/requestip-does-not-work/m-p/338960#M409</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Domenico,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for the reply.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I suspect that I missing the point that you are making here.&amp;nbsp; I do understand that there are a number of 'tricks' that developers use in order to try and find the real IP address of the client.&amp;nbsp; I think that the additional security checks by ArcGIS are actually not very useful because any request can send anything so it is not very difficult to lie.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In my case, I simply told ArcGIS Online to use my IP address.&amp;nbsp; That worked until the server (which is part of ArcGIS Online and not an on premise server) changed (which is beyond my control).&amp;nbsp; This seems to tell me that you cannot reliably use requestip in conjunction with ArcGIS Online.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Do you agree or am I missing something here?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Oct 2013 20:26:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-developers-questions/requestip-does-not-work/m-p/338960#M409</guid>
      <dc:creator>RichardWatson</dc:creator>
      <dc:date>2013-10-21T20:26:21Z</dc:date>
    </item>
  </channel>
</rss>

