MSBuild.ExtensionPack.Web.Iis6AppPool

Jun 15, 2010 at 5:47 PM
I have tried to use: <MSBuild.ExtensionPack.Web.Iis6AppPool TaskAction="Stop" Name="IIS://MyRemoteServer/w3svc/AppPools/MyAppPool"/> but I am always getting this error: C:\Documents and Settings\NetworkService\Local Settings\Temp\Source\Build\BuildType\TFSBuild.proj(86,6): error : COMException: The system cannot find the path specified. I have written a vbs script to stop the appPool remotely just to test my path "IIS://MyRemoteServer/w3svc/AppPools/MyAppPool" and it stops the remotes server's appPool. My remote server is Win 2003 R2 build box is an XP machine SP2 I need help. Thanks
Coordinator
Jun 15, 2010 at 5:55 PM

Hi, can you try

 

        <MSBuild.ExtensionPack.Web.Iis6AppPool TaskAction="Stop" Name="MyAppPool" MachineName="MyRemoteServer"/>

Mike

 

 

Jun 15, 2010 at 7:20 PM
Thanks Mike. I tried what you suggested and it resolved the path issue :) but now I am getting "COMException: Access is denied.". I am using the Network Service account and I have already assigned it to the ADMINISTRATORS group in both my build and webserver machines... Is there any permission/right configuration that I have to do? Thanks
Coordinator
Jun 15, 2010 at 8:59 PM

The identity running the scripts will be being used, so if it doesn't have permissions (i think admin), then pass in the UserName and UserPassword properties of an account that has sufficient permissions. I seem to recall issues with the NS account. You could try using a test credential to see if that is the issue.

 

Mike

Jun 15, 2010 at 11:12 PM
Hi Mike, Just to test it out, I added my user to the administrators group in my remote server (iis) and added username and userpassword but it still gave me the "access denied" issue... :( help
Coordinator
Jun 16, 2010 at 7:06 AM

Can you post the full error log. Do you have a Firewall in the way?

Jun 16, 2010 at 3:25 PM

Hi Mike,

My remote IIS server does not have a firewall enabled and so does my build server.

This is my error log (I've truncated the unrelated data)

Task "BuildStep"
  BuildStep TeamFoundationServerUrl="http://vesper:8080/" BuildUri="vstfs:///Build/Build/94" ID="-1" Message="Stopping the app pool" Name="StopAppPool" Status="InProgress"
Done executing task "BuildStep".
Using "MSBuild.ExtensionPack.Web.Iis6AppPool" task from assembly "C:\Program Files\MSBuild\ExtensionPack\MSBuild.ExtensionPack.dll".
Task "MSBuild.ExtensionPack.Web.Iis6AppPool"
  AppPool: MyAppPool- Action: Stop
C:\Documents and Settings\NetworkService\Local Settings\Temp\MySource\MyBuild\BuildType\TFSBuild.proj(86,6): error : COMException: Access is denied.
C:\Documents and Settings\NetworkService\Local Settings\Temp\MySource\MyBuild\BuildType\TFSBuild.proj(86,6): error :
C:\Documents and Settings\NetworkService\Local Settings\Temp\MySource\MyBuild\BuildType\TFSBuild.proj(86,6): error :
Done executing task "MSBuild.ExtensionPack.Web.Iis6AppPool" -- FAILED.
Done building target "AfterDropBuild" in project "TFSBuild.proj" -- FAILED.
Done Building Project "C:\Documents and Settings\NetworkService\Local Settings\Temp\MySource\MyBuild\BuildType\TFSBuild.proj" (EndToEndIteration target(s)) -- FAILED.

This is the line I issued the task:

<MSBuild.ExtensionPack.Web.Iis6AppPool TaskAction="Stop" Name="MyAppPool" MachineName="MyRemoteIISServer" Username="TestAdminUser" UserPassword="TestAdminPassword"  />

 

Coordinator
Jun 16, 2010 at 4:12 PM

Sorry, this type of issue is really tough to diagnose remotely. Could you take a look at  http://msdn.microsoft.com/en-us/library/aa389290(v=VS.85).aspx and see if anything there highlights a solution for you.

Mike

Sep 16, 2010 at 6:34 PM

I am having the same issue with a new build server I am building.  When executing the MSBuild.ExtensionPack.Web.Iis6AppPool task, I am getting

D:\Builds\CostTrackConstruction\ProjectTrack Dev WCF Build\BuildType\TFSBuild.proj(262,3): error : COMException: Access is denied.
D:\Builds\CostTrackConstruction\ProjectTrack Dev WCF Build\BuildType\TFSBuild.proj(262,3): error :
D:\Builds\CostTrackConstruction\ProjectTrack Dev WCF Build\BuildType\TFSBuild.proj(262,3): error :

I have checked all the items mentioned in this article, except I have not done any modifications to DCOM.  I am running version 3.5.4 of the task library.  I am trying to check for existence of an application pool on AppServerA from my buildServer.  This task works fine performing the check from AppServerA to AppServerB.

I have checked for the existence of a firewall, there is none as these are internal servers.  I have tried making the connection manually between IIS on buildServer to AppServerA, and I am not getting an error.

 

Anything else you can think of Mike?