I have two load balanced servers running my mapping application and I am attempting to retrieve my tokens for a secure service dynamically. Any maps from non-secure services are retrieved just fine. However, when I try to retrieve maps from the secure service, I get a "The remote server returned an error: (500) Internal Server Error."
I am using a proxy to request the token and it fails on the following line when trying to get the token from the token service:
I posted this here because I am using the JS API but need to post under REST API. I am going to stand up my app on a non load balanced server to see if that is the issue but that is not where it can run long term.
Ok, so i stood up my app on a non-load balanced server and it is retrieving the token dynamically just fine and returning a image from the secure service.
Anybody have any thoughts as to what the issue may be with the load balanced scenario?
can you wrap the get response line in a try/catch to catch the webexception? although it's returning 500, the web exception may have more information about what's really happening (404, 401, 407, etc.)
Thanks Adam, it is in a try/catch but I am just catching a general Exception and that is the error that is being thrown which is useless. I will catching a WebException first and see what I get.
Well, for now, this thing has started working. I didn't really do anything. It is retrieving the token just fine and getting the image from the service. Wish I knew what was going on.