title: DotNetOpenAuth...CreatRequest breaks on server (Works on my machine ;-)
body: <p>I've created a site based on the ASP.NET MVC 4 Web Application. I have enabled the OpenAuth login providers for Twitter, Facebook and Google by following the instructions in AuthConfig.cs.</p>
  
  <p>This works fine when the site is debugged on my local machine from Visual Studio on IIS Express. However, when I copy the site over to another machine, the entire site works fince, except anything that uses open auth.</p>
  
  <p>On this machine I can access twitter, facebook and google using the browser. </p>
  
  <p>When I try to log on using my site I get:
  for Google: "<strong>Sequence contains no elements</strong>" with the stacktrace pointing at</p>
  
  <blockquote>
    <p>[InvalidOperationException: Sequence contains no elements]
       System.Linq.Enumerable.First(IEnumerable`1 source) +514
       DotNetOpenAuth.OpenId.RelyingParty.OpenIdRelyingParty.CreateRequest(Identifier userSuppliedIdentifier, Realm realm, Uri returnToUrl) +106</p>
    
    <p>[ProtocolException: No OpenID endpoint found.]
       DotNetOpenAuth.OpenId.RelyingParty.OpenIdRelyingParty.CreateRequest(Identifier userSuppliedIdentifier, Realm realm, Uri returnToUrl) +303
       DotNetOpenAuth.AspNet.Clients.OpenIdClient.RequestAuthentication(HttpContextBase context, Uri returnUrl) +135
       DotNetOpenAuth.AspNet.OpenAuthSecurityManager.RequestAuthentication(String returnUrl) +666
       NotesBoard.Controllers.ExternalLoginResult.ExecuteResult(ControllerContext context) in d:\dtaylor\Documents\Visual Studio 2012\Projects\NotesBoard\NotesBoard\Controllers\AccountController.cs:369
       System.Web.Mvc.&lt;>c_<em>DisplayClass1a.b</em>_17() +33
       System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func<code>1 continuation) +613
       System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func</code>1 continuation) +613
       System.Web.Mvc.ControllerActionInvoker.InvokeActionResultWithFilters(ControllerContext controllerContext, IList`1 filters, ActionResult actionResult) +263
       System.Web.Mvc.Async.&lt;>c_<em>DisplayClass25.b</em>_22(IAsyncResult asyncResult) +240
       System.Web.Mvc.&lt;>c_<em>DisplayClass1d.b</em>_18(IAsyncResult asyncResult) +28
       System.Web.Mvc.Async.&lt;>c_<em>DisplayClass4.b</em>_3(IAsyncResult ar) +15
       System.Web.Mvc.Controller.EndExecuteCore(IAsyncResult asyncResult) +53
       System.Web.Mvc.Async.&lt;>c_<em>DisplayClass4.b</em>_3(IAsyncResult ar) +15
       System.Web.Mvc.&lt;>c_<em>DisplayClass8.b</em>_3(IAsyncResult asyncResult) +42
       System.Web.Mvc.Async.&lt;>c_<em>DisplayClass4.b</em>_3(IAsyncResult ar) +15
       System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +606
       System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean&amp; completedSynchronously) +288</p>
  </blockquote>
  
  <p>For Twitter I get: "<strong>A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond 199.16.156.72:443</strong>" with the following Stack trace</p>
  
  <blockquote>
    <p>[SocketException (0x274c): A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond 199.16.156.72:443]
       System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress) +273
       System.Net.ServicePoint.ConnectSocketInternal(Boolean connectFailure, Socket s4, Socket s6, Socket&amp; socket, IPAddress&amp; address, ConnectSocketState state, IAsyncResult asyncResult, Exception&amp; exception) +584</p>
    
    <p>[WebException: Unable to connect to the remote server]
       System.Net.HttpWebRequest.GetResponse() +8527180
       DotNetOpenAuth.Messaging.StandardWebRequestHandler.GetResponse(HttpWebRequest request, DirectWebRequestOptions options) +261</p>
    
    <p>[ProtocolException: Error occurred while sending a direct message or getting the response.]
       DotNetOpenAuth.Messaging.StandardWebRequestHandler.GetResponse(HttpWebRequest request, DirectWebRequestOptions options) +1862
       DotNetOpenAuth.Messaging.Channel.RequestCore(IDirectedProtocolMessage request) +516
       DotNetOpenAuth.Messaging.Channel.Request(IDirectedProtocolMessage requestMessage) +138
       DotNetOpenAuth.Messaging.Channel.Request(IDirectedProtocolMessage requestMessage) +45
       DotNetOpenAuth.OAuth.ConsumerBase.PrepareRequestUserAuthorization(Uri callback, IDictionary<code>2 requestParameters, IDictionary</code>2 redirectParameters, String&amp; requestToken) +202
       DotNetOpenAuth.AspNet.Clients.DotNetOpenAuthWebConsumer.RequestAuthentication(Uri callback) +88
       DotNetOpenAuth.AspNet.OpenAuthSecurityManager.RequestAuthentication(String returnUrl) +666
       NotesBoard.Controllers.ExternalLoginResult.ExecuteResult(ControllerContext context) in d:\dtaylor\Documents\Visual Studio 2012\Projects\NotesBoard\NotesBoard\Controllers\AccountController.cs:369
       System.Web.Mvc.&lt;>c_<em>DisplayClass1a.b</em>_17() +33
       System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func<code>1 continuation) +613
       System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func</code>1 continuation) +613
       System.Web.Mvc.ControllerActionInvoker.InvokeActionResultWithFilters(ControllerContext controllerContext, IList`1 filters, ActionResult actionResult) +263
       System.Web.Mvc.Async.&lt;>c_<em>DisplayClass25.b</em>_22(IAsyncResult asyncResult) +240
       System.Web.Mvc.&lt;>c_<em>DisplayClass1d.b</em>_18(IAsyncResult asyncResult) +28
       System.Web.Mvc.Async.&lt;>c_<em>DisplayClass4.b</em>_3(IAsyncResult ar) +15
       System.Web.Mvc.Controller.EndExecuteCore(IAsyncResult asyncResult) +53
       System.Web.Mvc.Async.&lt;>c_<em>DisplayClass4.b</em>_3(IAsyncResult ar) +15
       System.Web.Mvc.&lt;>c_<em>DisplayClass8.b</em>_3(IAsyncResult asyncResult) +42
       System.Web.Mvc.Async.&lt;>c_<em>DisplayClass4.b</em>_3(IAsyncResult ar) +15
       System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +606
       System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean&amp; completedSynchronously) +288</p>
  </blockquote>
  
  <p>Facebook on the other hand actually prompts me for a username and password but then also comes back with "<strong>A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond 173.252.100.27:443</strong>" and the following stack trace:</p>
  
  <blockquote>
    <p>[SocketException (0x274c): A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond 173.252.100.27:443]
       System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress) +273
       System.Net.ServicePoint.ConnectSocketInternal(Boolean connectFailure, Socket s4, Socket s6, Socket&amp; socket, IPAddress&amp; address, ConnectSocketState state, IAsyncResult asyncResult, Exception&amp; exception) +584</p>
    
    <p>[WebException: Unable to connect to the remote server]
       System.Net.WebClient.DownloadDataInternal(Uri address, WebRequest&amp; request) +3624556
       System.Net.WebClient.DownloadString(Uri address) +213
       DotNetOpenAuth.AspNet.Clients.FacebookClient.QueryAccessToken(Uri returnUrl, String authorizationCode) +399
       DotNetOpenAuth.AspNet.Clients.OAuth2Client.VerifyAuthentication(HttpContextBase context, Uri returnPageUrl) +186
       DotNetOpenAuth.AspNet.OpenAuthSecurityManager.VerifyAuthentication(String returnUrl) +502
       Microsoft.Web.WebPages.OAuth.OAuthWebSecurity.VerifyAuthenticationCore(HttpContextBase context, String returnUrl) +250
       NotesBoard.Controllers.AccountController.ExternalLoginCallback(String returnUrl) in d:\dtaylor\Documents\Visual Studio 2012\Projects\NotesBoard\NotesBoard\Controllers\AccountController.cs:225
       lambda_method(Closure , ControllerBase , Object[] ) +127
       System.Web.Mvc.ReflectedActionDescriptor.Execute(ControllerContext controllerContext, IDictionary<code>2 parameters) +274
       System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary</code>2 parameters) +39
       System.Web.Mvc.Async.&lt;>c_<em>DisplayClass39.b</em>_33() +120
       System.Web.Mvc.Async.&lt;>c_<em>DisplayClass4f.b</em>_49() +452
       System.Web.Mvc.Async.&lt;>c_<em>DisplayClass4f.b</em>_49() +452
       System.Web.Mvc.Async.&lt;>c_<em>DisplayClass37.b</em>_36(IAsyncResult asyncResult) +15
       System.Web.Mvc.Async.&lt;>c_<em>DisplayClass2a.b</em>_20() +33
       System.Web.Mvc.Async.&lt;>c_<em>DisplayClass25.b</em>_22(IAsyncResult asyncResult) +240
       System.Web.Mvc.&lt;>c_<em>DisplayClass1d.b</em>_18(IAsyncResult asyncResult) +28
       System.Web.Mvc.Async.&lt;>c_<em>DisplayClass4.b</em>_3(IAsyncResult ar) +15
       System.Web.Mvc.Controller.EndExecuteCore(IAsyncResult asyncResult) +53
       System.Web.Mvc.Async.&lt;>c_<em>DisplayClass4.b</em>_3(IAsyncResult ar) +15
       System.Web.Mvc.&lt;>c_<em>DisplayClass8.b</em>_3(IAsyncResult asyncResult) +42
       System.Web.Mvc.Async.&lt;>c_<em>DisplayClass4.b</em>_3(IAsyncResult ar) +15
       System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +606
       System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean&amp; completedSynchronously) +288</p>
  </blockquote>
  
  <p>PS. It's worth mentioning that we access the internet via a proxy, which is set up on the server in IE. I haven't found any code in the provided templates that let me specify proxy servers etc.</p>
  
  <p>Help please.</p>