我想寫一個使用YourackSharp包裝到quert = y youTrack的客戶門戶。youtrack sharp DeserializationException
上有錯誤追蹤來回項目中的錯誤:
http://youtrack.codebetter.com/issue/YTSRP-27?projectKey=YTSRP - 但似乎這段代碼被回滾。
重新啓用代碼後。我收到以下錯誤。
誤差變換System.Collections.Generic.List`1 [[System.Object的,mscorlib程序,版本= 4.0.0.0,文化=中性公鑰= b77a5c561934e089]]到YouTrackSharp.Issues.IssueStack跡:
at JsonFx.Serialization.DataReader`1.ReadSingle(ITextTokenizer`1 tokenizer, IEnumerable`1 tokens, Type targetType)
at JsonFx.Serialization.DataReader`1.Read(String input, Type targetType)
at JsonFx.Serialization.DataReader`1.Read[TResult](String input)
at EasyHttp.Codecs.DefaultDecoder.DecodeToStatic[T](String input, String contentType)
at EasyHttp.Http.HttpResponse.StaticBody[T]()
at YouTrackSharp.Infrastructure.Connection.Get[T](String command)
at YouTrackSharp.Issues.IssueManagement.GetAllIssuesForProject(String projectIdentifier, Int32 max, Int32 start)
at TasksProxy.YouTrackServer.GetProjectIssues(IProxyProject project) in C:\Code\RadicalGeekMVC\TasksProxy\YouTrackServerConnection.cs:line 74
at RadicalGeek.Models.Project.GetTasks() in C:\Code\RadicalGeekMVC\RadicalGeek\Models\Project.cs:line 51
at ASP._Page_Views_Portal_Index_cshtml.Execute() in c:\Code\RadicalGeekMVC\RadicalGeek\Views\Portal\Index.cshtml:line 152
at System.Web.WebPages.WebPageBase.ExecutePageHierarchy()
at System.Web.Mvc.WebViewPage.ExecutePageHierarchy()
at System.Web.WebPages.StartPage.RunPage()
at System.Web.WebPages.StartPage.ExecutePageHierarchy()
at System.Web.WebPages.WebPageBase.ExecutePageHierarchy(WebPageContext pageContext, TextWriter writer, WebPageRenderingBase startPage)
at System.Web.Mvc.RazorView.RenderView(ViewContext viewContext, TextWriter writer, Object instance)
at System.Web.Mvc.BuildManagerCompiledView.Render(ViewContext viewContext, TextWriter writer)
at System.Web.Mvc.ViewResultBase.ExecuteResult(ControllerContext context)
at System.Web.Mvc.ControllerActionInvoker.InvokeActionResult(ControllerContext controllerContext, ActionResult actionResult)
at System.Web.Mvc.ControllerActionInvoker.<>c__DisplayClass1c.<InvokeActionResultWithFilters>b__19()
at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func`1 continuation)
此錯誤在連接類的第103行上引發。
var staticBody = httpRequest.Get(_uriConstructor.ConstructBaseUri(command))。StaticBody();該方法是這樣的:
` public T Get<T>(string command)
{
var httpRequest = CreateHttpRequest();
try
{
var staticBody = httpRequest.Get(_uriConstructor.ConstructBaseUri(command)).StaticBody<T>();
HttpStatusCode = httpRequest.Response.StatusCode;
return staticBody;
}
catch (HttpException httpException)
{
if (httpException.StatusCode == HttpStatusCode.Forbidden)
{
throw new InvalidRequestException(Language.Connection_Get_Insufficient_rights);
}
throw;
}
}`
如果誰能給我任何幫助,因爲我真的需要訪問項目的自定義字段。
的代碼更改我已經implimented可以被視爲了在該變更回滾的變化:
https://github.com/JetBrains/YouTrackSharp/commit/fc488364b0787deae82d9b0fd3891e21be23bb10
謝謝。
你碰巧看到這個,你可以分享解決方案 - 我得到了相同的堆棧跟蹤(我很欣賞這個更可能是JsonFx) –