# Start / Stop / Recycle Application Pool (IIS 7) not working as expected

**URL:** https://www.finalbuilder.com/forums/t/start-stop-recycle-application-pool-iis-7-not-working-as-expected/3275
**Category:** Bugs
**Created:** [August 25, 2010, 4:15am UTC](https://www.finalbuilder.com/forums/t/start-stop-recycle-application-pool-iis-7-not-working-as-expected/3275 "2010-08-25T04:15:45Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![deleted\_user](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/deleted_user/32/937_2.png) [@deleted\_user](https://www.finalbuilder.com/forums/u/deleted_user)
#### Post date: [August 25, 2010, 4:15am UTC](https://www.finalbuilder.com/forums/t/start-stop-recycle-application-pool-iis-7-not-working-as-expected/3275/1 "2010-08-25T04:15:45Z")

</div>

&nbsp;I think I've found an issue with the Start / Stop / Recycle Application Pool (IIS 7) action when running from FinalBuilder Server. &nbsp;In the credentials section, I have selected Provide the credentials to the IIS Server, but have left the Username and Password boxes empty. &nbsp;When I run my project in FinalBuilder as my account's credentials, to Start the application pool, the action works. &nbsp;When I run the exact same project from FinalBuilder server, using the exact same credentials as my previous run, the action fails with this error message:

Connected to IIS server on 'devsysweb'.  
Application pool with name 'SysdinePool' found.  
Could not 'Start' the application pool. Failed to start application pool.

So, I changed the project so that I specified the username and password fields in the action, and it works from FinalBuilder Server. &nbsp;I should be able to leave the credentials empty from FinalBuilder Server, just like I can from FinalBuilder.

One thing to note, Calling this action to Stop the app pool works just fine without specifically providing the credentials.

Thanks,

Nick  
&nbsp;

---

<div class="post-metadata">

### Author: ![paulsamways](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/p/e8c25b/32.png) [@paulsamways](https://www.finalbuilder.com/forums/u/paulsamways)
#### Post date: [August 25, 2010, 4:59am UTC](https://www.finalbuilder.com/forums/t/start-stop-recycle-application-pool-iis-7-not-working-as-expected/3275/2 "2010-08-25T04:59:33Z")

</div>

Hi Nick,   
  
 This is quite confusing in that the credentials must be working to some extent in that the action is able to connect to the server and find the application pool, it wouldn’t get that far if you weren’t authorized. I’ve also been able to successfully run the action in the same context as you’ve described without failure. Do you see the same problem when you try to ‘Recycle’ the application pool? Has anything been reported by IIS to the Windows event log on that machine which might shed some light on why it’s failing? The error that the API call is returning is specifically “Failed to start application pool”, not particularly helpful.   
  
 Regards,   
 Paul.

---

<div class="post-metadata">

### Author: ![deleted\_user](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/deleted_user/32/937_2.png) [@deleted\_user](https://www.finalbuilder.com/forums/u/deleted_user)
#### Post date: [August 25, 2010, 12:50pm UTC](https://www.finalbuilder.com/forums/t/start-stop-recycle-application-pool-iis-7-not-working-as-expected/3275/3 "2010-08-25T12:50:12Z")

</div>

Paul,   
  
 I tried Restart, same thing. So to recap, Stop works, Start and Recycle doesn’t. I did check the event log, and I see where it writes out 3 entries. The 3 entries are below in the order in which they appear:   
  
 Log Name: Application   
 Source: Microsoft-Windows-WMI   
 Date: 8/25/2010 8:38:22 AM   
 Event ID: 5605   
 Task Category: None   
 Level: Error   
 Keywords: Classic   
 User: N/A   
 Computer: DEVSYSWEB.qa.snagajob.corp   
 Description:   
 Access to the root\WebAdministration namespace was denied because the namespace is marked with RequiresEncryption but the script or application attempted to connect to this namespace with an authentication level below Pkt\_Privacy. Change the authentication level to Pkt\_Privacy and run the script or application again.   
 Event Xml:   
  
  
  
 5605   
 0   
 2   
 0   
 0   
 0x80000000000000   
  
 5528   
  
  
 Application   
 DEVSYSWEB.qa.snagajob.corp   
  
  
  
 root\WebAdministration   
  
  
  
  
 Log Name: Application   
 Source: Application Error   
 Date: 8/25/2010 8:38:33 AM   
 Event ID: 1000   
 Task Category: (100)   
 Level: Error   
 Keywords: Classic   
 User: N/A   
 Computer: DEVSYSWEB.qa.snagajob.corp   
 Description:   
 Faulting application w3wp.exe, version 7.0.6002.18005, time stamp 0x49e023cf, faulting module wc.dll\_unloaded, version 0.0.0.0, time stamp 0x3f250318, exception code 0xc0000005, fault offset 0x1000c870, process id 0x1248, application start time 0x01cb4433e5d4e588.   
 Event Xml:   
  
  
  
 1000   
 2   
 100   
 0x80000000000000   
  
 5529   
 Application   
 DEVSYSWEB.qa.snagajob.corp   
  
  
  
 w3wp.exe   
 7.0.6002.18005   
 49e023cf   
 wc.dll\_unloaded   
 0.0.0.0   
 3f250318   
 c0000005   
 1000c870   
 1248   
 01cb4433e5d4e588   
  
  
  
  
 Log Name: Application   
 Source: Microsoft-Windows-WMI   
 Date: 8/25/2010 8:38:34 AM   
 Event ID: 5605   
 Task Category: None   
 Level: Error   
 Keywords: Classic   
 User: N/A   
 Computer: DEVSYSWEB.qa.snagajob.corp   
 Description:   
 Access to the root\WebAdministration namespace was denied because the namespace is marked with RequiresEncryption but the script or application attempted to connect to this namespace with an authentication level below Pkt\_Privacy. Change the authentication level to Pkt\_Privacy and run the script or application again.   
 Event Xml:   
  
  
  
 5605   
 0   
 2   
 0   
 0   
 0x80000000000000   
  
 5530   
  
  
 Application   
 DEVSYSWEB.qa.snagajob.corp   
  
  
  
 root\WebAdministration   
  
  
  
  
 Hope this helps. Oh, one other thing, the server I’m attempting this on is Windows 2008 SP 2 64-Bit, if that helps at all.   
  
 Thanks,   
  
 Nick

---

<div class="post-metadata">

### Author: ![paulsamways](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/p/e8c25b/32.png) [@paulsamways](https://www.finalbuilder.com/forums/u/paulsamways)
#### Post date: [August 26, 2010, 1:47am UTC](https://www.finalbuilder.com/forums/t/start-stop-recycle-application-pool-iis-7-not-working-as-expected/3275/4 "2010-08-26T01:47:31Z")

</div>

Hi Nick,   
  
 To be honest I’m a bit stumped by this case, we’re definitely using PktPrivacy to connect to the IIS 7 WMI namespace, otherwise if we weren’t it would fail in the IDE as well, perhaps it’s just a Windows security feature that doesn’t allow PktPrivacy to be used when the user is logged in the way they are with FinalBuilder Server, though if that was the case then why does the Stop action work, but not Start/Recycle, they both use the same code path right up to the point of calling the start/stop/recycle function on the WMI object.   
  
 As a workaround you could try using the appcmd.exe tool:   
  
 c:\windows\system32\inetsrv\appcmd recycle apppool defaultapppool   
  
 Regards,   
 Paul.

---

<div class="post-metadata">

### Author: ![deleted\_user](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/deleted_user/32/937_2.png) [@deleted\_user](https://www.finalbuilder.com/forums/u/deleted_user)
#### Post date: [August 26, 2010, 11:11am UTC](https://www.finalbuilder.com/forums/t/start-stop-recycle-application-pool-iis-7-not-working-as-expected/3275/5 "2010-08-26T11:11:09Z")

</div>

Thanks for looking into this Paul. I’ve actually come up with another workaround that has nothing to do with the app pool in IIS. We have a legacy FoxPro web application, that our FoxPro developers had been deploying manually. I’ve come up with a solution in FinalBuilder to deploy the site and I was stopping the app pool to kill the COM servers. There is an admin page in the site that allows you to kill the com servers, so I changed the app pool action to an exec action, and I use tinget to ping the url that actually kills and then starts the COM servers.   
  
 Nick
