Question

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?

Was it helpful?

Solution

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>
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top