I'm running IIS 7 Integrated mode and I'm getting
Request is not available in this context
when I try to access it in a Log4Net related function that is called from Application_Start
. This is the line of code I've
if (HttpContext.Current != null && HttpContext.Current.Request != null)
and an exception is being thrown for second comparison.
What else can I check other than checking HttpContext.Current.Request for null??
A similar question is posted @
Request is not available in this context exception when runnig mvc on iis7.5
but no relevant answer there either.
Question&Answers:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…