2011-08-16 3 views

답변

2

질문을 올바르게 이해하면 두 가지 WCF 서비스 계약을 구현하는 단일 클래스가 있습니다. web.config에서 각 서비스 계약에 대한 끝점을 구성하지만 동일한 <service> 노드 아래에 있습니다. 나는 IIS에서가 아니라 WCF 서비스를 자체 호스팅 할 때만 수행했지만, 끝점 구성에 address 값을 지정하면 .svc 파일의 위치에 상대적으로 만들 것이라고 생각합니다.

<service name="YourServiceLibrary.YourServiceClass"> 
    <endpoint address="Service1" 
    contract="YourServiceLibrary.IService1" 
    ... 
    /> 
    <endpoint address="Service2" 
    contract="YourServiceLibrary.IService2" 
    ... 
    /> 
</service> 

그러면 각 서비스 계약에 대한 클라이언트 프록시를 http://YourServer/YourServicePath/YourServiceClass.svc/Service1http://YourServer/YourServicePath/YourServiceClass.svc/Service2

을 가리 키도록 설정합니다.
관련 문제