如何使ELMAH包含会话值? [英] How to get ELMAH to include session values?
问题描述
注意:我知道避免使用此会话的各种原因,但这是我继承的项目,因此请跳过所有答复的那一部分:)
NOTE: I know the various reasons to avoid using the session, but this is a project I've inherited, so please skip that part of any replies :)
由于这是一个已解决的问题,我希望有人可以指向包含记录会话数据的ELMAH补丁/分支/分支,而不是费力地重新设计轮子。
Since it's a solved problem, I'm hoping someone can point to an ELMAH patch/branch/fork that includes logging session data rather than reinventing the wheel.
一个奇怪的问题事情是来自Atif的一个较旧的帖子,说他们已经被记录:
One weird thing is an older post from Atif that says they're already logged:
http://markmail.org/message/ncmdgwm5rmzewbwu
评论员henningst提到在此处添加会话变量:
commenter henningst mentioned adding in the session variables here:
http://www.hanselman.com/blog/ELMAHErrorLoggingModulesAndHandlersForASPNETAndMVCToo.aspx
另一种方法(我宁愿避免)是将值复制到cookie
Another approach (I'd rather avoid) is copying the values into cookies
< href = http://www.sharp developer.net/content/archive/2008/11/10/how-to-get-session-or-other-custom-values-into-elmah.aspx rel = noreferrer> http://www.sharpdeveloper。 net / content / archive / 2008/11/10 /如何将会话或其他自定义值转换为elmah.aspx
我知道一种选择是切换到ELMAH之外的其他方式(例如Exceptioneer-请参见 http://exceptioneer.com /Public/ExceptioneerAndELMAH.aspx ),但由于这是我目前唯一的ELMAH问题,因此,我宁愿只使用修补过的ELMAH而不是切换到其他东西。
I know one alternative is to switch to something besides ELMAH (like Exceptioneer - see http://exceptioneer.com/Public/ExceptioneerAndELMAH.aspx) but since this is my only problem with ELMAH at the moment, I'd rather just have a patched ELMAH than switch to something else.
推荐答案
Atif在Twitter上回复说没有已知补丁:
Atif replied on twitter to say there's no known patch:
http://twitter.com/raboof/statuses/7229453423
修补程序可以这样做:
http://twitter.com/manningj/statuses/7231616905
http://blog.sublogic.com/2009/12/patch-to-enable-session-variable-用elmah记录/
这篇关于如何使ELMAH包含会话值?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!