如何在没有程序集版本号的情况下指定 wcf behaviorExtension 类类型? [英] How do i specify wcf behaviorExtension class type without the assembly version number?

查看:18
本文介绍了如何在没有程序集版本号的情况下指定 wcf behaviorExtension 类类型?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个使用 WCF 服务的 Web 应用程序,该服务使用了如下所示的 behaviorExtension:

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

<behaviorExtensions>
<add name="clientCredentialsExtension" type="Simon.Web.Giftcard.WCFSecurity.ClientCredentialsExtensionElement, Simon.Web.Giftcard, Version=1.0.3736.20411, Culture=neutral, PublicKeyToken=null"/>
</behaviorExtensions>

问题是这个网络应用的版本随着每次编译而改变(我认为),从而使这个条目无效.

The problem is this web app's version changes with every compile (i think) and thus invalidating this entry.

如何避免每次编译时都必须更改版本号?我可以在代码中指定扩展名吗?

How can I avoid having to change the version number every time I compile this? Can I specify the extension in code somewhere?

推荐答案

试试这个:

<behaviorExtensions>
    <add 
        name="clientCredentialsExtension"         
        type="Simon.Web.Giftcard.WCFSecurity.ClientCredentialsExtensionElement, Simon.Web.Giftcard"/>
</behaviorExtensions>

这篇关于如何在没有程序集版本号的情况下指定 wcf behaviorExtension 类类型?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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