Team City Deployment Failure

Hi :
I have a build step that is part of my deployment configuration. My coworker told me it had worked once in a blue moon

I kept on getting this error consistently when I ran this build step:

Deleting dirPath (\aspnet_client\system_web\4_0_30319). [15:22:22]: [VSMSDeploy] C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v10.0

\Web\Microsoft.Web.Publishing.targets(3588, 5): Web deployment task failed.((3/28/2012 3:22:22 PM) An error occurred when the request was processed on the remote computer.)

Attempt to perform an unauthorized operation on file '4_0_30319'.

It seems that it is trying to delete the folder
aspnet_client\system_web\4_0_30319 , but has no permission to.

we run this build on a virtual machine.

Any suggestions on how to resolve this?

All help is greatly appreciated.


Comment actions Permalink


By default on Windows TeamCity is started as a service under LocalSystem account. This account does not have pervissions on another computers in a Windows network.
You will neet to start TeamCity Build agent service under another account that has enough permissions there.


Comment actions Permalink


When I'm upgrading the staging instance from Team city it is getting error.

My Team City Server is one server and Upgradable instance is another server. 

Scenario 1: I have pointed the the instance to Default Web Site\V880Service ( physical path C:\inetpub\wwwroot\ )                                      instance is upgraded successfully

Scenario 2: When i change the physical path to CIFS It is getting failed

                    I have pointed the the instance to Default Web Site\V880Service

                         ( path: \\Sh01-iis01-iad\shqa-iis-iad8\DEPLOYMENTS\TCTEST\V880Service ) is says

Web deployment task failed

Error Log:

[GHS.GG.Wcf\GHS.GG.Wcf.csproj.teamcity] MSDeployPublish (41s)
[13:12:26][MSDeployPublish] GetPublishingLocalizedString
[13:12:26][GetPublishingLocalizedString] Start Web Deploy Publish the Application/package to http://20.xx.x.10/MSDEPLOYAGENTSERVICE ...
[13:12:26][MSDeployPublish] VSMSDeploy (41s)
[13:12:26][VSMSDeploy] Starting Web deployment task from source: package(C:\TeamCity\buildAgent\work\1322f19ac13f0fb5\GHS.GG.Wcf\DeploymentArtifacts\_PublishedWebsites\GHS.GG.Wcf.csproj_Package\ to Destination: auto().
[13:12:41][VSMSDeploy] Adding sitemanifest (sitemanifest).
[13:12:56][VSMSDeploy] Adding virtual path (Default Web Site\V880Service)
[13:12:56][VSMSDeploy] Adding directory (Default Web Site\V880Service).
[13:13:07][VSMSDeploy] C:\TeamCity\buildAgent\work\1322f19ac13f0fb5\packages\MSBuild.Microsoft.VisualStudio.Web.targets.\tools\VSToolsPath\Web\Microsoft.Web.Publishing.targets(4276, 5): Web deployment task failed. ((6/30/2018 3:43:07 AM) An error occurred when the request was processed on the remote computer.)

(6/30/2018 3:43:07 AM) An error occurred when the request was processed on the remote computer.
An error was encountered when processing operation 'Create Directory' on '\\Sh01-iis01-iad\shqa-iis-iad8\DEPLOYMENTS\TCTEST\V880Service'.
The error code was 0x80070569.
Logon failure: the user has not been granted the requested logon type at this computer.

at Microsoft.Web.Deployment.NativeMethods.RaiseIOExceptionFromErrorCode(Win32ErrorCode errorCode, String maybeFullPath)
at Microsoft.Web.Deployment.DirectoryEx.CreateDirectory(String path)
at Microsoft.Web.Deployment.DirPathProviderBase.CreateDirectory(String fullPath, DeploymentObject source)
at Microsoft.Web.Deployment.DirPathProviderBase.Add(DeploymentObject source, Boolean whatIf)

[13:13:07][VSMSDeploy] Publish failed to deploy.

Please help me to resolve the error.

Comment actions Permalink

Hi Pnarendra,

As my colleague mentioned, please make sure that the user running the agent process has the correct permissions and is allowed to login on the target machine.

Comment actions Permalink

Hi Denis,

Yes had full permissions.

We are using build step to build and deploy : Msbuild 

Command line parameter



When we change the MSDeployPublishMethod to "wmsvc", we are able to create the folders directory (Empty folders) but unable to get the content into the folders. And it is not loading the individual files as well. Which means it is successfully reaching the target machine and creating the empty folders from the package in CIFS path, but not loading the actual data into that folders.


Team city server- A

Application server-B 

We are deploying code to server B from Team city server where the physical path of the site will be CIFS share.

While we deploy the code to local drive on server B it works fine.

We are facing issue when we deploy the code to remote shared path(\\SH01....). Please find below



Is there a chance to have a call to connect on this?


Please sign in to leave a comment.