I think I've found an issue with the Start / Stop / Recycle Application Pool (IIS 7) action when running from FinalBuilder Server. In the credentials section, I have selected Provide the credentials to the IIS Server, but have left the Username and Password boxes empty. When I run my project in FinalBuilder as my account's credentials, to Start the application pool, the action works. 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. 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
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.
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
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.
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