找不到服务 [英] Couldn't find the service

查看:106
本文介绍了找不到服务的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

这是WCF项目中的webconfig文件,每当我尝试发现它总是告诉
http://localhost/CRSRoutingService/找不到404错误.

这里缺少什么,请有人给我开灯


Hello all,

This is the webconfig file from WCF project, whenever i try to discover it always tell
http://localhost/CRSRoutingService/ couldn''t found 404 error.

what am missing here ,please someone throw me a light please


<configuration>
  
  <system.web>
    <compilation debug="true" targetframework="4.0" />
  </system.web>
  
  <system.servicemodel>
       
    <!--The clients,i.e the services to route to-->
    <client>
      <endpoint>
        name ="M2P_Adapter"
        address="net.msmq://localhost/private/M2PAdapterQueue"
        binding="netMsmqBinding" 
        bindingConfiguration ="MSMQPrivateQueueConfig"
        contract="*" />
      <endpoint>
        name ="MPM_Adapter"
        address="net.msmq://localhost/private/MPMAdapterQueue"
        binding="netMsmqBinding" 
        bindingConfiguration ="MSMQPrivateQueueConfig"
        contract="*"/>      
    </endpoint></endpoint></client>
    
    <!--The end point the client points to-->
    <services>
      <service behaviorconfiguration="RoutingServiceBehavior">
               name="System.ServiceModel.Routing.RoutingService">
        <host>
          <baseAddresses>
            <add baseaddress="http://localhost/CRSRoutingService/" />
          </baseAddresses>
        </host>

        <endpoint address="net.msmq://localhost/private/crsroutingqueue">
                  binding="netMsmqBinding"  
                  bindingConfiguration ="MSMQPrivateQueueConfig"
                  contract="System.ServiceModel.Routing.ISimplexDatagramRouter"
                  name="RoutingServiceEndpoint" />
        <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />

      </endpoint></service>      
    </services>

    <!--Binding configurations-->
    <bindings>
      <netmsmqbinding>
        <binding name="MSMQPrivateQueueConfig">
          <security mode="None" />
        </binding>
      </netmsmqbinding>
    </bindings>

    <!--Service behaviours-->
    <behaviors>
      <servicebehaviors>
        <behavior name="RoutingServiceBehavior">
          <!-- To avoid disclosing metadata information, set the value below 
             to false and remove the metadata endpoint above before deployment -->
          <servicemetadata httpgetenabled="true" />
          <!-- To receive exception details in faults for debugging purposes, 
             set the value below to true. Set to false before deployment 
             to avoid disclosing exception information -->
          <servicedebug includeexceptiondetailinfaults="true" />
          <routing filtertablename="routingRules" routeonheadersonly="False" />
        </behavior>
        <behavior name="">
          <servicemetadata httpgetenabled="true" />
          <servicedebug includeexceptiondetailinfaults="false" />
        </behavior>
      </servicebehaviors>
    </behaviors>
    
    <!--Routing configuration-->
    <routing>
          
      <filters>
        <filter name="MPMFilter" filtertype="XPath">
             filterData="/CRSTransform"/>
        <filter name="M2PFilter" filtertype="XPath">
                filterData="/CRSTransform1"/>
      </filter></filter></filters>
      
      <filtertables>
        <filtertable name="routingRules">
          <add filtername="MPMFilter">
             endpointName="MPM_Adapter"
             priority="0"/>
          <add filtername="M2PFilter">
             endpointName="M2P_Adapter"
             priority="0"/>
        </add></add></filtertable>
      </filtertables>
      
    </routing>
    
    <!-- Independent configuration-->
    <servicehostingenvironment multiplesitebindingsenabled="true" />    
  </system.servicemodel>
  
 <system.webserver>
    <modules runallmanagedmodulesforallrequests="true" />
  </system.webserver>
  
</configuration>

推荐答案

您在哪里托管此服务.

http://localhost/CRSRoutingService/

我认为您的Web服务器中未创建路径或虚拟目录.

请检查...
Where did you host this service.

http://localhost/CRSRoutingService/

I think path or virtual directory is not created in your web server.

Please check...


我相信您需要摆脱配置中的基址,并且服务地址应类似于 net.msmq://localhost/private/crsroutingqueue/svcfilename.svc
I believe you need to get rid of the baseaddress in the configuration and the service address should be something like net.msmq://localhost/private/crsroutingqueue/svcfilename.svc


这篇关于找不到服务的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆