0

I have manually stopped app pool and started it by C# code. Then I did IISRESET by C# code only, its stopping again my application pool.

  • 1
    There is no enough information here, on what is happening, what you expect to happen, what you are trying to achieve, or why – TheGeneral Aug 03 '20 at 04:05
  • I would work on your presentation since you will probably get ripped shortly for the poor question – jwize Aug 03 '20 at 04:09
  • What did IISReset do exactly? What did you expect it to do instead? – mjwills Aug 03 '20 at 04:12
  • The duplicate question touches on every likely meaning of this question: Resetting IIS, recycling an app pool via C#, and unloading the current application. If you meant something else after all, please edit your question and reply to this comment. – Eric J. Aug 03 '20 at 04:14
  • The action you did "executing IISRESET" and the consecuences you saw "it stopped your application pool" make totally sense. Looks like either you failed to describe your problem or you need to understand what the IISRESET command does. Check [Difference between IISRESET and IIS Stop-Start command](https://stackoverflow.com/questions/22084561/difference-between-iisreset-and-iis-stop-start-command) – Cleptus Aug 03 '20 at 04:38

1 Answers1

0

That's what IISReset does: it restarts the entire web server. In other words, when you do an IISReset, you're stopping all services, including all app pools, then bringing them back up again.

It sounds as if you were expecting a finer grain operation to happen during an IISReset; it is the "axe" approach, not the "scalpel".

Lynn Crumbling
  • 12,985
  • 8
  • 57
  • 95
  • Hi Lynn, l am new here so explaining again my issue I have manually stopped the application pool by right click, and then start it by C# code `applicationPool.Start();` then reset the IIS by the following C# code `iisReset.Start();` now when I check my application pool then it should be started stage but its now in stopped stage. this is my issue. – kuldeep Singh Aug 04 '20 at 12:36
  • An application pool remembers which state it was in when the w3svc service was stopped, and restores that state when it is restarted. If the w3svc service is stopped with an app pool stopped, it will keep it that way when the w3svc service is started again. An administrator may have stopped an app pool on purpose, and wouldn't expect it to start back up until told to do so (even if the w3svc service was restarted, or the box was rebooted.) – Lynn Crumbling Aug 04 '20 at 13:57
  • 1
    Oh okay I got it, thank you so much for your explanation. – kuldeep Singh Aug 05 '20 at 07:53