[rabbitmq-discuss] c# wget gets 401 from RabbitMQ 3.0.1 management plugin
Simon MacMullen
simon at rabbitmq.com
Fri Jan 18 08:42:31 GMT 2013
Authentication did not change in any significant way.
One thing to note is that the port changed from 55672 to 15672. The API
should give you a 301 redirect which presumably the HttpWebRequest is
handling for you - but maybe that causes it to forget authentication
information? I would change the port to 15672 and see if that helps.
Cheers, Simon
On 17/01/2013 10:41PM, linda wrote:
> Hi,
>
> 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
> HttpWebResponse)
> {
> // Get the response stream
> StreamReader reader = new
> StreamReader(response.GetResponseStream());
>
> 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.
> _______________________________________________
> rabbitmq-discuss mailing list
> rabbitmq-discuss at lists.rabbitmq.com
> https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
>
More information about the rabbitmq-discuss
mailing list