How do i specify wcf behaviorExtension class type without the assembly version number?

前端 未结 4 1679
忘了有多久
忘了有多久 2020-12-21 15:03

I have a web app that uses a WCF service that utilizes a behaviorExtension like so:




        
相关标签:
4条回答
  • 2020-12-21 15:35

    If you are stuck with .NET 3.5 where the configuration bug is not fixed yet, the solution is to implement IServiceBehavior by your service. See this article, example 6-15 .

    0 讨论(0)
  • 2020-12-21 15:37

    Try this:

    <behaviorExtensions>
        <add 
            name="clientCredentialsExtension"         
            type="Simon.Web.Giftcard.WCFSecurity.ClientCredentialsExtensionElement, Simon.Web.Giftcard"/>
    </behaviorExtensions>
    
    0 讨论(0)
  • 2020-12-21 15:51

    Apparently it's fixed in .Net 4.0 beta 2. Not much use to me, who is stuck with 3.5.

    http://connect.microsoft.com/wcf/feedback/details/216431/wcf-fails-to-find-custom-behaviorextensionelement-if-type-attribute-doesnt-match-exactly

    0 讨论(0)
  • 2020-12-21 15:54

    This annoying bug bit me before too. I eventually changed all mine to build up in code instead of in the config.

    0 讨论(0)
提交回复
热议问题