在一个Windows服务中托管3 Wcf服务

编程入门 行业动态 更新时间:2024-10-10 15:26:02
本文介绍了在一个Windows服务中托管3 Wcf服务的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我创建了三个wcf服务,即 MyService1,MyService2,Myservice3和我在基地址中使用了3个不同的端口。 它当我打开测试客户端时工作正常。测试客户端正在添加3项服务。 但是当我在Windows服务中安装它时只有一项服务正在运行,其他两项服​​务无效 这是我的配置

I created a three wcf services i.e MyService1,MyService2,Myservice3 and i used 3 different ports in base address. It is working fine when i open test client.Test client is adding 3 services. But when i install it in windows service only one service is working other two are not working Here is my configuration

<system.serviceModel> <services> <service behaviorConfiguration="WCFServicesBehavior" name="WCFServices"> <endpoint address="" binding="netTcpBinding" bindingConfiguration="BACSnetTCPBinding1" contract="IBACSWCFServices" /> <endpoint address="mex" binding="customBinding" bindingConfiguration="TestMexBinding" contract="IMetadataExchange" /> <host> <baseAddresses> <add baseAddress="net.tcp://localhost:7001/BACSWCFServices/" /> </baseAddresses> </host> </service> <service behaviorConfiguration="ArrangementServiceBehavior" name="ArrangementService"> <endpoint address="" binding="netTcpBinding" bindingConfiguration="BACSnetTCPBinding2" contract="IArrangementService" /> <endpoint address="mex" binding="customBinding" bindingConfiguration="TestMexBinding" contract="IMetadataExchange" /> <host> <baseAddresses> <add baseAddress="net.tcp://localhost:7002/BACSEmpIAArrangementService/" /> </baseAddresses> </host> </service> <service behaviorConfiguration="CalcWCFServicesBehavior" name="CalcWCFServices"> <endpoint address="" binding="netTcpBinding" bindingConfiguration="BACSnetTCPBinding3" contract="ICalcWCFServices"> </endpoint> <endpoint address="mex" binding="customBinding" bindingConfiguration="TestMexBinding" contract="IMetadataExchange" /> <host> <baseAddresses> <add baseAddress="net.tcp://localhost:7003/CalcWCFServices/" /> </baseAddresses> </host> </service> </services> <behaviors> <serviceBehaviors> <behavior name="WCFServicesBehavior"> <serviceMetadata httpGetEnabled="false" /> <serviceDebug includeExceptionDetailInFaults="false" /> <serviceThrottling maxConcurrentCalls="500" maxConcurrentSessions="50" maxConcurrentInstances="2147483647" /> </behavior> <behavior name="ArrangementServiceBehavior"> <serviceMetadata httpGetEnabled="false" /> <serviceDebug includeExceptionDetailInFaults="false" /> <serviceThrottling maxConcurrentCalls="500" maxConcurrentSessions="50" maxConcurrentInstances="2147483647" /> </behavior> <behavior name="CalcWCFServicesBehavior"> <serviceMetadata httpGetEnabled="false" /> <serviceDebug includeExceptionDetailInFaults="false" /> <serviceThrottling maxConcurrentCalls="500" maxConcurrentSessions="50" maxConcurrentInstances="2147483647" /> </behavior> </serviceBehaviors> </behaviors> <bindings> <customBinding> <binding name="TestMexBinding"> <tcpTransport maxPendingConnections="50" listenBacklog="50"> <connectionPoolSettings groupName="default" maxOutboundConnectionsPerEndpoint="50" /> </tcpTransport> </binding> </customBinding> <netTcpBinding> <binding name="BACSnetTCPBinding1" closeTimeout="10:00:00" openTimeout="10:01:00" receiveTimeout="10:00:00" sendTimeout="10:00:00" transactionFlow="false" transferMode="Buffered" hostNameComparisonMode="StrongWildcard" listenBacklog="50" maxConnections="50" maxBufferPoolSize="2147483647" maxBufferSize="2147483647" maxReceivedMessageSize="2147483647"> <readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647" maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647" /> <reliableSession ordered="true" inactivityTimeout="10:10:00" enabled="false" /> <security mode="Transport"> <transport clientCredentialType="Windows" protectionLevel="EncryptAndSign" /> <message clientCredentialType="Windows" /> </security> </binding> <binding name="BACSnetTCPBinding2" closeTimeout="10:00:00" openTimeout="10:01:00" receiveTimeout="10:00:00" sendTimeout="10:00:00" transactionFlow="false" transferMode="Buffered" hostNameComparisonMode="StrongWildcard" listenBacklog="50" maxConnections="50" maxBufferPoolSize="2147483647" maxBufferSize="2147483647" maxReceivedMessageSize="2147483647"> <readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647" maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647" /> <reliableSession ordered="true" inactivityTimeout="10:10:00" enabled="false" /> <security mode="Transport"> <transport clientCredentialType="Windows" protectionLevel="EncryptAndSign" /> <message clientCredentialType="Windows" /> </security> </binding> <binding name="BACSnetTCPBinding3" closeTimeout="10:00:00" openTimeout="10:01:00" receiveTimeout="10:00:00" sendTimeout="10:00:00" transactionFlow="false" transferMode="Buffered" hostNameComparisonMode="StrongWildcard" listenBacklog="50" maxConnections="50" maxBufferPoolSize="2147483647" maxBufferSize="2147483647" maxReceivedMessageSize="2147483647"> <readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647" maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647" /> <reliableSession ordered="true" inactivityTimeout="10:10:00" enabled="false" /> <security mode="Transport"> <transport clientCredentialType="Windows" protectionLevel="EncryptAndSign" /> <message clientCredentialType="Windows" /> </security> </binding> </netTcpBinding> </bindings> </system.serviceModel>

Please i need help do i need to change config......

Please i need help do i need to change config......

推荐答案

Trying hosting the services with Internet Internet Information Service(IIS) Manager in ypur system and add services references of ur wcf’s to the file in which you are working. Trying hosting the services with Internet Internet Information Service(IIS) Manager in ypur system and add services references of ur wcf's to the file in which you are working.

更多推荐

在一个Windows服务中托管3 Wcf服务

本文发布于:2023-11-08 20:53:22,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1570430.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:Windows   Wcf

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!