Web.config中的错误(system.serviceModel) [英] Web.config error (system.serviceModel)

查看:1073
本文介绍了Web.config中的错误(system.serviceModel)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

任何帮助,为什么这个错误发生?

Any help why this error happens?

感谢您!

发生创造了配置节处理程序错误   system.serviceModel /行为:扩展元素cookieManager   不能被添加到这个元素。验证扩展   在扩展集合注册   system.serviceModel /扩展/ behaviorExtensions。参数名:   元素

An error occurred creating the configuration section handler for system.serviceModel/behaviors: Extension element 'cookieManager' cannot be added to this element. Verify that the extension is registered in the extension collection at system.serviceModel/extensions/behaviorExtensions. Parameter name: element

web.config中

web.config

<system.serviceModel>
    <behaviors>
      <endpointBehaviors>
        <behavior name="EnableCookieManager">
          <cookieManager/>
        </behavior>
      </endpointBehaviors>
    </behaviors>
    <extensions>
      <behaviorExtensions>
        <add name="cookieManager" type="App1.Web.Cookie.CookieManagerBehaviorExtension, App1, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null"/>
      </behaviorExtensions>
    </extensions>

<一个href="http://archive.msdn.microsoft.com/wcfcookiemanager/Release/ProjectReleases.aspx?ReleaseId=2240"相对=nofollow>这个例如已被使用。

推荐答案

您需要确保该类型名称是完全等价的typeof(CookieManagerBehaviorExtension).AssemblyQualifiedName

You need to ensure the type name is exactly equivalent to typeof(CookieManagerBehaviorExtension).AssemblyQualifiedName

另外,如果你使用WCFService配置编辑器来添加行为扩展,你可以浏览DLL和放大器;类和它然后将所有正确的信息到您的配置文件,以防万一你得到它稍有不妥?

Also, if you use the WCFService Config Editor to add the behavior extension, you can just browse for the DLL & class and it then sets all the proper information to your configuration file, just in case you got it slightly wrong?

这篇关于Web.config中的错误(system.serviceModel)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆