Problem creating a web request in Silverlight

I make reassuring requests in my silverlight application, I want to get information that can be transferred to the page, so I constantly make a request for 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, when I make a request (and it returns some data), subsequent requests continue to return the same data and do not change! (almost the same as caching the request and saying it, I did it already, let me just return what I got earlier), when I copy the URL and put it in my browser, I get the expected behavior, why is it happens when i make requests through a silverlight application? Thanks for your help Daniel

+3
source share
1 answer

This seems to be a known issue.

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

What he recommends for work is to put some random unused parameter at the end of the URI to provide a unique URI for each request.

+4
source

Source: https://habr.com/ru/post/1721520/


All Articles