IIS에서 로컬로 호스팅되는 WCF WebService에 대해 netTcp를 구성하는 데 문제가 있습니다. DotNet 4.0 (VS2012)이 설치된 Windows 7 및 IIS 7에서 방화벽을 사용할 수 없습니다. net.tcp (808)에 대한 사이트 바인딩을 IIS에서WCF NetTcp 구성 문제
- 설정 : * 기본 웹 사이트에 대한 IIS에서
- 를 사용할 수있는 프로토콜은 웹 서비스에 대해 우리는 netTcp를 구성하려면 다음 단계를 수행 한
"HTTP, net.tcp"(공백 없음)
- 검증 net.Tcp Listener 어댑터 우리는 우리가 할 NETSTAT -ONa을 실행할 때 net.Tcp 포트 공유 서비스는 이제
(뿐만 아니라 그들을 재활용) 실행 아무 것도 보이지 않는다. 127.0.0.1:808에 대한 목록 - 우리가해야합니까 ??? 의 App.config
<system.web>
<customErrors mode="Off"></customErrors>
<compilation debug="true" targetFramework="4.0"></compilation>
<identity impersonate="false" />
</system.web>
<system.serviceModel>
<diagnostics>
<messageLogging logMalformedMessages="false" logMessagesAtServiceLevel="false"
logMessagesAtTransportLevel="false" />
</diagnostics>
<bindings>
<netTcpBinding>
<binding name="XxxxxxxCommonServiceBinding" />
</netTcpBinding>
</bindings>
<services>
<service behaviorConfiguration="XxxxxxxCommonService_Behavior" name="CS.WebService.Xxxxxxx.Common.XxxxxxxCommonService">
<endpoint address="net.tcp://localhost:808/CS.WebService.Xxxxxxx.Common.XxxxxxxCommonService/XxxxxxxCommonService.svc" binding="netTcpBinding"
bindingConfiguration="XxxxxxxCommonServiceBinding" name="XxxxxxxCommonNetTcpBinding"
contract="CS.ServiceContracts.Xxxxxxx.Common.IXxxxxxxCommonService" />
<endpoint address="mex" binding="mexTcpBinding" contract="IMetadataExchange" />
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior name="XxxxxxxCommonService_Behavior">
<serviceMetadata httpGetEnabled="false" />
<serviceDebug includeExceptionDetailInFaults="false" />
<dataContractSerializer maxItemsInObjectGraph="2147483647" />
</behavior>
</serviceBehaviors>
</behaviors>
<serviceHostingEnvironment multipleSiteBindingsEnabled="false">
</serviceHostingEnvironment>
</system.serviceModel>
<system.webServer>
<modules runAllManagedModulesForAllRequests="true" />
</system.webServer>
그리고 여기에 있습니다 : : 여기
내의 Web.config입니다 : 여기<system.serviceModel>
<client>
<endpoint name="CS.WebService.Xxxxxxx.Common.XxxxxxxCommonService"
address="net.tcp://localhost/CS.WebService.Xxxxxxx.Common.XxxxxxxCommonService/XxxxxxxCommonService.svc"
binding="netTcpBinding"
bindingConfiguration="XxxxxxxCommonNetTcpBinding"
contract="CS.ServiceContracts.Xxxxxxx.Common.IXxxxxxxCommonService"/>
</client>
</system.serviceModel>
내가 서비스를 호출하려고 내 클라이언트 코드는
var endPoint = new EndpointAddress(
"net.tcp://127.0.0.1:809/CS.WebService.Xxxxxx.Common.XxxxxxCommonService/XxxxxxCommonService.svc");
var binding = new NetTcpBinding { TransferMode = TransferMode.Streamed, SendTimeout = TimeSpan.MaxValue };
var channel = new ChannelFactory<IXxxxxxCommonService>(binding, endPoint);
var proxy = channel.CreateChannel()
var request = new GetDataRequest();
var response = proxy.GetData(request);
다음과 같은 오류가 발생했습니다.
net.tcp : //127.0.0.1 : 809/CS.WebService.Xxxxxx.Common.XxxxxxCommonService/XxxxxxCommonService.svc에 연결할 수 없습니다. 연결 시도는 00:00:00의 시간 동안 지속되었습니다. TCP 오류 코드 10061 : 대상 컴퓨터가 127.0.0.1:809를 적극적으로 거부했기 때문에 연결할 수 없습니다.
나는 우리가 다음 오류 얻을 808 코드와 WebConfig에서 포트를 변경하는 경우 :
가 net.tcp에서 듣기에는 엔드 포인트가 없었다 : //127.0.0.1/CS.WebService.Xxxxxx.Common합니다. 메시지를 수락 할 수있는 XxxxxxCommonService/XxxxxxCommonService.svc. 이것은 종종 잘못된 주소 또는 SOAP 조치로 인해 발생합니다. 자세한 내용은 InnerException을 참조하십시오. (참고로, 내부 예외는 없었습니다.)netstat -ona는 127.0.0.1:808을 표시하지 않기 때문에 제대로 설정되어 있지 않은 것으로 보입니다. 하지만 다시 Net.Tcp 서비스가 실행 중이고 재활용되어 IIS가 올바르게 설정되어 있으므로 어디서부터 돌릴 지 잘 모릅니다.
WCF 추적을 구성한 것처럼 보입니다.나는 클라이언트와 서비스 모두가 추적을 가능하게하고 클라이언트 추적 파일로 시작하여 예외가 던져지는 곳을 확인해야한다. 또한 [간단한 netHttpBinding 샘플] (http://msdn.microsoft.com/en-us/library/ms752250.aspx)을 실행하여 실제 구성과 구성을 비교하십시오. –