amo*_*lbk 7 azure proxy-server
我的'LocalClient'应用程序位于HTTP代理服务器(ISA)后面的公司LAN中.我做的第一个Azure API调用CloudQueue.CreateIfNotExist()- 导致异常:(407)需要代理身份验证.我试过以下事情:
<System.Net> defaultProxy元素添加到app.config,但它似乎不起作用(参考:http://geekswithblogs.net/mnf/archive/2006/03/08/71663.aspx).根据MSDN,只有在开发存储的情况下,才能在连接字符串中指定HTTP代理服务器(请参阅http://msdn.microsoft.com/en-us/library/ee758697.aspx):
UseDevelopmentStorage=true;DevelopmentStorageProxyUri=http://myProxyUri
有没有办法通过代理服务器连接到Azure存储?
我实际上发现不需要自定义代理解决方案.
将以下内容添加到app.config(就在之前</configuration>)为我做了诀窍:
<system.net>
<defaultProxy enabled="true" useDefaultCredentials="true">
<proxy usesystemdefault="true" />
</defaultProxy>
</system.net>
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
15372 次 |
| 最近记录: |