0
我有如果用戶得到正確註冊,我重定向他到應用程序的主頁系統上RedirectToAction掛不重定向
return RedirectToAction("Index", "Home");
在我的應用程序
[HttpPost]
public virtual ActionResult Register(RegisterModel model) {
if (!ModelState.IsValid) {
//Invalid - redisplay form with errors
return View(model);
}
try {
MembershipUser mu = _manager.RegisterUser(model);
//Send confirmation email here
}
catch (RegistrationException rex) {
ModelState.AddModelError("", rex.Message);
}
return RedirectToAction("Index", "Home");
}
註冊用戶下面的代碼
我有這個代碼工作在我的開發箱和我的登臺服務器。但是,當我將它發佈到可通過互聯網訪問的生產服務器上時,它會在發送電子郵件後掛上最後一次呼叫,而不會重定向用戶。
有什麼想法?
當你說它掛起,你的意思是線程掛起或用戶體驗是一個地方郵件被髮送,但他們沒有看到重定向? – 2010-12-02 13:39:33