C# 找不到与scheme net.tcp匹配的基址
我已将文件传输服务从basicHttpBinding移动到netTcpBinding 因为我正在尝试设置双工模式通道。我还启动了我的net.tcp 端口共享服务 我目前在开发环境中,在移动设备之前,我一直在xp设备上自我托管 应用程序到开发服务器。因此,目前我没有访问IIS的权限 将我的服务配置为以下内容后:C# 找不到与scheme net.tcp匹配的基址,c#,wcf,duplex,net.tcp,C#,Wcf,Duplex,Net.tcp,我已将文件传输服务从basicHttpBinding移动到netTcpBinding 因为我正在尝试设置双工模式通道。我还启动了我的net.tcp 端口共享服务 我目前在开发环境中,在移动设备之前,我一直在xp设备上自我托管 应用程序到开发服务器。因此,目前我没有访问IIS的权限 将我的服务配置为以下内容后: <service behaviorConfiguration="transferServiceBehavior" name="API.FileTransfer.FileTransfe
<service behaviorConfiguration="transferServiceBehavior" name="API.FileTransfer.FileTransferService">
<endpoint name="MyFileTransferEP"
address = ""
binding = "netTcpBinding"
bindingConfiguration="MyFileTransferNetTcpEP"
behaviorConfiguration="NetTcpEPBehavior"
contract="API.FileTransfer.IFileTransferService" />
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange"/>
<host>
<baseAddresses>
<add baseAddress="net.tcp://localhost:8001/project/filetransfer.svc" />
</baseAddresses>
</host>
</service>
我的约束力如下:
<netTcpBinding>
<binding name="MyFileTransferNetTcpEP"
hostNameComparisonMode="StrongWildcard"
closeTimeout="00:01:00"
openTimeout="00:01:00"
receiveTimeout="00:10:00"
sendTimeout="00:01:00"
maxReceivedMessageSize="2147483647"
transferMode="Streamed"
portSharingEnabled="true">
<security mode="None">
<transport clientCredentialType="None" />
<message clientCredentialType="None" />
</security>
</binding>
</netTcpBinding>
当我右键单击并浏览SVC文件时,出现以下错误:
找不到一个
与的scheme net.tcp匹配
绑定为NetTcpBinding的终结点。
注册基址方案包括
[http]
在线阅读表明,为了解决这个问题,我
需要将net.tcp绑定添加到应用程序的绑定
在IIS中。但是,如果我是自托管并且没有访问权限,我该怎么办
IIS??顺便说一句,如果您正在阅读本文并且“确实”拥有IIS,请执行以下操作:
右键单击IIS->管理应用程序->
高级设置。在启用的协议部分,添加net.tcp
有什么想法吗
更新:我想我已经让它工作了,但它仍然不工作。以下是我现在拥有的: 我仍然收到“找不到与scheme net.tcp匹配的基址”错误。 为了反映你的建议,我已经更改了所有的基本地址。以下是我现在拥有的:
<service behaviorConfiguration="transferServiceBehavior" name="API.FileTransfer.FileTransferService">
<endpoint name="MyJSONFileTransferEP"
address="json"
binding="webHttpBinding"
bindingConfiguration="jsonWeb"
behaviorConfiguration="WebHttpEPBehavior"
contract="API.FileTransfer.IJSONFileTransferService" />
<endpoint name="MyPOXFileTransferEP"
address="pox"
behaviorConfiguration="WebHttpEPBehavior"
binding="webHttpBinding"
bindingConfiguration="poxWeb"
contract="API.FileTransfer.IPOXFileTransferService" />
<endpoint name="MySOAPFileTransferEP"
address="filetransfer"
binding="netTcpBinding"
bindingConfiguration="netTcpWeb"
behaviorConfiguration="NetTcpEPBehavior"
contract="API.FileTransfer.ISOAPFileTransferService" />
<endpoint address="mex" binding="mexTcpBinding" contract="IMetadataExchange"/>
<host>
<baseAddresses>
<add baseAddress="net.tcp://localhost:2544/filetransfer/" />
</baseAddresses>
</host>
</service>
我试过这两个“网”。tcp://localhost:2544“&”网。tcp://localhost:8001".
我是否需要在防火墙设置中添加(允许)内容?还有其他建议吗
以下是我的App.config文件中我的filetransferservice的mexTcpBinding:
<endpoint address="net.tcp://localhost:2544/filetransfer/mex"
binding="mexTcpBinding" bindingConfiguration="" contract="IMetadataExchange"
name="filetransfermex">
<identity>
<certificateReference storeName="My" storeLocation="LocalMachine"
x509FindType="FindBySubjectDistinguishedName" />
</identity>
</endpoint>
我仍然无法在我的web应用中引用我的FileTransferServiceClient
再次感谢 您只需要为您的服务定义基址(而不是整个地址),然后在服务端点中定义其余地址。文件末尾的
filetransfer.svc
文件的地址不是有效的基址(实际上是文件地址)
由于这是net.tcp并且您是自托管的,所以根本不需要svc文件
更新:如果希望能够在net.TCP基址上获取元数据,则需要在
部分中公开一个net.TCP MEX端点,如下所示:
<endpoint name="NetTcpMEX"
address="netTcpMex"
binding="mexTcpBinding"
contract="IMetadataExchange" />
请从控制面板->程序->打开或关闭窗口->功能->添加功能->.net framework.*功能->Wcf激活->非Http激活安装“非Http激活”窗口组件 错误(WCF):
找不到与绑定为NetTcpBinding的终结点的scheme net.tcp匹配的基址。注册的基址方案是[http]。
步骤1:
注意WAS(Windows Process Activation Service)或非http协议支持,仅由以下平台支持:
•Windows Vista
•Windows 7
•Windows Server 2008
在经历了大量的解决方案之后..我在这里找到了最终解决方案。但是我将在这里解释整个过程..您需要遵循以下步骤 步骤1: (Windows Process Activation Service)或非http协议支持,仅受以下平台支持:•Windows Vista•Windows 7•Windows Server 2008
- 转到打开或关闭Windows功能
- 去微软。
net.tcp://localhost:8001/project/filetransfer
<endpoint name="NetTcpMEX" address="netTcpMex" binding="mexTcpBinding" contract="IMetadataExchange" />
Q: Does IIS Express support non-HTTP protocols such as net.tcp or MSMQ? A: No. IIS Express only supports HTTP and HTTPS as its protocol.
NetPipeActivator Net.Pipe Listener Adapter Receives activation requests over the net.pipe protocol and passes them to the Windows Process Activation Service.
NetTcpActivator Net.Tcp Listener Adapter Receives activation requests over the net.tcp protocol and passes them to the Windows Process Activation Service.
%windir%\system32\inetsrv\appcmd.exe set site "Default Web Site" -+bindings.[protocol='net.tcp',bindingInformation='8082:*']
<add baseAddress="net.tcp://localhost:8090" />