Thứ Hai, 7 tháng 1, 2019

[ASP.NET][IIS] HttpException (0x80004005): This server variable cannot be modified during request execution

Mô tả, trang admin đăng nhập báo lỗi [HttpException (0x80004005): This server variable cannot be modified during request execution.]

Sử dụng 2 trang, trang admin (đăng nhập) gọi qua 1 trang api (web service) để chứng thực và xảy ra lỗi trên.

Nguyên nhân là do xung đột SF_NOTIFY_AUTHENTICATION event của ISAP Filter và Application_BeginRequest event trong file global.asax của source code.
(https://support.microsoft.com/en-ca/help/2605401/a-system-web-httpexception-occurs-in-internet-information-services-7-0)

=> xử lý 1 trong các cách sau

1. Site site sang pool classsic (nếu Site code tương thích)

2. phải thay đổi code

3. Site bắt buộc chạy pool integrated thì có thể remove các khai báo trong mục ISAP Filter của Site trên IIS

Không có nhận xét nào: