How to obtain the HttpContext in Event Handler

后端 未结 8 520
隐瞒了意图╮
隐瞒了意图╮ 2021-01-22 20:20

I’m trying to obtain the HTTPContext within an Event Handler in a Document Library in MOSS, but all I have is a null value of the HTTPContext.Current, I do the same thing on a L

8条回答
  •  有刺的猬
    2021-01-22 20:30

    You can fake the HttpContext and SPContext in event receivers as described in my post: http://pholpar.wordpress.com/2011/06/26/injecting-httpcontext-and-spcontext-into-the-event-receiver-context/

提交回复
热议问题