Click here to Skip to main content
15,912,837 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
web service return old values every time

on server when i upload service 1st time then return correct value but when i cal second time with change then also Return old value....!

how it possible?...

plz help me....
Posted
Comments
Dholakiya Ankit 6-Aug-13 1:04am    
code of ur webservice?
chetan2020 6-Aug-13 1:06am    
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.Text;
using System.Data;

namespace WcfService1
{
// NOTE: If you change the class name "Service1" here, you must also update the reference to "Service1" in Web.config and in the associated .svc file.
public class Service1 : IService1
{
public string GetData(int value)
{
return DateTime.Now.ToString();
}


}
}
Bernhard Hiller 6-Aug-13 4:22am    
How do you call that function - via browser, code?
What about caching of results in the browser?
Or caching issues on the server?

1 solution

when you're consuming the service in the client code, make ensure you call the client.GetDataCompleted event then call the client.GetDataAsync() to get the latest
values from the webservice.

you may want to remove unused function parameters also. helps a great deal
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900