title: Issue (prob Authentication) Connecting to TFS 2008 via a Website
body: <p>I've written a website to display certain tasks and bugs in TFS to our sister company.</p>
  
  <p>It works fine on my machine ... but not deployed.</p>
  
  <p>In live the exception at the bottom <code>"Work Item Store is null"</code> is always thrown ...</p>
  
  <p>Can anyone assist please?</p>
  
  <pre><code>ICredentialsProvider credentials = new MyCredentials("myusername", "mydomain", "mypassword");
  
  var tfsProjectCollection = TfsTeamProjectCollectionFactory.GetTeamProjectCollection(new Uri(tfsURL), credentials);
  
  tfsProjectCollection.EnsureAuthenticated();
  
  var wis = (WorkItemStore)tfsProjectCollection.GetService(typeof(WorkItemStore));
  
  if (wis == null) throw new Exception("Work Item Store is null");
  </code></pre>
  
  <p>And my MyCredentials class ...</p>
  
  <pre><code>public class MyCredentials : ICredentialsProvider
  {
      private NetworkCredential credentials;
  
      #region ICredentialsProvider Members
  
      public MyCredentials(string user, string domain, string password)
      {
          credentials = new NetworkCredential(user, password, domain);
      }
  
      public ICredentials GetCredentials(Uri uri, ICredentials failedCredentials)
      {
          return credentials;
      }
  
      public void NotifyCredentialsAuthenticated(Uri uri)
      {
      }
  
      #endregion
  }
  </code></pre>