views:

29

answers:

3

Here's the problemo:

My Silverlight application is calling a HTTP web service, using WebClient, called getCampaigns which returns a JSON array of data for Campaign objects. The user can then interact with the requested objects, modifying them, removing them, etc. When the user removes a campaign, Silverlight calls another web service, which flags the object in the database so it won't be returned in the future, and then refreshes the page by calling getCampaigns. The problem is the removed campaign still shows up.

If I check the database, the campaign truly has been disabled, and if I close the Silverlight application and restart it, the campaign doesn't appear. It appears that Silverlight is caching the web service call. But each time the call is made a new WebClient object is instantiated.

Any ideas?

A: 

There is no cache of web service calls. You probably have a problem in your refresh method.

Spilarix
Perhaps. But the refresh method is called when the app first loads, and reloading the app loads the correct info from the database. I am perplexed.
Quenton Jones
Quenton Jones
A: 

I uploaded the application to my server, the same server where the web services are held, and everything is working fine. If I have time (which I probably won't), I might dig around and try and see what the difference was, but for now I'm just going to accept that it works.

Quenton Jones
Grr..I found the problem. It's Internet Explorer. (Strange, considering that Microsoft makes both products.) Only when I run the application inside IE does the web service not update properly.
Quenton Jones
A: 

https://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=340931&wa=wsignin1.0

Two workarounds are given. I'm appending a Guid to my Url, so each web service call is completed using a unique Url.

Quenton Jones