Geocoder not returning any address candidates from JavaScript API

Discussion created by garethmann on Nov 7, 2011
Latest reply on Nov 7, 2011 by jeff.pace
I have taken the sample code for geocoding that I found here:

And tried to get it to work with my own geocoder. The only code that I have changed is the URL to my geocoder service, and the default address in the textbox, I also added a message box to display the number of candidates returned (for debugging).

For some reason, when I try to use my geocoder service it returns 0 candidates:

Even though it does return plenty of candidates if I just call the geocode service from rest:

Any idea what the problem may be?

Could it be something to with some sort of caching? Because originally there was something wrong with the locator that i was using and I had to replace it with a new one. I have stopped and restarted the service and it is now working in the REST web interface but is still not working when called from the API.