[rabbitmq-discuss] c# wget gets 401 from RabbitMQ 3.0.1 management plugin

linda linda.linda.guo at gmail.com
Thu Jan 17 22:41:55 GMT 2013


I have a c# app to poll vhost/queue from http management plugin. It works
fine with RabbitMQ 2.7. After upgrading to 3.0.1, the app gets 401. The app
uses guest user. I can log into the server 3.0 with guest user and the guest
has all the permissions. Does 3.0.1 change the authentication?

string uri = "http://localhost:55672/api/vhosts";

HttpWebRequest req = WebRequest.Create(uri) as HttpWebRequest;

            req.Headers.Add(HttpRequestHeader.Authorization, "Basic
Z3Vlc3Q6Z3Vlc3Q=");   //base64 encode guest:guest

            req.ContentType = "application/json;";
            req.Proxy = null;
            req.Credentials = new NetworkCredential("guest", "guest");

            using (HttpWebResponse response = req.GetResponse() as
                // Get the response stream 
                StreamReader reader = new

                string responseString = reader.ReadToEnd();

View this message in context: http://rabbitmq.1065348.n5.nabble.com/c-wget-gets-401-from-RabbitMQ-3-0-1-management-plugin-tp24544.html
Sent from the RabbitMQ mailing list archive at Nabble.com.

More information about the rabbitmq-discuss mailing list