function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
PauloPaulo 

Getting the following error when I try to release my webapp.

I am releasing an application that I have created on to another server that uses the sforce API 4.0 and the web app was written in C#. But I am getting the following error. Any ideas?

The underlying connection was closed: Unable to connect to the remote server.

[WebException: The underlying connection was closed: Unable to connect to the remote server.]
   System.Net.HttpWebRequest.CheckFinalStatus() +673
   System.Net.HttpWebRequest.EndGetRequestStream(IAsyncResult asyncResult) +75
   System.Net.HttpWebRequest.GetRequestStream() +132
   System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters) +105
   Credco.Web.SignUp.sforce.SforceService.login(String username, String password) in c:\wwwdev$\signup\Web References\sforce\Reference.cs:46
   Credco.Web.SignUp.AmericorpSatellite.createLead(Customer c) in c:\wwwdev$\signup\mortgage\americorp\default.aspx.cs:133
   Credco.Web.SignUp.AmericorpSatellite.submitBtnClick() in c:\wwwdev$\signup\mortgage\americorp\default.aspx.cs:117
   Credco.Web.SignUp.AmericorpSatellite.Page_Load(Object sender, EventArgs e) in c:\wwwdev$\signup\mortgage\americorp\default.aspx.cs:80
   System.Web.UI.Control.OnLoad(EventArgs e) +67
   System.Web.UI.Control.LoadRecursive() +35
   System.Web.UI.Page.ProcessRequestMain() +731

SuperfellSuperfell
It probably needs to connect via a ProxyServer, and it not configured to do so.
PauloPaulo

Where would I set the proxy server? Do I do it on my codebehind when loging on to salesforce?

SuperfellSuperfell
You can set it up via the application's config file, or programatically using by setting the Proxy property on the client object, e.g.

svc = new sforce.SforceService();
svc.Proxy = new WebProxy("localhost", 5049);
PauloPaulo

Hi Simon,

I have spoken with my network admins and they said that we don't use a webproxy. Any other ideas? Could it be behind a firewall and if it is how would I go about fixing it?

SuperfellSuperfell
Could well be a firewall problem. What happens if you use a browser from that server and try to connect to https://www.salesforce.com/ ?

It's some sort of connectivity issue, it can't make a connection to www.salesforce.com, your network admin folks should be able to help track it down.