Click here to Skip to main content
14,424,979 members
Rate this:
Please Sign up or sign in to vote.
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

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


Here is my web.config:

<?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
Rate this:
Please Sign up or sign in to vote.

Solution 1

There is no such thing filterTable. The correct syntax is:
<filterTables>
  <table name="routingTable">
   
Rate this:
Please Sign up or sign in to vote.

Solution 2

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.
   
v2

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

  Print Answers RSS
Top Experts
Last 24hrsThis month



CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100