2
TFSの特定のタスクやバグを姉妹会社に表示するためのWebサイトを作成しました。問題(prob認証)ウェブサイト経由でTFS 2008に接続する
私のマシンで正常に動作しますが、展開されません。常にスローされる下"Work Item Store is null"
で例外ライブで
誰でもしてください助けることはできますか?
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");
そして、私のMyCredentialsクラス...
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
}
[this](http://msdn.microsoft.com/en-us/library/bb286958) (VS.90).aspx)の例があなたに適していますか? – KMoraz
いいえ、見ていただきありがとうございます。最後にあきらめて、スプレッドシートを電子メールで送信するプログラムを作成しました! –