Avatar of Jason Livengood
Jason Livengood
Flag for United States of America

asked on 

Problem with WCF web.config

I am trying to enable metadata publishing for my WCF service. Everytime i go to browse my service it gives me the error :"There is no endpoint behavior named 'ProductsBehavior'."  Attached is my web.config where you can see I do declare the behavior. Was wondering if anybody can tell me why it bombs out. Any help would be greatly appreciated.

Jason

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
    <configSections>
        <section name="dataConfiguration" type="Microsoft.Practices.EnterpriseLibrary.Data.Configuration.DatabaseSettings, Microsoft.Practices.EnterpriseLibrary.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null" />
    </configSections>
    <dataConfiguration defaultDatabase="AdventureWorksConnection" />
    <connectionStrings>
        <add name="AdventureWorksConnection" connectionString="AdventureWorks=Database;Server=JASON;Integrated Security=SSPI;"
            providerName="System.Data.SqlClient" />
    </connectionStrings>
  <system.serviceModel>
 
    <services>
      <service name="Products.ProductsServiceImpl">
        <endpoint address="" binding="basicHttpBinding" contract="Products.IProductsService" behaviorConfiguration="ProductsBehavior" />
       </service>
    </services>
    <behaviors>
      <serviceBehaviors>
        <behavior name="ProductsBehavior">
          <serviceMetadata httpGetEnabled="true" />
        </behavior>
      </serviceBehaviors>
    </behaviors>
    
  </system.serviceModel>
</configuration>

Open in new window

WCF

Avatar of undefined
Last Comment
Aaron Jabamani

8/22/2022 - Mon