1
我有一個WCF .svc文件託管在IIS中。我想使用basicHTTP綁定。這項服務工作實際上是通過net.tcp調用另一項服務。一切工作正常本地,但是當我部署,我得到這個錯誤。WCF幫助,如何通過http公開服務,通過net.tcp調用另一個服務?
提供的URI方案'http'是 無效;預計'net.tcp'。參數 名稱:通過
這裏是服務器配置
<client>
<endpoint address="net.tcp://localhost:9300/InternalInterfaceService"
binding="netTcpBinding" bindingConfiguration="NetTcpBinding_IInternalInterfaceService"
contract="IInternalInterfaceService" name="NetTcpBinding_IInternalInterfaceService">
<identity>
<servicePrincipalName value="localhost" />
</identity>
</endpoint>
</client>
<services>
<service name="MyExternalService">
<endpoint address="" binding="basicHttpBinding" contract="IMyExternalService" />
</service>
</services>
這裏是SvcUtil工具生成
<system.serviceModel>
<bindings>
<basicHttpBinding>
<binding name="BasicHttpBinding_IMyExternalService" closeTimeout="00:01:00"
openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00"
allowCookies="false" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard"
maxBufferSize="65536" maxBufferPoolSize="524288" maxReceivedMessageSize="65536"
messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered"
useDefaultWebProxy="true">
<readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384"
maxBytesPerRead="4096" maxNameTableCharCount="16384" />
<security mode="None">
<transport clientCredentialType="None" proxyCredentialType="None"
realm="" />
<message clientCredentialType="UserName" algorithmSuite="Default" />
</security>
</binding>
</basicHttpBinding>
</bindings>
<client>
<endpoint address="http://myserver.somesdomain.com/Services/MyExternalService.svc"
binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_IMyExternalService"
contract="IMyInternalService" name="BasicHttpBinding_IMyExternalService" />
</client>
</system.serviceModel>
什麼我需要做的正確這樣組裝起來的配置。我不想通過http公開InternalInterfaceService。我在這裏做錯了什麼?任何提示或建議,當然讚賞。
感謝,
〜CK
大部分問題在於配置文件被錯誤地部署到生產環境。 – Hcabnettek 2010-06-02 21:07:02