Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
鉴于:
问题:
为什么你的工作单元持有对 HttpContext 的引用?进入会话状态?如果是这种情况,让它持有更抽象的东西(即接口),它在 Application_Start 中将代表一个不需要 HttpContext 的具体类,而其他任何地方都是另一个(在内部使用 HttpContext)