A
archana
hi all.
I am having one web service in c#.net where in i am using
cacheduration.
I have one property as below:
[WebMethod(EnableSession=true, CacheDuration=20)]
get
{
return Application["MyServiceUsage"].ToString();
}
[WebMethod(EnableSession=true, CacheDuration=20)]
set
{
if (Application["MyServiceUsage"] == null)
{
Application["MyServiceUsage"] = value +
DateTime.Now.Minute.ToString(); ;
}
}
So what i am expecting that after each 20 second it should clear cache
and set new value.
But when i run web service every time it is showing me first value only
and not updating value of variable with is tehre in application.
Can some one help me in this issue,
If i am wrong in this logic please correct me.
Thanks in advance.
I am having one web service in c#.net where in i am using
cacheduration.
I have one property as below:
[WebMethod(EnableSession=true, CacheDuration=20)]
get
{
return Application["MyServiceUsage"].ToString();
}
[WebMethod(EnableSession=true, CacheDuration=20)]
set
{
if (Application["MyServiceUsage"] == null)
{
Application["MyServiceUsage"] = value +
DateTime.Now.Minute.ToString(); ;
}
}
So what i am expecting that after each 20 second it should clear cache
and set new value.
But when i run web service every time it is showing me first value only
and not updating value of variable with is tehre in application.
Can some one help me in this issue,
If i am wrong in this logic please correct me.
Thanks in advance.