jeudi 5 novembre 2015

WCF cannot create custom endpointbehavior only in PROD environment

Vote count: 0

I have a WCF rest web service. Everything works fine on my development environment (#develop using IIS express), but i get the following error on my production evironment:

Server Error in '/Services' 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: An error occurred creating the configuration section handler for system.serviceModel/behaviors: Extension element 'inspectMessageBehavior' cannot be added to this element.  Verify that the extension is registered in the extension collection at system.serviceModel/extensions/behaviorExtensions.
Parameter name: element

Source Error: 

Line 16:            </service>
Line 17:        </services>
Line 18:        <behaviors>
Line 19:            <endpointBehaviors>
Line 20:                <behavior name="webHttp">

Source File: C:\Otimis\AdvLinkForWebService\services\web.config    Line: 18 

Version Information: Microsoft .NET Framework Version:2.0.50727.3053; ASP.NET Version:2.0.50727.3053 

This is my web.config file:

<?xml version="1.0" encoding="utf-8" ?>
            <service name="AdvLinkForWebService.inbound">
                <endpoint address=""
            <service name="AdvLinkForWebService.config">
                <endpoint address=""
                <behavior name="webHttp">
                <behavior name="defaultWebHttpBehavior">
                <add name="inspectMessageBehavior"
                     type="AdvLinkForWebService.MessageInspector.InspectMessageBehaviorExtension, AdvLinkForWebService"/>

This question is related to this one

asked 47 secs ago

This entry passed through the Full-Text RSS service - if this is your content and you're reading it on someone else's site, please read the FAQ at

WCF cannot create custom endpointbehavior only in PROD environment

Aucun commentaire:

Enregistrer un commentaire