Reputation: 73
I'm writing a program in C# with the Redmine Api and I only can login through
var manager = new RedmineManager("http://srvredmine/login", username, password);
and if I use simple task like
var user = manager.GetCurrentUser();
Console.WriteLine(user);
I get a NotFoundException occurred in redmine-net45-api.dll
I changed to RedmineWebClient because it works better for me. For example I want to download a Wiki page then I use
MessageBox.Show(manager.DownloadString("http://srvredmine/projects/sports").ToString());
And for login I use
NetworkCredential credentials = new NetworkCredential(username, password, "http://srvredmine/login/");
RedmineWebClient manager = new RedmineWebClient();
manager.BaseAddress = "http://srvredmine/";
manager.Credentials = credentials;
But in the messageBox i only get the string of the login page.
Upvotes: 2
Views: 2397
Reputation: 73
Just asked a developer. The Redmine Version is too old to use RedmineManager and RedmineWebClient is not that useful for me.
Upvotes: 1
Reputation: 28499
Try to remove "login" from the url you pass to the RedmineManager()
constructor.
var manager = new RedmineManager("http://srvredmine/", username, password);
The API expects the base URL to the server, not to a specific function.
Upvotes: 1