将WCF从自宿主移植到IIS/AppFabric宿主
我有一个WCF,它在一个自托管文件中有一个TCP、HTTP和Mex绑定,一切都很好。然而,我想将它迁移到AppFabric,并保留相同的绑定,但我很难做到这一点。我添加了WCF服务应用程序,更正了svc文件,删除了自托管控制台应用程序,但我一直在获取awfull将WCF从自宿主移植到IIS/AppFabric宿主,wcf,self-hosting,svc,Wcf,Self Hosting,Svc,我有一个WCF,它在一个自托管文件中有一个TCP、HTTP和Mex绑定,一切都很好。然而,我想将它迁移到AppFabric,并保留相同的绑定,但我很难做到这一点。我添加了WCF服务应用程序,更正了svc文件,删除了自托管控制台应用程序,但我一直在获取awfull无法找到与绑定为NetTcpBinding的端点的scheme net.tcp匹配的基址。注册的基址方案是[http]。错误。我应该将app.config文件中的哪些更改升级到web.config文件以使其正常工作?我甚至还没有尝试在II
无法找到与绑定为NetTcpBinding的端点的scheme net.tcp匹配的基址。注册的基址方案是[http]
。错误。我应该将app.config文件中的哪些更改升级到web.config文件以使其正常工作?我甚至还没有尝试在IIS上发布它,但是。。。我收到的这个错误来自VS的web服务器以下是我以前的自托管app.config文件:
<configuration>
<system.serviceModel>
<serviceHostingEnvironment aspNetCompatibilityEnabled="true" />
<bindings>
<basicHttpBinding>
<binding name="SimpleBinding" />
</basicHttpBinding>
<netTcpBinding>
<binding name="DefaultTCPBinding" closeTimeout="01:00:00" receiveTimeout="01:00:00"
sendTimeout="01:00:00" transactionFlow="true" transactionProtocol="OleTransactions"
maxBufferSize="5242880" maxReceivedMessageSize="5242880">
<reliableSession inactivityTimeout="01:00:00" />
</binding>
</netTcpBinding>
<wsHttpBinding>
<binding name="RSAlarmEvent" closeTimeout="00:01:00" openTimeout="00:01:00"
receiveTimeout="00:10:00" sendTimeout="00:01:00" bypassProxyOnLocal="false"
transactionFlow="false" hostNameComparisonMode="StrongWildcard"
maxBufferPoolSize="524288" maxReceivedMessageSize="65536"
messageEncoding="Text" textEncoding="utf-8" useDefaultWebProxy="true"
allowCookies="false">
<readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384"
maxBytesPerRead="4096" maxNameTableCharCount="16384" />
<reliableSession ordered="true" inactivityTimeout="00:10:00"
enabled="false" />
<security mode="Message">
<transport clientCredentialType="Windows" proxyCredentialType="None"
realm="" />
<message clientCredentialType="Windows" negotiateServiceCredential="true"
algorithmSuite="Default" />
</security>
</binding>
</wsHttpBinding>
<webHttpBinding>
<binding name="ScriptBindig" crossDomainScriptAccessEnabled="true" />
</webHttpBinding>
</bindings>
<behaviors>
<endpointBehaviors>
<behavior name="WebScriptBehavior">
<enableWebScript />
</behavior>
</endpointBehaviors>
<serviceBehaviors>
<behavior name="MetadataBehavior">
<serviceMetadata httpGetEnabled="true" httpGetBinding="webHttpBinding"
httpGetBindingConfiguration="" />
<serviceDebug includeExceptionDetailInFaults="true" />
<serviceThrottling maxConcurrentCalls="64" maxConcurrentSessions="400"
maxConcurrentInstances="464" />
</behavior>
</serviceBehaviors>
</behaviors>
<services>
<service behaviorConfiguration="MetadataBehavior" name="MyServer.Implementation.MyAppImplementation">
<endpoint address="" binding="netTcpBinding" bindingConfiguration="DefaultTCPBinding"
name="MyAppTCPEndpoint" contract="MyServer.Interfaces.IMyApp" />
<endpoint address="mex" binding="mexHttpBinding" bindingConfiguration=""
name="MyAppMex" contract="IMetadataExchange" />
<endpoint address="ws" behaviorConfiguration="" binding="basicHttpBinding"
bindingConfiguration="SimpleBinding" name="MyApp" contract="MyServer.Interfaces.IMyApp" />
<host>
<baseAddresses>
<add baseAddress="net.tcp://desk01:9878/MyAppService" />
<add baseAddress="http://desk01:9876/MyAppService/" />
</baseAddresses>
</host>
</service>
</services>
<diagnostics>
<messageLogging logEntireMessage="true"
logMalformedMessages="true"
logMessagesAtTransportLevel="true" />
</diagnostics>
</system.serviceModel>
</configuration>
我需要改变什么Tks仅IIS无法承载非HTTP端点。您还必须安装(激活功能)Windows激活服务(WAS)。安装后,您必须在IIS管理控制台中为您的站点启用net.tcp绑定。是的,我知道。我已经安装了AppFabric和WAS,以及整个九码。但我在使用VisualStudio的服务器进行调试时仍会遇到此错误。我还不是IIS。如果你想使用Net.Tcp,你必须在IIS中。VS集成web服务器(Cassini)仅支持HTTP端点。不知道…:-/谢谢你的时间和回答!我删除了tcp的东西,它成功了。。。我将在AppFabric中试用,看看效果如何。