Error: 1022: Invalid token
When attempting to use an ArcWeb Service, the following error may occur:
"1022: Invalid token. The authentication token's IP address must match the requesting computer's IP address."
Error 1022 occurs if one IP address is used to request a token from the Authentication Web Service and a different IP address is used to send the token to an ArcWeb Service.
Solution or Workaround
There are two possible causes, each with its own solution:
- The Authentication Web Service generates a token based on the IP of the computer making the request. Generate the token on the same computer where the token is used.
- Some proxy servers use different IPs for http and https. If using a proxy server and the same computer to make a request for a token, by way of Authentication and https, and sending the token to another ArcWeb Service, by way of http, it is probable different IP addresses are used. Two options are available:
- Change the proxy server settings to always use the same IP
- Change the code to always use https, even when making requests to ArcWeb Services other than Authentication.
- v2006 and v2006.1 additional solution Use WS-Security for authentication instead of Authentication Web Service.