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
DMDM 

login is timing out before completing

Hi,

I am looking for some advice. Anything you can tell me would be greatly appreciated.

I have recently deployed a .net .aspx form on a server outside my company's internal corporate network.

The form is unable to communicate with salesforce through the enterprise edition api. I have downloaded the latest WSDL file.

The error message I am getting seems to indicate that the connection request is timing out before the login completes.  I am using the login code from the vb.net 5.0 api samples

In the past, when I deployed .aspx forms for internal use only, I had to supply network credentials to the login code in order to get past my company's proxy server and communicate with salesforce.

Since this latest form is deployed on an externally accessable server I am guessing that this server's firewall is preventing my form from connecting to salesforce.

I have looked at some other postings which have suggested opening port 443 since the API uses https and putting in firewall exceptions for 63.146.199.* block of ips which the salesforce servers use. My server admin believes that opening port 443 should be sufficient and there is no need to put in firewall exceptions for that block of ips. Does anyone have any comments on this?

Can anyone tell me what the exact sequence of events for an api login is? Are other ports or ip's used?

Is there some commonly understood way to supply some necessary information example credentials to the firewall. If I was running a form internally I would supply credentials to the proxy during the salesforce login.

Or am I missing something here.

Thanks

Dan

 

DevAngelDevAngel

Hi Dan,

Port 443 should be all you need to open.  You can test if this is the problem by trying the login using http instead of https.  This should only be done as a test as we don't want people accessing salesforce.com either from the browser or the api in an unsecured way.

DMDM

Hi Dave,

Can you give me an idea of what changes I would need to make in order to use Http instead of Https for the api login.

Is there something I should change in the code or the wsdl?

Thanks for your time,

Dan

 

DMDM

Hi again,

Here is some more information on my login failure.

The the following stack trace is generated when the login fails:

The operation has timed-out.
System at System.Net.HttpWebRequest.GetRequestStream() at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters) at SforceService.login(String username, String password) at RSVP.WebForm1.login() in c:\inetpub\wwwroot\RSVP\WebToLead.aspx.vb:line 252

According to my server admin the code is on the F: drive  not the C: and in a completely different path.

Why would a stack trace print out the wrong path?


As well, my server admin was watching the output of the test on netstat, and did not see any attempt to reach the salesforce IP address but I know that the login code is getting called and it will run on an internal server fine if add two lines of code to supply network login credientials to the proxy during the login call.

But for some reason the same login code fails on an external server.

DevAngelDevAngel

Before the login do

binding.url.replace("https:", "http:");

if you want to keep the http setting then after login do

binding.url = loginResult.serverUrl.replace("https:", "http:")

DMDM

Thanks Dave,

I will give that a try and see how that works out.