Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/api/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C#调用Magento soap服务端点绑定时不使用HTTP?_C#_Api_Http_Endpoint - Fatal编程技术网

C#调用Magento soap服务端点绑定时不使用HTTP?

C#调用Magento soap服务端点绑定时不使用HTTP?,c#,api,http,endpoint,C#,Api,Http,Endpoint,知道哪里出了问题吗?basicHttpBinding不再相关,因为您不再使用http协议。我假设您以前在使用http协议时,为了解决一些问题,必须添加这些内容。如果是这样,那么这些问题就会再次出现。我不知道这是否像向该节点添加一个s并调用它basichtpsbind那么简单,但快速的谷歌搜索表明这是一个常见问题。@Archer我曾尝试添加basichtpsbind,但我得到一个错误,即mscorlib.dll中发生了“System.TypeInitializationException” I a

知道哪里出了问题吗?

basicHttpBinding
不再相关,因为您不再使用http协议。我假设您以前在使用http协议时,为了解决一些问题,必须添加这些内容。如果是这样,那么这些问题就会再次出现。我不知道这是否像向该节点添加一个
s
并调用它
basichtpsbind
那么简单,但快速的谷歌搜索表明这是一个常见问题。@Archer我曾尝试添加basichtpsbind,但我得到一个错误,即mscorlib.dll中发生了“System.TypeInitializationException”
I am using C# to call Magento SOAP API, and we have until now using HTTP to call this service. Now we have install SSL to our website so soap is no longer available from HTTP. 

So for change I have modify service in my Visual Studio project and my App.config have change into:

    <?xml version="1.0" encoding="utf-8" ?>
    <configuration>
    <startup> 
        <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.2" />
    </startup>
    <system.serviceModel>
        <bindings>
            <basicHttpBinding>
                <binding name="Binding" maxBufferPoolSize="200000000" maxReceivedMessageSize="200000000" >
                    <security mode="Transport" />
                </binding>
            </basicHttpBinding>
        </bindings>
        <client>
            <endpoint address="https://www.ourwebstore.com/api/v2_soap/" binding="basicHttpBinding"
                bindingConfiguration="Binding" contract="ServiceReference.PortType"
                name="Port" />
        </client>
    </system.serviceModel>
    </configuration>
Unhandled Exception: System.ServiceModel.CommunicationException: An error occurred while receiving the HTTP response to https://www.ourwebstore.com/api/v2_soap/. This could be due to the service endpoint binding not using the HTTP protocol. This could also be due to an HTTP request context being aborted by the server (possibly due to the service shutting down). See server logs for more details. ---> System.Net.WebException: The underlying connection was closed: An unexpected error occurred on a receive. ---> System.IO.IOException: Unable to read data from the transport connection: 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. ---> System.Net.Sockets.SocketException: 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
   at System.Net.Sockets.Socket.Receive(Byte[] buffer, Int32 offset, Int32 size, SocketFlags socketFlags)