WCF 웹 서비스에 연결할 때 예외가 발생합니다.메시지를 받아 들일 수있는 ".svc"에서 수신하는 끝점이 없습니다.
저는이 웹 서비스를 서비스 레퍼런스으로 추가합니다.
주소는 http://192.168.16.91:8092/ws_merchants.svc
이고 주소는 http://192.168.16.91:8092/ws_merchants.svc?wsdl
입니다.
<system.serviceModel>
<bindings>
<basicHttpBinding>
<binding name="BasicHttpBinding_Iws_Merchants" />
</basicHttpBinding>
</bindings>
<client>
<endpoint name="BasicHttpBinding"
address="http://192.168.16.91:8092/ws_merchants.svc"
binding="basicHttpBinding"
bindingConfiguration="BasicHttpBinding_Iws_Merchants"
contract="ServiceReferenceSahand.Iws_merchants" />
</client>
</system.serviceModel>
내 코드이 서비스를 사용하기 :
There was no endpoint listening at http://192.168.16.91:8092/ws_merchants.svc that could accept the message.
This is often caused by an incorrect address or SOAP action.
See InnerException, if present, for more details.
과의 :이 예외가
private bool GetToken()
{
try
{
Iws_merchantsClient def = new Iws_merchantsClient();
var res = def.get_Token("user", "pass");
}
catch (Exception ex)
{
return false;
}
}
을 app.config
에서
,이 바인딩 설정을 내부 예외 :
The remote server returned an error: (404) Not Found.
서비스 참조로 wsdl에서이 메서드를 추가 할 때 찾을 수없는 것은 무엇입니까?
서비스가 실행되어 클라이언트에서 액세스 가능한지 확인 했습니까? 예를 들어 ping을 사용하여 확인하십시오. 브라우저에서 http://192.168.16.91:8092/ws_merchants.svc?wsdl을 열면 어떻게됩니까? –
예. 서비스가 끝나면 svc 및 wsdl을 볼 수 있습니다. –
** 서버 측 바인딩 **은 클라이언트에서 사용중인 바인딩과 동일합니까? –