Hi guys,
I’m struggling to get .NET to talk to the Mingle API. I’ve tried a plethora of combinations and nothing is working. I’ve also installed Mingle in multiple configurations (local, remote, LDAP, no LDAP, etc.).
On every setup I can visit a page (say cards.xml) in the browser only after logging into the site via the login page and not logging out. If I log out or don’t log in, I get a 401 error (Unauthorized or incorrect username or password).
The “http://username:password@server:port/projects/projectname/cards.xml” format simply doesn’t work in any Windows environment (XP, 2003 server, Vista) I try.
If someone can provide a zip of a working example in .NET (VB.NET or C#, doesn’t matter) that they can get working I would like to see it. Obviously there’s something wrong I’m doing or have in my setup.
Thanks.
Comments
5 comments
Hey,
I’ve managed to create an example in c# and published it on my blog here .
In the example I fetch the user list, but I think you can use it as a starting point for the other api functions.
Also, did you enable the basic auth? I think that the configuration file is whitespace sensitive, so (as I talk about in the post) “basic_auth_enabled: true” worked, and “basic_auth_enabled:true” didn’t seem to. But I’d like to hear from someone who actually knows what’s going on in the yaml parser if this is so, or if it was my confusion while trying to get .NET to work.
Feel free to post questions, I’d love to hear other’s experiences while using the API.
Bruno,
Thanks for the link and example. For whatever reason I still cannot get it to work in the client environment. Something is screwy here and I don’t think I can get any rest api calls to work (except in the browser directly). Code just doesn’t work for me as I always get a 401 error back.
I have the exact same problem, with Mingle 2.0.1 (latest download as of today) installed on my Windows XP. The APIs work from Firefox after I’ve logged in to Mingle myself, but not when I’m not logged in (and hence not from Ruby ActiveResource or Net::HTTP code either).
I tried various configuration options but could not get it to work. I’ve posted about it here: http://studios.thoughtworks.com/discussion/forums/10/topics/612
Aman, I have posted a response to your questions on how to configure basic authentication in your other post. If basic authentication is not setup as described, you will have problems using the API. Do let us know if you continue to face problems.
Thanks Badri. It works for me now. And yeah, I was being silly and updating the config file in the installation directory, not the data directory. Umm… could you please update the help text to explicitly say, “To enable basic authentication, you need set the basic_auth_enabled configuration option to true in the Mingle data directory/config/auth_config.yml file, where Mingle data directory is the path to the mingle data directory you chose during installation, and NOT the directory where Mingle is installed”. :-) It will be a help for users like me who are always in a hurry to get things running.
Please sign in to leave a comment.