INFO: ?????? ????? ????? ??????? ? ???? ??????? ?? ASP.NET

?????? ????????? ?????? ?????????
???? ???????: 312607 - ??? ???????? ???? ????? ????? ??? ???????.
????? ???? | ?? ????

?? ??? ??????

??????

????? ?????? ASP.NET HttpApplication ?????? ?? ???????? ??????? ?????? ???? ?????. ???? ??? ??????? ??? ??? complexities. ???????? ??? ???? ???? ??? ??????? ????? ?????? ASP.NET ?????? ????? ?? ???? Microsoft ????? ?????? ?????? (ASP) ????????? ?????????.

??? ????? ??? ??????? ??? ??????? ???????:

??????? ????

??? ??????? ? ?????? ???????

??? ????? ????? ????? ?? ??? Global.asax. ????????? ???????? ?? Global.asax ????? ??? ????? ???? ?? System.Web.HttpApplication. ?? ???? ??? Global.asax ??? ??????? ????? ???????? HttpApplication ???? ???????.

??? ??????? ASP.NET ?????? ?????? ?? ?????? ?????? ??????? ??? ?????? ??????? ????? ?? ??? ?????. ??? ????? ??? ??? ?????? ??????? ???? ?? ???? 1 ??? 100 ???????? ??? ??????? ????? ?????? ??????? ? ??? ????? ???????. ?????? ?? ????? ????? ??????? ???? ??????? ???? ????? ??? ?????? ??????? ????? ????? ??????? ???????. ??? ??????? ?????? ??????? ?? ???? ??????? - ????? ?????? ? ??? ??? ???? ?? ?? ???. ??? ?? ?????? ??????:
  • ??? ???? ????? ??? ????? ??? ?????? ??? ????? ????? ??????? ??? ????.
  • ????????? ???????? ??????? ???? ????? ?????? ????? ??? ??? ?? ????? ??? ???? ??? ????? (???? ?? ??? ????? EndRequest ???? ?? ???? ??? ????? ???????? ????? ????? ?????).
??? ????? ??? ??? ??? ?? ??? ????? ????? ?????? ??? ????? ???? ????? ? ??? ???? ??? ???????? ????? ??????? ?????? ??? ????? ?????. ????? ??? ??? ?? ??? ???? ???? ?????? ??? ??? ???????.

?????? ????????? ??????? ?????? ???? ??????? ??????? ????? ??????:
  • ?? Global.asax ? ?????? ??? ?? Me ??????.
  • ?? ???? ? ????? ?? ???? ????? ApplicationInstance ????? ????.
  • ?? ?????? HttpContext ??????? ??????? HttpContext.ApplicationInstance (???? ???? ?? HttpApplication).
?????? ??? ??????? ???? ??? ????? ???? ??????? ???????? ?? ASP ??????? ? ASP.NET ?????? ApplicationInstance ?? ????? ??? ????? ??????? ??? ???? ??????? ??????? ????? ??????.

????? ???????

??? ??? ????? ?? ????? ?? ????? ????? (? ??? ??????? ?????? ?????? ASP.NET). ?? ??? ??? ??????? ????? ???????? ???? ??? ????? ???:
  1. BeginRequest
  2. ????? AuthenticateRequest
  3. ??? ????? DefaultAuthentication
  4. ????? AuthorizeRequest
  5. ????? ResolveRequestCache
  6. ?????? ????? ??? "????? ??????" (??? ??????? ??????? ???? ???? ???? ??? ?????)
  7. ????? AcquireRequestState
  8. ????? PreRequestHandlerExecute
  9. ?????? ???????? "????? ?????" (????? ??? ????? ????????? ???????? ??????)
  10. ????? PostRequestHandlerExecute
  11. ????? ReleaseRequestState
  12. ?????? ????? ??? ????? UpdateRequestCache ???????? ???? ???????
  13. ????? UpdateRequestCache
  14. ????? EndRequest
?????? ?? ???? ??????? Server.Transfer ?? Response.Redirect(string) ??????? ??? ?????? ????? ?????? ? ??? ??????? ???????? ????? ??? ?? ???? ???. ??? ???? ??? ???? ??? ????? EndRequest ?? ??? ?????????.

?????? ??????? ??????? ??? ???????:
  • ???? ????? ASP.NET ?????? ??? (??? ???? ??????? ??????? 6 ? 9 ? 12 ?? ??????? ???????).
  • ??????? ??????? HTTP ???? ?? ??????? ???????. ??? ????? ??????? ????????? ?? ??????? ??????? HTTP ?? ????? Machine.config.
  • ????????? ???????? ?? Global.asax ???? ??? ??? ???? ????? Application_ [EventName ?????] ?? ???? ??? ??? ???? ???? ??? ????? ??????? ??????? ???? ????? ????.
???? ?? ????? ?? ??? ????????? ???????? ????. ??? ????? ????????? ??? ?????? ?????. ??? ?????? ????? ??? ???? ???????; ????? ?????? ???? ??? ?????? ????? EndRequest. ????? ????? ????? ????? after-request ???? ?? ????? EndRequest.

?????? ?? ???? ???????? ??? ????? ????????? ?????? ??? ?????? ??? ???????? ?? ???? ??????? ?? ????????? (??? ??? EndRequest).

Application_OnStart ? Application_OnEnd

???? ASP.NET ???? Application_OnStart ? Application_OnEnd "???????" ?? ??? ??????? ?? ASP ??????????. ??? ????? ??? "???????" ??? ????? ??? ?? ??? ??????? ? ???? ?? ??? ?? ???? ???????. ????? ??? ??? ?????? ??? ???? ??????? ?? ??? ????? ???? ???? ???? ???? ??? ??????? ??????? ???? ????. ????? ????? ???? ??????? ??? ?? ?????? ?? ????? ????? Init.

Application_OnStart ????? ?????? ????? ????? ??? ??????? ???? ???? ???? ????: ????? ?? ?????? ??? HttpContext ????? ????? ??? ???????.

???? ???????

???? ??????? ?? ????? ?????? ???????? ???????? ??????? ???? ASP ?????????? ??????? ?? ???? ????????? ???????? ?? Microsoft Visual Basic Scripting Edition (VBScript). ?? ASP.NET ? ????? ?????? ??? ???? ??????? ?? ???? ??? ????????? ???????:
  • ????? ??????? (???? ??? ?????? ?? ???? HttpApplication ???????)
  • HttpContext.Application
????? ASP.NET ???? ??????? ????? ?????? ??????? ?? ASP ?????????? ???? ???? ?? ?????? ?????? ????????? ???????? ??? ASP.NET. ?? ???????? ????? ???????? ?? ????? ????? ????? ??????? ????? ?? ???? ???????. ???? ??? ??? ????? ?????? ???? ????? ?????? ??? ????? ???? ???? ????? ?????? ??? ???? ?? ??????? ???????.

?????? ??? ??????? ?????? ????? ?? ??????? ?? Microsoft Visual C# .NET ? Microsoft Visual Basic .NET ? ??? ??????? ????? ???_????? ?? Global.asax ?????? ??? ???????. ?????? ??? ????:
<%@ Application Language="C# | VB" ClassName="MyClass" %>
				
??? ???? ??? ???? MyStaticMember ?? ??? Global.asax ? ????? ??????? MyClass.MyStaticMember ?????? ????? ?? ??????.

???????

???? ???????: 312607 - ????? ??? ??????: 29/?? ??????/1424 - ??????: 5.3
????? ???
  • Microsoft ASP.NET 1.1
  • Microsoft ASP.NET 1.0
????? ??????: 
kbmt kbappdev kbhttpruntime kbinfo kbstate KB312607 KbMtar
????? ????
???: ??? ????? ??? ?????? ???????? ?????? ????? ???? ????? ?????????? ????? ?? ????????? ?????? ????. ???? ???? ?????????? ???? ?? ???????? ???????? ?????? ????????? ????? ????????? ???????? ????? ???????? ?????? ?? ?????? ??? ?? ???????? ???????? ?? ????? ??????? ?????? ??? ??????? ?????? ??. ?????? ?? ???? ??? ??????? ???????? ????? ?? ???? ????? ?????? ??? ????? ??? ????? ??????? ?? ????? ?? ?????? ??? ??? ??????? ??????? ?? ????? ????? ????? ????? ?????. ?? ????? ???? ?????????? ??????? ??? ????? ?? ??????? ?? ????? ?????? ?? ??? ????? ?? ????? ??????? ?? ???????? ?? ??? ???????. ???? ???? ?????????? ???????? ??? ????? ?????? ??????? ??????
???? ??? ????? ??????? ?????? ??????????312607

????? ???????

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com