-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?

Maverick Meerkat
  • 5,737
  • 3
  • 47
  • 66
  • Ask **one** question per 'question'. See https://meta.stackexchange.com/questions/222735/can-i-ask-only-one-question-per-post –  Nov 14 '17 at 15:04
  • I have one issue - it's not working. I'm trying 3 possible ways to solve it and give the information here. – Maverick Meerkat Nov 14 '17 at 15:07
  • Then perhaps you should edit the part of the question where you say you have a "few issues" and then go on to describe three separate issues? –  Nov 14 '17 at 15:08
  • @Amy have you ever worked with YouTrackSharp? Or just YouTrack for that matter? – Maverick Meerkat Nov 14 '17 at 15:14
  • 2.x branch is abandoned long ago: "Be aware that these older branches are frozen and bug fixes nor new feature development is done on them.". I'd use 3.x if I were you. As for the error, it seems that you're trying access cloud YouTrack via plain http port 80. This is not going to work, please use https:// urls and port 443 instead. – Jk1 Nov 15 '17 at 09:03

2 Answers2

1

the 1.3 refers to .NETStandard - NOT .Net Framework. These are not the same thing.

You need .Net Framework 4.6 or up for .Net Standard 1.3 compatibility.

See here: https://learn.microsoft.com/en-us/dotnet/standard/net-standard

I'd go directly to jetbrains for the other parts...

GPW
  • 2,528
  • 1
  • 10
  • 22
0

For anyone else getting stuck:

my YouTrack account was like this:

https://mycompanyname.myjetbrains.com/youtrack

Since it uses SSL (i.e. https) I had to mark the SSL parameter true instead of false, and mark port 443 instead of 80. Also I had to add the "youtrack" as a parameter. So the end result looks like this:

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

I only had to do this in v.2, as I mentioned, v.3.0.0+ has working examples in their blog.

Maverick Meerkat
  • 5,737
  • 3
  • 47
  • 66