Wcf extention behaviour error RRS feed

  • Question

  • Am getting the error in IIS 7.0 while deploying the wcf rest webservice . I have used Newtonsoft.dll for adding serialization extension in the web.config for deserilizing Dictionary  .

    Server Error in '/' Application.

    Configuration Error

    Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately. 

    Parser Error Message: Invalid element in configuration. The extension name 'json' is not registered in the collection at system.serviceModel/extensions/behaviorExtensions. 

    Source Error: 
    Line 27:         <behavior name="endWeb">
    Line 28:           <webHttp helpEnabled="true" defaultBodyStyle="Bare" defaultOutgoingResponseFormat="Json" faultExceptionEnabled="true"/>
    Line 29:           <json/>
    Line 30:         </behavior>
    Line 31:       </endpointBehaviors>

    Source File: D:\SvnProjects\dreamUPServerIIS\dreamupService\dreamupService\web.config    Line: 29 

    Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.34009

    I have added the extension in web.config

            <add name="json" type="dreamupService.CustomBehaviours.NewtonsoftJsonBehaviorExtension, dreamupService, Version=, Culture=neutral, PublicKeyToken=null"/>

            <binding name="restWebHttpBinding" contentTypeMapper="dreamupService.CustomBehaviours.NewtonsoftJsonContentTypeMapper, dreamupService, Version=, Culture=neutral, PublicKeyToken=null"/>

    • Moved by Fred Bao Monday, June 23, 2014 3:04 AM WCF Related
    Friday, June 20, 2014 1:28 PM


All replies