Click here to Skip to main content
15,889,595 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
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


XML
<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>
Posted
Updated 11-Jul-11 21:29pm
v2

Where did you host this service.

http://localhost/CRSRoutingService/

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

Please check...
 
Share this answer
 
Comments
shan1395 12-Jul-11 21:13pm    
Hi Neeraj,

Am hosting it on Windows Service.
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
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900