Click here to Skip to main content
15,886,873 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hello,

I'm setting up a routing service. I can't work around the error Attribute 'name' is not allowed in filterTable in the web.config file. IIS shows a 500.19 internal server error and

XML
63:
64:     <routing>
65:       <filterTables>


Here is my web.config:

XML
<?xml version="1.0"?>
<configuration>

  <system.web>
    <compilation debug="true" targetFramework="4.0" />
  </system.web>
  <system.serviceModel>

    <bindings>
    <basicHttpBinding>
      <binding
          name="basicHttpBinding_SelfScanApi"
          maxReceivedMessageSize = "8388608">
        <readerQuotas
            maxDepth="32"
        maxStringContentLength="2147483647"
            maxArrayLength="2147483647"
            maxBytesPerRead="2147483647"
            maxNameTableCharCount="2147483647" />
        <security mode="None" />
      </binding>
    </basicHttpBinding>
    </bindings>
    
    <services>
      <service behaviorConfiguration="RoutingServiceBehavior"
               name="System.ServiceModel.Routing.RoutingService">
        <host>
          <baseAddresses>
            <add baseAddress="http://localhost/selfscanapi.mdc" />
          </baseAddresses>
        </host>
        <endpoint
           name="RoutingServiceEndpoint"
           address="" 
           binding="basicHttpBinding"
           bindingConfiguration="basicHttpBinding_SelfScanApi"
           contract="System.ServiceModel.Routing.IRequestReplyRouter" />
      </service>
    </services>

  

    <client>
      <endpoint name="BusinessServerClient"
                address="http://localhost:8393/SelfScanEnginePlugin/GetStatusEx"
                binding="basicHttpBinding"
                bindingConfiguration="basicHttpBinding_SelfScanApi"
                contract="*" />
    </client>

    <behaviors>
      <serviceBehaviors>
        <behavior name="RoutingServiceBehavior">
          <routing 
              filterTableName="routingTable" 
              routeOnHeadersOnly="false" />
          <serviceDebug includeExceptionDetailInFaults="true" />
          <serviceMetadata httpGetEnabled="true" />
        </behavior>
      </serviceBehaviors>
    </behaviors>
  
    <routing>
      <filterTables>
        <filterTable name="routingTable">
          <add filterName="dataServiceFilter" endpointName="BusinessServerClient" />
        </filterTable>
      </filterTables>

      <filters>
        <filter name="dataServiceFilter"
                filterType="Action"
                filterData="http://localhost/selfscanapi.mdc/GetStatusEx" />
      </filters>
     
    </routing>

  </system.serviceModel>
</configuration>


I found lots of examples but didn't find anything about this specific error.
Thanks in advance.

Marcel
Posted

There is no such thing filterTable. The correct syntax is:
XML
<filterTables>
  <table name="routingTable">
 
Share this answer
 
I found the solution.
The application pool in IIS was default set to .NET 2.0 framework version.
WCF Services need a version 4.0 for the application pool to work.
 
Share this answer
 
v2

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