Chúng tôi đã phát hiện sự cố khi triển khai ứng dụng MVC trên máy chủ IIS7: bất kỳ điều hướng tuyến đường nào cung cấp lỗi 404. Tôi đã tìm thấy trên web rằng vấn đề có thể được giải quyết bằng cách thiết lập chế độ quản lý đường ống ứng dụng được tích hợp, nhưng bây giờ chúng tôi có ngoại lệ:Vấn đề định tuyến ASP MVC với IIS7
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);
Có ai có ý tưởng nào không?