2012-08-22 4 views
0

IIS에서 "일반"basichttp 서비스를 호스팅하고 로컬 네트워크를 통해 액세스 할 수 있습니다. 문제는 이중 서비스를 수행하고 IIS에서 호스트하려고한다는 것입니다.IIS에서 wcf 이중 서비스 호스팅

내있는 Web.Config :

<system.serviceModel> 
<services> 
    <service behaviorConfiguration="BaseBehavior" name="RegistrationService"> 
    <endpoint binding="wsDualHttpBinding" bindingConfiguration="wsDualHttpBind" name="RegistrationService" contract="Service" /> 
    </service> 
</services> 
<behaviors> 
    <serviceBehaviors> 
    <behavior name="BaseBehavior"> 
     <serviceMetadata httpGetEnabled="true" /> 
     <serviceDebug includeExceptionDetailInFaults="true" /> 
    </behavior> 
    </serviceBehaviors> 
</behaviors> 
<bindings> 
    <wsDualHttpBinding> 
    <binding name="wsDualHttpBind" sendTimeout="00:01:00"> 
     <security mode="None"> 
     <message clientCredentialType="None" /> 
     </security> 
    </binding> 
    </wsDualHttpBinding> 
</bindings> 
</system.serviceModel> 
<system.webServer> 
<modules runAllManagedModulesForAllRequests="true"/> 
</system.webServer> 
</configuration> 

내가 오류 메시지를 내가 열에 "http : // localhost를 /Service/Service.svc는"

바인딩 이중 "을"이 계약은 필요 " "은 BasicHttpBinding '이 기능을 지원하지 않으며, 지원이 제대로 구성되지 않았습니다."

내가 봤와의 web.config에 대해 서로 다른 설정을 찾았지만 아무도 일하지. 내 생각은, Web.config의 잘못입니다.

답변

0

빠른 답변 주셔서 감사합니다. 내 설정이 글을 읽은 후

^^ 완전히 잘못했다 : 내가 net.tcp하는 wsDualHttpBinding 변경

http://www.dotnetconsult.co.uk/weblog2/PermaLink,guid,b891610a-6b78-4b54-b9a6-4ec81c82b7c0.aspx

.

<system.serviceModel> 

<behaviors> 
    <serviceBehaviors> 
    <behavior name="MyBehaviour"> 
     <serviceMetadata /> 
    </behavior> 
    </serviceBehaviors> 
</behaviors> 
<services> 
<service name="Service" behaviorConfiguration="MyBehaviour"> 
    <endpoint address="" 
      binding="netTcpBinding" 
      bindingConfiguration="InsecureTcp" 
      contract="IService" /> 
    <endpoint address="mextcp" binding="mexTcpBinding" contract="IMetadataExchange"/> 
</service> 
</services> 
<bindings> 
    <netTcpBinding> 
    <binding name="InsecureTcp" portSharingEnabled="true"> 
     <security mode="None" /> 
    </binding> 
    </netTcpBinding> 
</bindings> 

을 그리고 IIS에 내가 웹 사이트에 net.tcp 추가 :

나의 새로운 Web.config의는 다음과 같습니다. (http, net.tpc) 그리고 방화벽이 포트를 허용해야합니다.

이제 작동합니다.

1

우선 서비스 구현을 가리키는 Service.svc가 있어야합니다. 그런 다음 서비스 항목에 어셈블리가없는 별도의 프로젝트에있는 경우 전체 이름 (Service.svc 파일의 Service 특성에서 사용하는 이름)을 지정하십시오. 마지막으로 contract 속성에 대해 구현 된 서비스 계약의 전체 이름을 사용하십시오 (여기서는 어셈블리 생략). 끝점의 이름이 중요하지 않아야합니다.

관련 문제