저는 몇 년 동안 WCF를 사용 해왔고 상당히 편하다고 생각합니다. 그러나 아직 익숙하지 않은 간단한 WCF 개념 하나가 있으며 어려움을 겪고 있습니다. 나는이 두 가지 발췌 볼은 특히 IIS에서 여러 엔드 포인트에 관련된 WCF는 주소에 대한 this 기사에 이어WCF의 다중 종단점 문제 해결
:
을 "이라는 파일 calc.svc 있다고 가정하면 그 해당하는 가상 디렉터리에 배치 (http://localhost:8080/calcservice)이 서비스의 기본 주소는 (http://localhost:8080/calcservice/calc.svc)입니다. "
및
"이제.이 경우, 최초의 엔드 포인트의 주소는 기본 주소와 동일하게된다 (그림 3) 가상 디렉터리의 web.config 파일에있는 엔드 포인트 구성을 고려 (http://localhost:8080/calcservice/calc.svc) 끝점 주소를 비워 두었 기 때문에 두 번째 끝점의 주소는 다음과 같이 "secure"가 추가 된 기본 주소의 조합이됩니다. (http://localhost:8080/calcservice/calc.svc/secure). "
내 응용 프로그램에서 동일한 서비스 (아래 그림 참조)에 대해 두 개의 끝점을 만들려고합니다. 서비스 이름은 MainService.svc입니다. 끝점 1에는 주소 = ""이고 끝점 2에는 주소 = "Soap11"이 있습니다. IIS에서 사이트 가져 오기 (https://localhost:444/MainService.svc)를 성공적으로 방문 할 수 있습니다. 이것은 내가 찾을 수있는 모든 문서에 따라 서비스의 기본 주소입니다. 이 기사와 다른 사람들에 따르면 나는 두 번째 끝점 (https://localhost:444/MainService.svc/Soap11)을 가져야한다는 정보를 확인했지만, 해당 URL로 이동하면 .Net 예외가 나타나 리소스를 찾을 수 없다는 것을 알 수 있습니다.
사용할 수있는 도구가 있습니까 내 다른 엔드 포인트를 사용할 수있는을 참조하십시오. 어쩌면 내가 켤 수있는 IIS 또는 aspnet_isapi.dll 로깅? 내 끝점을 정의하는 내 web.config 섹션은 다음과 같습니다. 당신의 도움이
<service behaviorConfiguration="MyService.MainServiceBehavior" name="MyService.MainService">
<endpoint address="" binding="wsHttpBinding" bindingConfiguration="WSBindingConfig" contract="MyService.IMainService">
<identity>
<dns value="localhost" />
</identity>
</endpoint>
<endpoint address="Soap11" binding="basicHttpBinding" bindingConfiguration="BasicBindingWithCredentials"
contract="MyService.IMainService">
<identity>
<dns value="localhost" />
</identity>
</endpoint>
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
</service>
에 미리
덕분에 나는 WSDL이 두 엔드 포인트를 참조하고 내가 그들을 찾아 낼 것으로 예상 장소에서하는 것을보고 더 찾고 있습니다. 그러나 나는 아직도 그들을 사용하는 데 어려움이 있습니다. 이 서비스가 그 안에 무슨이다 :
<wsdl:service name="MainService">
<wsdl:port name="WSHttpBinding_IMainService" binding="tns:WSHttpBinding_IMainService">
<soap12:address location="https://localhost/MainService.svc/Soap12" />
<wsa10:EndpointReference>
<wsa10:Address>https://localhost/MainService.svc/Soap12</wsa10:Address>
<Identity xmlns="http://schemas.xmlsoap.org/ws/2006/02/addressingidentity">
<Dns>localhost</Dns>
</Identity>
</wsa10:EndpointReference>
</wsdl:port>
<wsdl:port name="BasicHttpBinding_IMainService" binding="tns:BasicHttpBinding_IMainService">
<soap:address location="https://localhost/MainService.svc/Soap11" />
</wsdl:port>
</wsdl:service>
그러나 작동하지 않는 URL (https://localhost/MainService.svc/Soap11 또는 SOAP12) 중 하나에 나의 클라이언트를 가리 키도록 노력. 내가 "내부 서버 오류 500"기본 예외로 "콘텐츠 형식 텍스트/html; 응답 메시지의 charset = utf-8 바인딩 (응용 프로그램/soap + xml; charset = utf -8) "를 사용합니다.
/Soap11을 사용하여 서비스 메서드를 호출 할 수 없거나/Soap11 url에서 메타 데이터를 가져 오려고합니까? –
/Soap11 url에서 메타 데이터를 가져올 수 없습니다. – omatase