Login with correct user name and password does not work (company account). C# (Solved)
Added by Gevorg Hoghmrtsyan 7 months ago
Hi,
after the last update of Redmine, logging with the correct user name and password no longer works. Here is the code.
RedmineManager o_Login = new RedmineManager(host, username, password, MimeFormat.Json);
Then I took my apikey and was able to log in successfully.
RedmineManager o_Login = new RedmineManager(host, ApiKey, MimeFormat.Json);
But i need to login with username and password, so that i can get the apikey.
I think there is a change in the structure of the username, but I can't find anything helpful. I've been stuck on this for 2 days, would be very grateful if I could get some help.
Thanks in advance.
Gevorg
Replies (4)
RE: Login with correct user name and password does not work (company account). C# - Added by Holger Just 7 months ago
What is the actual HTTP request you are performing there? What is the exact response you get back from Redmine? What does Redmine log into log/production.log
with your request?
RE: Login with correct user name and password does not work (company account). C# - Added by Gevorg Hoghmrtsyan 7 months ago
Hi,
host = "http://redmine.*.de/redmine"; ( * is the company name)
Response from Redmine : Unauthorized (401),
but i can login with the same username and password on the website.
RE: Login with correct user name and password does not work (company account). C# - Added by Holger Just 7 months ago
As written, you should check the response body sent by Redmine. Often, it contains additional details about the cause of this error. A possible issue could be that the REST API may have been disabled globally. However, with the very scarce details you have provided so far, it's difficult to say anything definitely from my end.
In any case, the Administrator of your Redmine server will likely be able to further check the server logs in order to figure out the root cause of your issue.
RE: Login with correct user name and password does not work (company account). C# (Solved) - Added by Gevorg Hoghmrtsyan 7 months ago
The problem was in host. It schould be
host = "https://redmine.*.de/redmine"
httpS
Thank you anyway