title: Adding a work item to TFS 2010 from ASP.NET app fails due to permissions
body: <p>I'm working on an ASP.NET webforms app that will serve as a simple intake form to create work items in TFS 2010.</p>
  
  <p>The app works correctly when I run it locally in debug mode--the submission completes and the work item is created. </p>
  
  <p>When I publish the form to our dev server, it yellow screens and throws the following error: </p>
  
  <blockquote>
    <p>[SecurityException: TF50309: The
    following account does not have
    sufficient permissions to complete the
    operation: DOMAINNAME\SERVERNAME$. The
    following permissions are needed to
    perform this operation: View
    collection-level information.]</p>
  </blockquote>
  
  <p>In my code, I'm attempting to access TFS using a service account, and from what I can tell the service account is being used correctly when I run in debug mode.</p>
  
  <p>Here's what my C# looks like:</p>
  
  <pre><code>string tfsServerUrl = "http://servername:8080/tfs";
  string tfsProject = "Web Team Projects";
  NetworkCredential tfsCredential = new NetworkCredential("ServiceAccountName", "password", "DOMAIN");
  TeamFoundationServer tfs = new TeamFoundationServer(tfsServerUrl, tfsCredential);
  tfs.Authenticate();
  WorkItemStore workItemStore = new WorkItemStore(tfsServerUrl);
  </code></pre>
  
  <p>If I set a breakpoint at the tfs.Authenticate() line, the server object shows the service account name as the current user and IsAuthenticated = true.</p>
  
  <p>The line in the exception that mentions SERVERNAME$ is what's stumping me. It's seems like IIS is deciding to try to access TFS with the app pool identity instead of the credentials that I'm explicitly supplying.</p>
  
  <p>Our dev server is a Server 2008 box running IIS 7. </p>
  
  <p>Any suggestions?</p>