I got the following on build until recently.
Initializing IIS Web Server...
Successfully created virtual directory 'ycmbuild'.
Granting IIS read access to the folder 'C:\Projects\YourClubMatters\Trunk\YCM\WebSite_deploy\Release'.
C:\Program Files\MSBuild\Microsoft\WebDeployment\v9.0\Microsoft.WebDeployment.targets(676,5): error : Some or all identity references could not be translated.
Warning: Unable to grant IIS access to folder 'C:\Projects\YourClubMatters\Trunk\YCM\WebSite_deploy\Release'.
Done building project "WebSite_deploy.wdproj".
========== Rebuild All: 7 succeeded, 0 failed, 0 skipped ==========
The solution for me was to stop the web deployment project from creating the iis virtual directory, make a virtual directory pointing at say “c:\inetpub\vdir”, give the application pool it belongs to the same rights as the tfservice, edit team build project file adding a task that shuts down the parent website of the virtual directory, deletes all subdirectories and files in “c:\inetpub\vdir”, copies the published website that the deployment project creates to “c:\inetpub\vdir” and starts the parent website of the virtual directory.
I’m sure there are other solutions, I found that to be the simplest. Also, I used SDC Tasks to do all of this, very simple stuff.
What you add the the .proj file looks like this:
-
<Target Name="AfterCompile">
-
<Web.WebSite.Stop Description="Default Website" />
-
<Folder.CleanFolder Path="c:\inetpub\vdir" force="true"/>
-
<Folder.CopyFolder Source="$(SolutionRoot)\..\Binaries\Release\_PublishedWebsites\WebSite_Deploy" Destination="c:\inetpub\vdir" />
-
<Web.WebSite.Start Description="Default Website" />
-
</Target>
Related posts:
- Redirecting using strong types in an asp.net web application project Update, I recommend also reading the following post after you...
- Handling Relative Paths and debug mode with Jquery in ASP.Net Web Forms I had a problem where I wanted to use the...
Related posts brought to you by Yet Another Related Posts Plugin.