指定要与DotNetOpenID一起使用的代理 [英] Specifying a proxy to use with DotNetOpenID

查看:80
本文介绍了指定要与DotNetOpenID一起使用的代理的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用DotNetOpenID为我们的网站提供依赖方OpenID支持.所有外部请求都必须通过代理服务器进行代理,我正在寻找一种方法来告诉DotNetOpenID使用此代理.我知道我可以在web.config中设置全局代理配置,但是我目前只希望将其应用于身份验证期间对OpenID提供程序的调用.这可能吗?

I'm using DotNetOpenID to provide relying party OpenID support for our website. All external requests have to be brokered via a proxy server, and I'm looking for a way to tell DotNetOpenID to use this proxy. I know I can set up a global proxy config in web.config, but I currently only want this to apply to the calls made to the OpenID provider during authentication. Is this possible?

推荐答案

我最终通过在web.config中指定代理,并指定了旁路列表来解决此问题,因此只有外部请求才能使用代理服务器:

I ended up solving this by using specifying a proxy in web.config, with a bypasslist specified so only external requests would use the proxy server:

<system.net>
  <defaultProxy>
    <proxy
      usesystemdefault = "False"
      proxyaddress="http://myproxyserver:8080"
      bypassonlocal="True"
    />
    <bypasslist>
      <add address="[a-z]+\.mydomain\.com"/>
      <add address="[a-z]+\.myotherdomain\.com"/>
    </bypasslist>
  </defaultProxy>
</system.net>

这篇关于指定要与DotNetOpenID一起使用的代理的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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