Is it right to say that when Httpcontext object is null - so the iis is down ?
i know that when the first request to iis ( asp.net) the application manager creates
enviroment : Application Domain.
inside it theres Application Runtime.
And inside it there's blocks of (if theres more then 1 开发者_如何学Pythonapplication on the server)
HttpApplication with each has httpContext which handler Response and Request.
So what does it mean when i get in asp.net HttpContext is null ?
I don't think that you can be running any ASP.NET application having IIS down, just by design :)
if you have a piece of code where the HttpContext.Current
is null you are probably not running in the web server but somehow in another way, for example sometimes we have class libraries designed to be executed within the web application then somebody references those assemblies directly from a windows service, a console application or from the unit test project and of course there is no HttpContext !
web services as well, if served from IIS should have the context, if directly called with assembly reference and not web reference, can't reach any HttpContext.
show your failing code and describe where/how you use it and we will see why your context is null in that case.
精彩评论