1)我正在创建一个ASP.NET Web应用程序 - >在VS2013中清空(Web Api选定)项目并添加服务引用(wsdl)
public class BJKController : ApiController
{
[HttpGet]
public byte[] GetArchive(string workOrderNo)
{
BjkClient client =new BjkClient();
return client.GetInvoice(workorderNo);//I'm getting error this line
}
}
的web.config:
<system.serviceModel>
<bindings>
<wsHttpBinding>
<binding name="WSHttpBinding_ICompany" maxReceivedMessageSize="64000000">
<security mode="Transport">
<transport clientCredentialType="None" />
</security>
</binding>
</wsHttpBinding>
</bindings>
<client>
<endpoint address="https://service.karakartal.com.tr/Company.svc"
binding="wsHttpBinding" bindingConfiguration="WSHttpBinding_ICompany"
contract="ServiceReference1.ICompany" name="WSHttpBinding_ICompany" />
</client>
</system.serviceModel>
我正在调试并在webapi项目中出错:连接尝试失败,因为连接方在一段时间后没有正确响应,或者建立的连接失败,因为连接的主机无法响应XXXXX.XXX:443
但我正在尝试一个Windows项目(也添加服务refence) 一切都一样(网络配置和使用)。它工作正常。
答案 0 :(得分:0)
当我搬到IIS时,它工作正常。