none
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

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

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


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

Answers

All replies