Select to view content in your preferred language

URGENT

1145
1
09-10-2012 06:25 AM
TubaKumbara
Regular Contributor
Hello,
I have a collection of points.
And I want to get the addresses of these points via my addresslocator task on ArcGIS Server.

in a loop I am calling the locationToAddressAsync method.
But it gives error "Task doesn't support concurrent I/O operaations..............."
What should I do?
I want to know that what index of point in the collection I am trying to get the address?

addhandler task.locationtoAddressCompleted, addressof Y

for i as integer = 1 to PointsCollection.count

task.locationtoAddressAsync( pointscollection(i) )

next

in method Y how can I understand the the index of that point in the colletion..
And I also want to say that I am writing in VB.NET.
There is something different in C# I think
0 Kudos
1 Reply
TerryGiles
Frequent Contributor
I am calling the locationToAddressAsync method.
But it gives error "Task doesn't support concurrent I/O operaations..............."
What should I do?


You will either need to create a new instance of the Locator class for each address or wait until the LocationtoAddressAsync completes before making your next request to the task.

in method Y how can I understand the the index of that point in the colletion

When you calll LocationtoAddressAsync used the overload that allows you to pass in an object.  You can then access it via the UserState property of the AddressEventArgs in method Y. See - http://resources.arcgis.com/en/help/silverlight-api/apiref/ESRI.ArcGIS.Client~ESRI.ArcGIS.Client.Tas...
0 Kudos