My Silverlight4 application is hosted in an ASP.NET MVC 2 web application. I make a web request through the HttpWebRequest class, but it returns the result previously cached. How to disable this caching behavior? There are a few links that talk about HttpWebRequest in .NET, but Silverlight HttpWebrequest is different. Someone suggested adding a unique dummy query string for each web request, but I would prefer a more elegant solution. I also tried the following, but this did not work:
_myHttpWebRequest.BeginGetRequestStream(new AsyncCallback(BeginRequest), new Guid());
In fact, by setting your browser history settings, you can disable caching. See the following link: ASP.NET MVC with SQL Server backend returns old data when executing a query But asking a user to change browser settings is not an option for me.
source share