暂存服务器和生产服务器之间的所有版本都相同,但在生产服务器(64位,但以32位模式运行应用程序)中,我在以下控制器操作中获得超时:
[AcceptVerbs(HttpVerbs.Post)]
public ActionResult Create(Person person, PeopleCertificationLevel peopleCertificationLevel, Address address)
{
try
{
person.PeopleCertificationLevels.Add(peopleCertificationLevel);
person.Addresses.Add(address);
_peopleService.SavePerson(person);
SetMessage("O marÃtimo foi registado com sucesso.");
return Redirect("~/People/Show/" + person.ID);
}
catch
{
SetErrorMessage("Por favor valide e preencha devidamente os campos assinalados a asterisco (*).");
Create();
return View(person);
}
}
我已经尝试在try块之前抛出一个异常,但是我总是在这里得到一个请求超时。
在我看来,这个请求并没有达到这个目的。关于我应该如何调试它或者我应该做什么有什么建议吗?
更新:
我想这与模型绑定有关。如果我删除绑定,请求将被快速调度。但是,我尝试了几种方法,例如在操作参数之前使用Bind属性,尝试创建包含3个属性(Person、PeopleCertificationLevel、Address)的NewPersonForm类,甚至尝试使用FormCollection和UpdateModel调用。都没有用。
此应用程序以32位编译,并在64位环境中运行。虽然AppPool中启用了32位应用程序,但我怀疑这可能是导致问题的原因。