Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. How can I check if my IIS is alive using C#?

How can I check if my IIS is alive using C#?

Scheduled Pinned Locked Moved Web Development
questioncsharpsysadminwindows-admintutorial
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • G Offline
    G Offline
    goldsoft
    wrote on last edited by
    #1

    How can I check if my IIS is alive using C#? If the server is down - how to do iisreset ?

    S 1 Reply Last reply
    0
    • G goldsoft

      How can I check if my IIS is alive using C#? If the server is down - how to do iisreset ?

      S Offline
      S Offline
      SomeGuyThatIsMe
      wrote on last edited by
      #2

      there are quite a few free server monitors floating around the internets. I've been using PA Server monitor for some lightweight stuff. we had an old server with an iffy nic so we used a device called an iBoot that pinged the server and after x missed pings it killed power to the server and brought it back on after 30 seconds. If you want the app to run on the server i'm sure theres a way to check the app pools, or you could look at the asp_net or w3svc processes to see if they're still running. iisreset should be able to be run from a Process.Start() in c# once you determine its stopped.

      Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups