我们在部署MVC应用程序到IIS7服务器时发现了问题:任何路由导航都会出现404错误。我在网上发现,可以通过将应用程序池托管管道模式设置为集成来解决问题,但现在我们遇到了异常:
Request is not available in this context
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Web.HttpException: Request is not available in this context
Source Error:
Line 19:
Line 20: public override void SetActiveUser(Guid userOid) {
Line 21: FormsAuthentication.SignOut();
Line 22: HttpContext.Current.Items[Key] = userOid.ToString();
Line 23: FormsAuthentication.RedirectFromLoginPage(userOid.ToString(), true);
有人有任何想法吗?