I'm developing a C# Winapp to communicate with the Magento Server. I'm trying to login into Magento service to add customer data but I can't get pass the login sequence.
This is my login code in C#
PortTypeClient mservice = new PortTypeClient();
string mlogin = mservice.login("user", "password");
And this is my app.config
file
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<configSections>
</configSections>
<system.serviceModel>
<bindings>
<basicHttpBinding>
<binding name="BTVBinding" maxReceivedMessageSize="2000000">
<security mode="Transport" />
</binding>
</basicHttpBinding>
</bindings>
<client>
<endpoint address="https://admin.mywebsite.com/index.php/api/v2_soap/index"
binding="basicHttpBinding" bindingConfiguration="BTVBinding"
contract="BTVMagento.PortType" name="Port1" >
</endpoint>
</client>
</system.serviceModel>
I always got this error
System.ServiceModel.FaultException: 'SOAP-ERROR: Parsing WSDL: Couldn't load from 'https://admin.mywebsite.com/index.php/api/v2_soap/index/?wsdl=1' : Premature end of data in tag html line 7