Hello,
I have Service Bus for Windows Server 1.1 and I want to connect to a queue via HTTP REST protocol.
I can get a token using the following address :
https://ppatierno-pc:9355/ServiceBusDefaultNamespace/
With my account credentials but when I try to connect to the queue, I receive the error on connection to the remote server.
The code is the following:
string body = "foo"; string token = GetOAuthAccessToken(new Uri("https://ppatierno-pc:9355/ServiceBusDefaultNamespace/"),"myuser", "mypassword", TimeSpan.FromMinutes(10)); string fullAddress = "http://ppatierno-PC/ServiceBusDefaultNamespace/testqueue/messages"; WebClient webClient = new WebClient(); webClient.Headers[HttpRequestHeader.Authorization] = token; webClient.Headers["Content-Type"] = "text/plain"; webClient.UploadData(fullAddress, "POST", Encoding.UTF8.GetBytes(body));
Why ?
Thanks,
Paolo.
Paolo Patierno