0

I am using ASP .Net 3.5 and trying to invoke a WebService using javascript and Sys.Net.WebRequest.

The service gets invoked for the first time and everything is fine until I try to refresh.

on a refresh th WebRequest object invoke method is called but instead of invoking the service is jumps right to the callback function, as if it's using some cached results.

How should this be solved so on every refresh the service will be executed?

Thanks,

Wineshtain

Jonathan Feinberg
  • 44,698
  • 7
  • 80
  • 103
Ws.
  • 61
  • 1
  • 2
  • 6

1 Answers1

0

Try appending some random number as a parameter to the service URL so that id doesn't get cached.

Jan Hančič
  • 53,269
  • 16
  • 95
  • 99
  • This works, thanks. However is that the 'legit' solution? looks kindof 'ugly'. – Ws. Dec 07 '09 at 16:50
  • you could set the proper headers on the server if you have control over that. but this is the safest and bullet-proof solution – Jan Hančič Dec 07 '09 at 16:52