前段时间把DOTTEXT部署到服务器上好遇到一个奇怪的问题。

服务器和我的电脑都是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 

在我的电脑上测试时用到缓存的页面都能打印出“<!--/blogerName/-->”,
但在服务器上却没有任何显示,证明在服务器上GetVaryByCustomString(HttpContext context, string custom)根本同工作!

求助解决办法。

相关文章:

  • 2021-09-30
猜你喜欢
  • 2022-12-23
  • 2021-11-06
  • 2021-09-01
  • 2021-05-14
  • 2021-09-04
  • 2021-12-04
  • 2021-11-27
相关资源
相似解决方案