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 785389
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T20:52:12+00:00 2026-05-14T20:52:12+00:00

I have a webservice where I want to do something when a the application

  • 0

I have a webservice where I want to do something when a the application pool ends, so I thought I’d do:

Application_End()
{
    // Some logic here
}

What happens is if I stop the application pool, this logic is executed.
On the other hand, if I just call iisreset, it is NOT.

So my question is: where should I put my code so that it is executed in both cases?

  • 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-14T20:52:13+00:00Added an answer on May 14, 2026 at 8:52 pm

    There is no guarantee that Application_End will be called. The example you mentioned, where you perform an IIS reset is an example. Other examples could include someone unplugging the server, or a hardware failure.

    What I’ve done in the past is to use Application_Start to call my data cleanup logic as the application comes back online. This is assuming you don’t need any values that were stored in memory.

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

Sidebar

Related Questions

I have a Silverlight application that displays a map, and my intention is, when
How can I check a webservice if the username/password is correct? I don't want
Here's my problem: I am creating a Blackberry application that access's my data via
I've written an ASP.NET 2.0 web service which is consumed by a web application
First off, The Problem: We have a Web App with a Flash front-end that
I have a simple form (textbox, submit button) which is wrapped in an update
Long post.. sorry I've been reading up on this and tried back and forth
I have a web service that is willing to output gzip/deflated data. I've verified
Is it possible to get WSDL.exe to generate interfaces as well as, or instead
I am new to webservices in general. I am trying to write a Java

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.