服务器和我的电脑都是win2003,在我的机子上测试时都正常的,
但在服务器上时自己的主页中文章列表却是显示别人的的,
当时就怀疑是缓存没更新,但不知原因在什么地方。
刚才加了段测试代码
1
public
override
string
GetVaryByCustomString(HttpContext context,
string
custom)
2 {
3 if (custom == " Blogger " )
4 {
5 string r = Dottext.Framework.Configuration.Config.CurrentBlog(context).Application;
6 System.Web.HttpContext.Current.Response.Write( string .Format( " <!--{0}--> " ,r));
7 return r;
8 }
9 System.Web.HttpContext.Current.Response.Write( string .Format( " <!--cache{0}--> " ,System.DateTime.Now.ToLongTimeString()));
10 return base .GetVaryByCustomString(context,custom);
11
12 }
13
14
2 {
3 if (custom == " Blogger " )
4 {
5 string r = Dottext.Framework.Configuration.Config.CurrentBlog(context).Application;
6 System.Web.HttpContext.Current.Response.Write( string .Format( " <!--{0}--> " ,r));
7 return r;
8 }
9 System.Web.HttpContext.Current.Response.Write( string .Format( " <!--cache{0}--> " ,System.DateTime.Now.ToLongTimeString()));
10 return base .GetVaryByCustomString(context,custom);
11
12 }
13
14
在我的电脑上测试时用到缓存的页面都能打印出“<!--/blogerName/-->”,
但在服务器上却没有任何显示,证明在服务器上GetVaryByCustomString(HttpContext context, string custom)根本同工作!
求助解决办法。