Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7031635
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T00:49:46+00:00 2026-05-28T00:49:46+00:00

I have MVC3 web application running under IIS 7. During initialization in global.asax application

  • 0

I have MVC3 web application running under IIS 7. During initialization in global.asax application scans all the assemblies returned by BuildManager.GetReferencedAssemblies(), and all the types (Assembly.GetTypes()) in those assemblies in order to do initialization stuff.

From time to time the application stops working properly – it behaves as if the initialization never happened or some types were omited during startup. Once the application enters this failed state (I think it happens after the pool is recycled) it stays that way until restarted by:

  1. Manual updating Web.Config (adding some spaces)
  2. Manual restarting Application in IIS Manager
  3. Manual stopping and starting application pool in IIS Manager
  4. Automatic pool recycle

I noticed that 1. always helps, but 2,3,4 works indeterministically – at least as far as I can say because the nature of the problem is not deterministic – application crashes only after some scheduled recycles.
What is the difference between 1 and 2,3,4 from the point of view of global.asax code and access to loaded assemblies?

Oh, the application runs as a sub-application (subfolder in IIS sites tree) if it changes anything.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T00:49:47+00:00Added an answer on May 28, 2026 at 12:49 am

    I believe your problem could be solved by saving some state information so application can be aware about if its startup was successful.

    Whenever application checks there’s something incorrectly initialized, it should re-initialize it or throw an exception and restart application.

    It’s really hard to give you an solution, but summarizing you can do this:

    1. Track initialization.
    2. Don’t let application run in an unexpected state.
    3. Double check if some unmanaged resource isn’t being released somewhere in your code (maybe file streams, database connections…?).
    4. Logging, logging, logging…

    Directly answering to your question:

    1. Recycles application pool.
      • HttpApplication (Global.asax) fires application initialization events (Start event).
    2. Recycles application pool.
      • HttpApplication (Global.asax) fires application initialization events (Start event).
    3. Basically, stops application for all incoming request until you start it again. Basically, a hard application pool recycling.
      • HttpApplication (Global.asax) fires application initialization events (Start event).
    4. Recycles application pool.
      • HttpApplication (Global.asax) fires application initialization events (Start event).

    Basically, any of these actions produces the same result.

    Have you tried to do an IIS reset – iisreset /restart command –? This should release any locked resource and stop any unwanted loop, thread or whatever thing crashing your application.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an ASP.NET MVC 3 Beta application running on IIS. In my web.config
I have MVC3 web application where we need to populate radio button list with
we are developing a web application using MVC3 and VS2010. We have some pdf
we are developing a web application using MVC3 and Jquery. we have a situation
I'm running MVC3 and a windows auth web application. When I deploy to IIS6
I have a mvc3 web application which uses jqgrid extensively. I just came to
In my application (admin web interface written in MVC3) running on open-embedded Linux I
I have an ASP.NET MVC3 web application with UI, Business (entities), and Data (DbContext)
Well, this is an interesting problem. I have an ASP.NET MVC3 Intranet application running
Have a n-tire web application and search often times out after 30 secs. How

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.