bing tiles no longer working

Aug 15, 2009 at 12:42 PM
Edited Aug 15, 2009 at 2:46 PM

for some time I've batteled an issue where on some user machines the ve tiles would never show - yahoo and osm always worked.

I finally put some debugging in and got the following out of fiddler, makes no sense why i'd see this on some machines and not others

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"><s:Body><s:Fault><faultcode xmlns:a="http://schemas.microsoft.com/net/2005/12/windowscommunicationfoundation/dispatcher">a:InternalServiceFault</faultcode><faultstring xml:lang="en-US">Unable to cast object of type 'System.Web.Services.Protocols.WebClientAsyncResult' to type 'CompletedAsyncResult'.</faultstring><detail><ExceptionDetail xmlns="http://schemas.datacontract.org/2004/07/System.ServiceModel" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><HelpLink i:nil="true"/><InnerException i:nil="true"/><Message>Unable to cast object of type 'System.Web.Services.Protocols.WebClientAsyncResult' to type 'CompletedAsyncResult'.</Message><StackTrace>   at DeepEarth.Provider.VirtualEarth.Services.TokenService.EndGetToken(IAsyncResult asyncResult) in C:\RoadWarrior\Code\Silverlight\DeepEarth\DeepEarth.Provider.VirtualEarth.Services\TokenService.cs:line 79&#xD;

   at AsyncInvokeEndEndGetToken(Object , Object[] , IAsyncResult )&#xD;

   at System.ServiceModel.Dispatcher.AsyncMethodInvoker.InvokeEnd(Object instance, Object[]&amp; outputs, IAsyncResult result)&#xD;

   at System.ServiceModel.Dispatcher.DispatchOperationRuntime.InvokeEnd(MessageRpc&amp; rpc)&#xD;

   at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage7(MessageRpc&amp; rpc)&#xD;

   at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage6(MessageRpc&amp; rpc)&#xD;

   at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage5(MessageRpc&amp; rpc)&#xD;

   at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage4(MessageRpc&amp; rpc)&#xD;

   at System.ServiceModel.Dispatcher.MessageRpc.Process(Boolean isOperationContextSet)</StackTrace><Type>System.InvalidCastException</Type></ExceptionDetail></detail></s:Fault></s:Body></s:Envelope>

More info - at this point I am growing very desperate to get this working again. I wish I knew what changed that suddenly this is issue. *I think it was from a few days ago when I messed with SSL.
Anyway if I go to a machine where the VE tiles come up and I clear isolated storage and browser cache then refresh the application then bye-bye VE tiles. 
So IMO any machine where my application is running now  is only running because of a previous entry in isolated storage.

What is really frustrating is the code on the client side always works - it is only the code when deployed to our web server do I experience this problem. 

 

 

Coordinator
Aug 16, 2009 at 1:24 AM

Does your SSL/HTTPS tile requests from Bing actually work?

If you want to get this running quickly why not create a new tile provider and hard code the full path (with replacements for quadkey/server) to the SSL tiles. There will be no ISO issues (that is only setup on the VE provider). I would restore the current Virtual Earth provider to the released version as you know that works.

Use fiddler to ensure that you're actually making the requests. If you're testing locally you need to add another dot to the URL for fiddler to work: eg http://localhost.:1200

Aug 16, 2009 at 1:47 AM
Edited Aug 16, 2009 at 2:39 AM

At this point I have abandoned all the SSL attempts and put everything back to where it was (no port 443, SSL no HTTPS settings of any kind).

When I run locally I am fine - when I run it from my server I get the error TokenService.cs EndGetToken ... worst of it is I cannot figure out a way to debug this.
I saw a few other threads referencing a same problem as this but no solutions. If I get a handle on this I'll revisit the use of SSL.
Forgot to mention, I am back to using the release build of the DeepEarth DLLs I had in place before. 

I only started seeing this issue when I cleared my client machines isolated storage. 
After that I noticed any machine clearing its Silverlight IsolatedStorage started to experience this same issue.
More info...
I found this information listed by you in a previous post - We have also put in logic to save a valid tileset info and your last working token to the Isolated storage. If you change between staging and production, right click on the application, silverlight settings and delete the storage for the application to refresh this. What we have done is to speed up startup and allow the control to work momentarily if your disconnected.
What this tells me is that I've been working from a cached token all this time and then this morning when I deleted Isolated Storage I deleted that token. So I am thinking at some time in the past no more tokens were being issued and anyone new who did not have one cached would fail; and now i am one of those in the lot.
To investigate further how do I test better the token - only error I have to go on is the Unable to cast object of type 'System.Web.Services.Protocols.WebClientAsyncResult' to type 'CompletedAsyncResult'.</Message><StackTrace>   at DeepEarth.Provider.VirtualEarth.Services.TokenService.EndGetToken(IAsyncResult asyncResult) in C:\RoadWarrior\Code\Silverlight\DeepEarth\DeepEarth.Provider.VirtualEarth.Services\TokenService.cs:line 79&#xD;
thanx