I am using TFS build process with the following MSBuild arguments:
/p:DeployOnBuild=True /p:PublishProfile=Development
The publish profile works when run from my machine in VS, but when it is run from the build server, it fails with this error:
Unable to create directory "\\10.21.8.24\w$\Connector". Access to the path '\\10.21.8.24\w$\Connector' is denied.
This is a FileSystem publish.
I tried specifying the permissions for the user account that the TFSBuildServiceHost service runs as on the target machine. I've added full control on the entire W: drive, as well as I have created a share on the Connector folder and allowed the read & write access of this user to it.
Another thing I tried was stopping the web application in the IIS management console - but, the error still stays the same.