Connect using web proxy to allow OAuth to work

528 views Asked by At

I'm running Sitecore.NET 7.0 (rev. 140120) with Social Connected 2.0 (for CMS 7.0).

However - unfortunately our corporate environment requires us to connect via a proxy server, so currently my dev environment does not work.

I reflected the code in Sitecore.Social.Facebook.dll and can see the code in Sitecore.Social.Facebook.Connector.Managers.WebRequestManager.GetResponse() that makes the HTTP requests to facebook.com, and which does not appear to reference a proxy.

I have confirmed on another network without proxy requirements that my setup works well.

Is there a way to specify a proxy for such requests? Can I write my own replacement which will allow a proxy to be configured - if so how do I plug this in?

1

There are 1 answers

0
geedubb On BEST ANSWER

The solution ended up being pretty simple. I added the following into my web.config:

  <system.net>
    <defaultProxy enabled="true" useDefaultCredentials="true">
    </defaultProxy>
  </system.net>

You can also specify other proxy configuration using this method which will affect your whole web application.

MSDN Reference