简体   繁体   中英

Azure Service Bus working behind proxy

I am using the Azure service bus via the SDK, It is all working fine but I am having problems which I think are proxy related. With IE running it all works fine, but if it is not running the messages fails to send. I am setting the proxy up in code but was wondering if I am doing this correctly for the service bus SDK

WebProxy proxy = new WebProxy(m_Config.ProxyAddress);
proxy.Credentials = new NetworkCredential(ProxyUser, ProxyPassword, ProxyDomain);

WebRequest.DefaultWebProxy = proxy;

QueueClient client = QueueClient.CreateFromConnectionString(connectionString, queueName);

client.Send(message);

Solved the issue, the problem as that for some reason I had to force " ServiceBusEnvironment.SystemConnectivity.Mode = ConnectivityMode.Http" as AutoDetect was not working as expected. Works fine now

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM