1
我们目前在IIS 6中托管一个asp.net mvc 2网站。在此应用程序中,我们重写'创建控制器'方法并配置一个自定义视图引擎。该引擎根据url格式指定视图的位置。例如;如果用户登录www.asite.com/test/1.0/index.aspx ,视图引擎会告诉mvc在'sitedirectory/test/1.0/views/pages /'目录中查找index.aspx;MVC中的页面加载不正确
string versionDirectory = String.Format("~/{0}/{1}", offerCode, version.ToString("#0.0000"));
ViewLocationFormats = new[]
{
versionDirectory + "/Views/Pages/{0}.aspx",
versionDirectory + "/Views/Pages/{0}.ascx",
"~/Views/Pages/{0}.aspx",
"~/Views/Pages/{0}.ascx",
"~/Shared/Views/{0}.aspx",
"~/Shared/Views/{0}.ascx"
};
MasterLocationFormats = new[]
{
versionDirectory + "/Views/Layouts/{0}.master",
"~/Views/Layouts/{0}.master"
};
PartialViewLocationFormats = ViewLocationFormats;
,我们遇到的问题是,当两个或多个用户在网站上降落在大致相同的时间, 即得到加载的意见,可以绕过切换。但是,这些视图显示的数据是正确的。
有没有人有任何想法,为什么会发生这种情况?