1

I am trying to access service bus via a squid3 webproxy with Basic authentication enabled in the proxy using C#

i am using below code to set the web proxy

webproxy webproxy = new webproxy("http://weproxyuri:port", false);
webproxy.credentials = new networkcredential("username", "password","domain");
WebRequest.DefaultWebProxy = webProxy

i am using below code to access service bus

MessagingFactory messagingFactory =  MessagingFactory.CreateFromConnectionString(connectionstring);
QueueClient queueSendClient = messagingFactory.CreateQueueClient(queuename);
var bm1 = queueSendClient.Peek();

access of service bus is failing with error - The X.509 certificate CN=servicebus.windows.net is not in the trusted people store

in the proxy log i am seeing 1454679317.842 0 10.168.84.150 TCP_DENIED/407 4046 GET http://www.microsoft.com/pki/mscorp/msitwww2.crt - HIER_NONE/- text/html

in the network traces i am seeing host trying to connect to http://www.microsoft.com/pki/mscorp/msitwww2.crt first it is trying to connect with out authentication then proxy is saying HTTP/1.1 407 Proxy Authentication required as a response to the request for this ideally host should resend the request with Proxy-Authorization Header which contains username and password but i am seeing a weird behavior where host is not send the Proxy-Authorization Header in the second time

any registry key needs to be set ?

i am using windows core 2012 R2 as host

  • What is the service bus connectivity mode set to ? If it is Auto then consider changing it to Http and try. I suppose it must work. – Venki Feb 19 '16 at 12:33

1 Answers1

0

this issue is fixed in 3.0.50496.1 or higher version of Microsoft.ServiceBus.dll