1
我一直在使用Manatee.Trello來掃描我們Trello主板上的卡片以進行報告。但是,今天早上已經工作數週的掃描代碼停止工作。它似乎在給出一個HttpRequestException:'無效標記'。使用Manatee.Trello時無效令牌
下面是一個簡短的例子,它根據wiki頁Manatee.Trello Usage中的例子演示了這個問題。它正試圖訪問Trello.com歡迎板。
using System;
using System.Diagnostics;
using Manatee.Trello;
using Manatee.Trello.ManateeJson;
using Manatee.Trello.WebApi;
using Manatee.Trello.Exceptions;
namespace MspUpdate
{
class Program
{
static void Main(string[] args)
{
string BrdNm;
Exception innerException = null;
TrelloInteractionException te = new TrelloInteractionException(innerException);
var serializer = new ManateeSerializer();
TrelloConfiguration.Serializer = serializer;
TrelloConfiguration.Deserializer = serializer;
TrelloConfiguration.JsonFactory = new ManateeFactory();
TrelloConfiguration.RestClientProvider = new WebApiClientProvider();
TrelloAuthorization.Default.AppKey = "MyAppKey";
TrelloAuthorization.Default.UserToken = "MyUserToken";
var board = new Board("7yuDFMwI");
Debug.WriteLine(board);
}
}
}
以下是異常的詳細信息:
System.AggregateException occurred
HResult=0x80131500
Message=One or more errors occurred.
Source=Manatee.Trello
StackTrace:
at Manatee.Trello.Internal.ExceptionHandling.DebugLog.Error(Exception e, Boolean shouldThrow)
at Manatee.Trello.Internal.DataAccess.JsonRepository.ValidateResponse(IRestRequest request)
at Manatee.Trello.Internal.DataAccess.JsonRepository.Execute[T](TrelloAuthorization auth, Endpoint endpoint, IDictionary`2 parameters)
at Manatee.Trello.Internal.Synchronization.BoardContext.GetData()
at Manatee.Trello.Internal.Synchronization.SynchronizationContext`1.Merge()
at Manatee.Trello.Internal.Synchronization.SynchronizationContext.Synchronize(Boolean force)
at Manatee.Trello.Board.ToString()
at System.Diagnostics.TraceListener.WriteLine(Object o)
at System.Diagnostics.TraceInternal.WriteLine(Object value)
at System.Diagnostics.Debug.WriteLine(Object value)
at MspUpdate.Program.Main(String[] args) in C:\Users\Bruce Pike Rice\Documents\Source\a2\JiraInteraction\Program.cs:line 33
Inner Exception 1:
HttpRequestException: Trello reported an error: 'invalid token'
預先感謝您的關注。
BruceP