views:

125

answers:

1

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?

+2  A: 

I ended up solving this by using specifing 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>
Cleggy