0

I'm trying to stop IIS 7 'Windows Process Activation Service' from within my application. It also stops a dependency - 'World Wide Web Publishing Service'. The dependency stops always but the main service doesn't. I think that it restarts automatically because I don't get any errors in my application. The question is what may cause IIS to restart automatically or prevent it from stopping?

p.s. I'm not doing any other things related to configuration, just stopping the service through the ServiceController object

Edit:

The startup type of the main service is manual and automatic for dependency. I also have such settings in service properties ->recovery->failure 1,2,3 run a program, iisreset.exe as a program to run. Anyway I didn't get any error in my application, but if it could restart due to some errors I'd like to know how to check that.

I should have mentioned also that it doesn't happen all the time, in most cases it stops, but sometimes it doesn't, I can't event get any pattern or relation to something

3
  • What Startup Type do you have WPAS service configured as? Is it manual or automatic? I tried doing the same thing using ServiceController object via PowerShell and it stops the service just fine.
    – LukeP
    Oct 24, 2011 at 14:58
  • @LukeP I've updated my question
    – username
    Oct 24, 2011 at 15:07
  • Why stop it at all? If you're not going to use IIS, why not just not install it ?
    – TristanK
    Oct 26, 2011 at 4:01

1 Answer 1

1

Windows Process Activation Service is not the main IIS service, World Wide Web Publishing Service is.

Pay no attention to the process activation service's state, and don't mess with it manually; it's just gonna do its own thing (which is why it's set to manual startup).

4
  • I agree with the service doing it's own thing. I'm still curious though why it doesn't stay stopped. On my test environment I'm able to run: (new-Object System.ServiceProcess.ServiceController('WAS','localhost')).Stop() and it stays stopped.
    – LukeP
    Oct 24, 2011 at 15:28
  • @LukeP It's involved in worker process management - it's started dynamically when needed, and won't start if IIS is just sitting idle. Oct 24, 2011 at 15:35
  • Which makes sense and is exactly what I see here. But, the OP asked why it doesn't stay switched off. I agree with you though. It's not something you should have to worry about.
    – LukeP
    Oct 24, 2011 at 15:37
  • "don't mess with it manually" - after a few days figuring out what's the problem is, this is the only reasonable solution I see
    – username
    Oct 24, 2011 at 16:10

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .