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
David ZhuDavid Zhu 

There was no endpoint listening at https://test.salesforce.com/services/Soap/c/32.0 that could accept the message.

Hi All,
I am practicing SOAP API call using Enterprise WSDL in a Windows application on .NET 3.5. The code is very simple:

            JumpStart.WSDL.SoapClient loginClient = new SoapClient();
            try
            {
                loginClient.login(null, username, password);
            }
            catch (System.Exception e)
            {
                ......
            }
 
 It keeps getting the following error and I am not sure what to check.  
I also have app.config file pasted below.


Thanks,
David

================================
There was no endpoint listening at https://test.salesforce.com/services/Soap/c/32.0 that could accept the message. This is often caused by an incorrect address or SOAP action. See InnerException, if present, for more details.

Server stack trace: 
   at System.ServiceModel.Channels.HttpOutput.WebRequestHttpOutput.GetOutputStream()
   at System.ServiceModel.Channels.HttpOutput.Send(TimeSpan timeout)
   at System.ServiceModel.Channels.HttpChannelFactory.HttpRequestChannel.HttpChannelRequest.SendRequest(Message message, TimeSpan timeout)
   at System.ServiceModel.Channels.RequestChannel.Request(Message message, TimeSpan timeout)
   at System.ServiceModel.Dispatcher.RequestChannelBinder.Request(Message message, TimeSpan timeout)
   at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)
   at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs)
   at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)
   at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)
=======================================
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
    <system.serviceModel>
        <bindings>
            <basicHttpBinding>
                <binding name="SoapBinding">
                    <security mode="Transport" />
                </binding>
                <binding name="SoapBinding1" />
            </basicHttpBinding>
        </bindings>
        <client>
            <endpoint address="https://test.salesforce.com/services/Soap/c/32.0"
                binding="basicHttpBinding" bindingConfiguration="SoapBinding"
                contract="JumpStart.WSDL.Soap" name="Soap" />
        </client>
    </system.serviceModel>
</configuration>
Best Answer chosen by David Zhu
David ZhuDavid Zhu
It does not work with instance name. 
but I tried to make it workin in VS2005 with .NET 2.0 by setting the proxy of the salesforce object. 
I could not find the proxy setting in SOAPClient object. So, I am current using .NET 2.0 for practicing.

All Answers

ShashankShashank (Salesforce Developers) 
What happens when you use the instance name instead of "test" in the endpoint url? Like, for example, cs12.salesforce.com instead of test.salesforce.com.
David ZhuDavid Zhu
It does not work with instance name. 
but I tried to make it workin in VS2005 with .NET 2.0 by setting the proxy of the salesforce object. 
I could not find the proxy setting in SOAPClient object. So, I am current using .NET 2.0 for practicing.
This was selected as the best answer