2013-06-07 3 views
1

구성에 기본 주소를 지정하지 않아도되기 때문일 수 있습니다. WSDL 게시, 서비스 호출 등 다른 모든 작업이 제대로 작동하지만 MEX 끝점을 추가하고 액세스하려고하면 사용할 수없는 503 서비스를 반환합니다.MEX에서 WCF 서비스를 사용할 수 없습니다.

내 Web.config의는 다음과 같습니다 : 당신은 서비스를 만든

:

<system.serviceModel> 
    <bindings> 
    <basicHttpsBinding> 
     <binding name="ServiceBinding" /> 
    </basicHttpsBinding> 
    </bindings> 
    <services> 
    <service name="MyServices.CatService" behaviorConfiguration="MyBehavior"> 
     <endpoint address="" binding="basicHttpsBinding" bindingConfiguration="ServiceBinding" contract="MyServices.ICatService"></endpoint> 
     <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" /> 
    </service> 
    </services> 
    <behaviors> 
    <serviceBehaviors> 
     <behavior name="MyBehavior"> 
     <!-- To avoid disclosing metadata information, set the values below to false before deployment --> 
     <serviceMetadata httpGetEnabled="false" httpsGetEnabled="false" /> 
     <!-- To receive exception details in faults for debugging purposes, set the value below to true. Set to false before deployment to avoid disclosing exception information --> 
     <serviceDebug includeExceptionDetailInFaults="false" /> 
     </behavior> 
    </serviceBehaviors> 
    </behaviors> 
    <serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="true" /> 
</system.serviceModel> 

내 서비스에 탐색 할 때, 나는 메시지가 표시됩니다. 이 서비스를 테스트하려면 클라이언트를 만들어이를 사용하여 서비스를 호출해야합니다. 당신은 다음 구문을 사용하여 명령 줄에서 svcutil.exe에 도구를 사용하여이 작업을 수행 할 수 있습니다 svcutil.exe에 HTTP를 : // [MYPC] /MyServices/CatService.svc/mex

나는 합리적으로 확신 엔드 포인트가 정의되는 방식과 관련이 있지만이를 수정하는 방법을 알지 못합니다. 어떤 아이디어?

답변

2

해결 - 복사하여 붙여 넣은 위의 mex 예제는 https가 아니라 http입니다. 나는 그것을 mexHttpsBinding으로 바꾸었고 멋졌다. http를 로컬로 실행하는 일부 구성으로 인해 http가 작동하지 않는다고 생각하지만 확실하지 않습니다.

관련 문제