Today I took the Session in the general handler (ashx) and found that I always get null.
Baidu a bit, it turns out: the general handler (ashx) does not access the Session by default.
Summarize the difference between ASPX and ASHX:
1. The general handler (ashx) does not access Session by default;
2. The general processing program (ashx) does not use a web page template engine;