Azure Service Bus在代理后面工作 [英] Azure Service Bus working behind proxy

查看:56
本文介绍了Azure Service Bus在代理后面工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在通过SDK使用Azure服务总线,一切正常,但是我遇到与代理相关的问题.使用IE运行,一切正常,但如果未运行,则消息发送失败.我正在代码中设置代理,但想知道我是否针对服务总线SDK正确执行了

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);

推荐答案

解决了该问题,由于某种原因,我不得不强制"ServiceBusEnvironment.SystemConnectivity.Mode = ConnectivityMode.Http",因为AutoDetect无法正常工作.现在可以正常使用

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

这篇关于Azure Service Bus在代理后面工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆