I am working with the 10.1 print task and I get some odd results. The problem is that when I send maps to the server, the returned output would be a map that I had previously sent. It is as if it cycles through all the previous maps -- I had to keep clicking the export map button until I got to the correct output.
I checked the json with fiddler, and it is for the current display on the screen. But when the pdf shows up, it is a previous map. Is there a way to clear out the old json before starting the new map?
Does anybody have any ideas?
I am using Silverlight 4, api 3.0, ArcGIS 10.1 and VS 2010
I found that this solution overcame the client cache problem:
private void printTask_PrintCompleted(object sender, PrintEventArgs e) { //open exported map in new browser window Random random = new Random(); Uri u = new Uri(e.PrintResult.Url + "?Unused=" + random.Next().ToString()); System.Windows.Browser.HtmlPage.Window.Navigate(u, "_blank"); }
Yes, I disabled the client caching. I have found that it only seems to do this from my computer and not the clients, both in debugging and production versions.
Yes, I disabled the client caching. I have found that it only seems to do this from my computer and not the clients, both in debugging and production versions.
Chris
Do you get the same results if you try a local print, i.e. remove your url to the print task?
I found that this solution overcame the client cache problem:
private void printTask_PrintCompleted(object sender, PrintEventArgs e) { //open exported map in new browser window Random random = new Random(); Uri u = new Uri(e.PrintResult.Url + "?Unused=" + random.Next().ToString()); System.Windows.Browser.HtmlPage.Window.Navigate(u, "_blank"); }