-4

Trying to open an issue from a C# app.

Few issues:

1) UPDATE: I realize it only supports .NET Standard 1.3 = Framework 4.6; So no issue here.

2) I install version 2.0.31 (and less) - When I try to set up a connection, it says "Method not allowed":

var connection = new Connection("xxxx.myjetbrains.com", 80, false, "youtrack");
connection.Authenticate("xxxxx", "xxxxxx");
var issueManagement = new IssueManagement(connection);
dynamic issue = new Issue();
issue.Assignee = "xxxxx";
issue.ProjectShortName = "CV";
issue.Type = "Bug";
issue.Summary = "Test";
issue.Description = "Testing 1 2 3 ...";
issueManagement.CreateIssue(issue);

connection.Authenticate throws the error.

3) If I don't specify other parameters in Connection and leave only the basic url, I get the following error (again in connection.Authenticate):

For security reasons DTD is prohibited in this XML document. To enable DTD processing set the DtdProcessing property on XmlReaderSettings to Parse and pass the settings into XmlReader.Create method.

Can't seem to find much info on this online. Anyone has any idea what to do?

4

2 回答 2

1

1.3 指的是.NETStandard - 不是 .Net 框架。这些不是一回事。

您需要 .Net Framework 4.6 或更高版本才能兼容 .Net Standard 1.3。

请参阅此处: https ://docs.microsoft.com/en-us/dotnet/standard/net-standard

我会直接去jetbrains做其他部分......

于 2017-11-14T15:18:14.713 回答
0

对于其他陷入困境的人:

我的 YouTrack 帐户是这样的:

https://mycompanyname.myjetbrains.com/youtrack

由于它使用 SSL(即 https),我必须将 SSL 参数标记为 true 而不是 false,并将端口标记为 443 而不是 80。我还必须添加“youtrack”作为参数。所以最终的结果是这样的:

var connection = new Connection("xxxx.myjetbrains.com", 443, true, "youtrack");
connection.Authenticate("xxxx@xxxx.xxx", "xxxx");

我只需要在 v.2 中执行此操作,正如我所提到的,v.3.0.0+ 在他们的博客中有工作示例。

于 2017-11-14T18:54:15.180 回答