none
Web Application lifecycle and instance life RRS feed

  • Question

  • Hi All,
    I need to understand following thing about a asp.net website.
    When we create a asp.net website and install it on IIS.
    First time, we call it, all the dll's and dependent dll's(aspx.cs,business layer dll, DAL layer dll) gets loaded in app pool memory.
    I need to know that what would be the lifetime of these dll instances.
    If i don't recycle the application pool, will 1 instance or multiple instances of these dlls' exist for different users.
    I do understand that session for a specific user do gets killed itseld after around 20 minutes, but i can't understand
    the lifecycle of whole application and whether a new instance of website object gets created for each user request or the old one only(the primary one which gets generated on the load of website for the first time) will only service all the user requests.

    If we see this link http://msdn.microsoft.com/en-us/library/ms178473.aspx, Application_start is called only once while "init" is called for every instance of HTTPApplication. So do it mean one HTTPAPPLication instance and INIT call for each user call?

    Kindly elaborate on this.

    Cheers
    TicArch

    Thursday, December 30, 2010 7:02 AM

All replies

  • Hi Phijo,

     

    In my query, myself have quoted the link provided by you.

    Kindly have a look at my query again and let me know if you need any clarification on that.

    Cheers

    TicArch

    Friday, December 31, 2010 5:59 AM
  • It means when the application is started rather than each user.  The dll used by the worker process for an application are re-entrant.  Unusually for windows which you'd usually expect to have a copy per process.

    However, there's also shadow copying to consider if you publish without stopping the app.  You can theoretically have numerous versions of a dll in memory.

    Plus as you already probably realise should memory max out then this is another complication.  One which you really want to avoid in asp.net since all your sessions are lost if your memory gets recycled.  It's a disaster whose solution is avoiding memory recycling.

    Tuesday, January 4, 2011 9:52 AM