3

I am making restful requests in my silverlight app, I want to get information that might be pushed to the page so i continously make the request to get the updated data, doing something like

.... 
Uri url = new Uri(theUrl);WebClient wc = new WebClient();  
wc.DownloadStringCompleted += RetreiveUserMessagesResponse;
wc.DownloadStringAsync(url);

My problem is, for some reason, once i make the request (and it returns some data) subsequent requests keep returning the same data and does not change! (almost like it cached the request and its saying, i did this already let me just return what i got before), when i copy the URL and put it in my browser I get the expected behavior, why is this happening when i am making the requests through the Silverlight app? Thanks for your help Daniel

3
  • What kind of URL is it? Where is it hosted? I'm not able to duplicate this issue using an ASPX page that outputs the time onto the page and running on the visual studio dev web server. Commented Oct 30, 2009 at 17:20
  • Its hosted on a remote s erver, its just a url that looks like ipaddress:port/Service1.svc/MethodsName?arg1=1&arg2=2 etc Commented Oct 30, 2009 at 17:31
  • The web client should get the new data unless there is some kind of caching being done on the server. If you post the actual url we could try testing it to see. Commented Oct 30, 2009 at 18:47

1 Answer 1

4

Looks like this is a known issue.

http://forums.silverlight.net/forums/p/14453/70533.aspx

What it recommends for a work around is putting some random, unused parameter at the end of the URI to ensure a unique URI on each request.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.