Archives / 2010 / April
  • TFS Automatic Build Reporting Access to XAP Denied

    If you’re working with TFS and automatic builds of Silverlight apps, you may happen to stumble upon this error in the end of the build:

    Copying file C:\Builds\2\xxx\yyy\Binaries\zzz.xap failed. Access to the path 'C:\Builds\2\xxx\yyy\Sources\www\ClientBin\zzz.xap' is denied.

    The reason for this error I’m not 100% sure of, but it seems that the target file is read only and the build service do not have the proper access to overwrite it. Others have had the same problem with this and the suggested workaround/solution is to look up the \ClientBin\zzz.xap file in Source Control Explorer, right click to bring up the properties and the Security tab, then mark “Deny” to read for the Build Service. I did it for both the Builders group and the project collection build service accounts:


    I found the tip for the solution here.

  • Insufficient Permissions Problems with MSDeploy and TFS Build 2010

    I ran into these problems on a TFS 2010 RC setup where I wanted to deploy a web site as part of the nightly build:

    C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v10.0\Web\Microsoft.Web.Publishing.targets (3481): Web deployment task failed.(An error occurred when reading the IIS Configuration File 'MACHINE/REDIRECTION'. The identity performing the operation was 'NT AUTHORITY\NETWORK SERVICE'.)  An error occurred when reading the IIS Configuration File 'MACHINE/REDIRECTION'. The identity performing the operation was 'NT AUTHORITY\NETWORK SERVICE'. Filename: \\?\C:\Windows\system32\inetsrv\config\redirection.config Error: Cannot read configuration file due to insufficient permissions 

    As you can see I’m running the build service as NETWORK SERVICE which is quite usual. The first thing I did then was to give NETWORK SERVICE read access to the whole directory where redirection.config is sitting; C:\Windows\system32\inetsrv\config.

    That gave me a new error:

    C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v10.0\Web\Microsoft.Web.Publishing.targets (3481): Web deployment task failed. (Attempted to perform an unauthorized operation.)

    The reason for this problem was that NETWORK SERVICE didn’t have write permission to the place where I’ve told MSDeploy to put the web site physically on the disk. Once I’d given the NETWORK SERVICE the right permissions, MSDeploy completed as expected!

    NOTE! I’ve not had this problem with TFS 2010 RTM, so it might be just a RC issue!

  • Package and Publish Web Sites with TFS 2010 Build Server

    To package and publish web sites with TFS 2010 Build Server, you can use MSDeploy and some of the new MSBuild arguments. For example:





    /p:DeployIisAppPath="Default Web Site/WebApplication1"


    Does all the work for you! Unfortunately these arguments are not very well documented, yet. Please feel free comment with pointers to good docs. You can enter these arguments when editing the Build Definition, under the Process tab and the Advanced section:


    If you’re working with these things, I’m sure you’ve not missed the PDC 2009 presentation by Vishal Joshi about MS Deploy.

    A few links on the topic:

  • ASP.NET 4 Website Fails to Start on Your TFS 2010 Server?

    Getting a “Could not find permission set named ‘ASP.Net’” error on your TFS 2010 server? It may have to do with the fact you’re trying to run ASP.NET as a child site of a SharePoint Web Site. The problem is described in the “ASP.NET 4 braking changes” site:


    This error occurs because the ASP.NET 4 code access security (CAS) infrastructure looks for a permission set named ASP.Net. However, the partial trust configuration file that is referenced by WSS_Minimal does not contain any permission sets with that name.

    Currently there is not a version of SharePoint available that is compatible with ASP.NET. As a result, you should not attempt to run an ASP.NET 4 Web site as a child site underneath SharePoint Web sites.


    There is a workaround you could try by setting this in your web.config, if you know what you’re doing:

    <trust level="Full" originUrl="" />

  • Compile ASP.NET MVC on TFS 2010 Build Server

    Note to self: If you need to build ASP.NET MVC 2 applications on a fresh TFS 2010 Build Server without Visual Studio installed, copy the System.Web.Mvc.dll from your dev box to the build server and register it there.

  • Upgrading TFS 2010 from RC to RTM

    Just did a test upgrade on my virtual 2008 server from the RC version of TFS 2010 to RTM. I’ve a single-server installation and the instructions for upgrade is to first backup the server and the database, uninstall the RC version, make sure you really did a backup then install TFS 2010 RTM. There’s an upgrade option, make sure to select it! The upgrade will find (sometimes with a little help from the user) the old TFS databases and such and migrate/upgrade them.

    I stomped on a couple of things, first I got a couple of warnings related to Sharepoint during the final parts of the install/upgrade. For example:

    TF205016: Required permissions could not be granted to the service account for the SharePoint Web application in Team Foundation Server. The following error occurred: TF249063: The following Web service is not available: http://win2k8:17012/_vti_bin/TeamFoundationIntegrationService.asmx. This Web service is used for the Team Foundation Server Extensions for SharePoint Products. The underlying error is: The remote server returned an error: (503) Server Unavailable..

    The reason in this case was that the service-account use for the Sharepoint Central Administration v3 application pool was somehow out of sync and the application pool was stopped. I fix this I made sure the account was correct and had correct password, made sure the app pool was started and that I could access the Sharepoint admin web app.

    The other thing that went kind of wrong was a build configuration I had. It failed with error:

       The working folder C:\Builds\xxxxx is already in use by the workspace 1_1_WIN2K8;NT AUTHORITY\NETWORK SERVICE on computer WIN2K8.

    The name of my virtual server is of course WIN2K8 (I know, really creative but I was tired).

    So, this may have to do with me using a virtual server and such, but I just removed the workspace with the tf-command:

       tf workspace /delete /server:http://WIN2K8:8080 “1_1_WIN2K8;NT AUTHORITY\NETWORK SERVICE“

    After that the build runs just fine.