WCF 호출은 :“제공된 URI 체계 'http'는 유효하지 않습니다. 예상 'net.tcp'.” 예외
-
16-09-2019 - |
문제
IIS7에서 호스팅 된 WCF 서비스가 있습니다.
이것은 IIS에서 호스팅 된 내 서비스의 app.config입니다.
<system.serviceModel>
<bindings />
<services>
<service behaviorConfiguration="querierSearch.Querier.WCF.QuerierBehavior"
name="querierSearch.Querier.WCF.Querier">
<endpoint
address="net.tcp://localhost:808/querierSearch.Querier.WCF/Querier.svc"
binding="netTcpBinding" bindingConfiguration="" name="EndPointTCP"
contract="querierSearch.Querier.WCF.IQuerier" />
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior name="querierSearch.Querier.WCF.QuerierBehavior">
<serviceMetadata httpGetEnabled="true" />
<serviceDebug includeExceptionDetailInFaults="true" />
</behavior>
</serviceBehaviors>
</behaviors>
</system.serviceModel>
아래는 WCF 서비스를 참조하는 클라이언트의 app.config입니다.
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<system.serviceModel>
<bindings>
<netTcpBinding>
<binding name="EndPointTCP" closeTimeout="00:01:00"
openTimeout="00:01:00"
receiveTimeout="00:10:00" sendTimeout="00:01:00"
transactionFlow="false" transferMode="Buffered"
transactionProtocol="OleTransactions"
hostNameComparisonMode="StrongWildcard" listenBacklog="10"
maxBufferPoolSize="524288"
maxBufferSize="65536" maxConnections="10"
maxReceivedMessageSize="65536">
<readerQuotas maxDepth="32" maxStringContentLength="8192"
axArrayLength="16384" maxBytesPerRead="4096"
maxNameTableCharCount="16384" />
<reliableSession ordered="true" inactivityTimeout="00:10:00"
enabled="false" />
<security mode="Transport">
<transport clientCredentialType="Windows"
protectionLevel="EncryptAndSign" />
<message clientCredentialType="Windows" />
</security>
</binding>
</netTcpBinding>
</bindings>
<client>
<endpoint address="net.tcp://localhost/Search.Querier.WCF/Querier.svc"
binding="netTcpBinding" bindingConfiguration="EndPointTCP"
contract="SearchQueryService.IQuerier"
name="EndPointTCP">
<identity>
<userPrincipalName value="joeuser@company.com" />
</identity>
</endpoint>
</client>
</system.serviceModel>
</configuration>
어떤 이유로 든 여전히 "제공된 URI 계획 'http'는 유효하지 않으며 예상 'net.tcp'를받습니다. 예외 .
왜 그런지 알 수 없습니다 .....
해결책
사실 나는 mex 엔드 포인트가 놓친 것으로 밝혀졌습니다 ... woops
다른 팁
아마도 이것
<serviceMetadata httpGetEnabled="true" />
TCP 서비스에서 HTTP를 활성화하도록 요청하는 것은 문제를 일으킬 수있는 것처럼 보입니다.
내 문제는 behaviorConfiguration
Web.config는입니다 삭제 내가 새로 고쳐진 후 Service References
.
(나의 behaviorConfiguration
a clientVia
방화벽을 가로 지르기 위해 표준 엔드 포인트 주소가 아닌 주소.
제휴하지 않습니다 StackOverflow