惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

S
Secure Thoughts
S
Securelist
P
Proofpoint News Feed
D
DataBreaches.Net
Cisco Talos Blog
Cisco Talos Blog
C
CXSECURITY Database RSS Feed - CXSecurity.com
Project Zero
Project Zero
A
About on SuperTechFans
罗磊的独立博客
WordPress大学
WordPress大学
月光博客
月光博客
Latest news
Latest news
C
Cyber Attacks, Cyber Crime and Cyber Security
GbyAI
GbyAI
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
博客园 - 三生石上(FineUI控件)
F
Fortinet All Blogs
W
WeLiveSecurity
Attack and Defense Labs
Attack and Defense Labs
V
Visual Studio Blog
Blog — PlanetScale
Blog — PlanetScale
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
P
Privacy International News Feed
AI
AI
博客园 - 司徒正美
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
www.infosecurity-magazine.com
www.infosecurity-magazine.com
Stack Overflow Blog
Stack Overflow Blog
M
MIT News - Artificial intelligence
Help Net Security
Help Net Security
T
Tor Project blog
V
Vulnerabilities – Threatpost
C
Cisco Blogs
I
Intezer
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
MyScale Blog
MyScale Blog
雷峰网
雷峰网
MongoDB | Blog
MongoDB | Blog
Forbes - Security
Forbes - Security
V
V2EX
Apple Machine Learning Research
Apple Machine Learning Research
T
Threat Research - Cisco Blogs
B
Blog RSS Feed
博客园 - 叶小钗
N
News and Events Feed by Topic
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
Simon Willison's Weblog
Simon Willison's Weblog
C
CERT Recently Published Vulnerability Notes
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
N
News and Events Feed by Topic

博客园 - DataFlow

word break 在不同浏览器中的表现 系统架构 创造HTTPS的是个神 为Chrome开发插件提高工作效率 Javascript 控制style 小结 svcutil 生成代理类时的问题 xeam Build Definition Extension uninstall 卸载 屏蔽电信流氓弹出广告 正则替换中的一个Bug SQL server 性能相关 SQL Express 相关 时间格式 输出一个在没有.Net 环境的机器也可以跑得安装包 再谈性能力 SCOM Configuration NumSamples and Absolute XML中的时间 decimal.Round 的区别 Dos中常用的命令 反序列化怪现象,数组无父
Wcf客户端配置里Endpoint的Name属性无效
DataFlow · 2013-02-17 · via 博客园 - DataFlow

<client>
      <endpoint address="http://..."
        binding="basicHttpBinding" bindingConfiguration="..."
        contract="..." name="endpoint1" />

</clent>

之后, 当我们在程序里读取endpoint.Name时,却发现怎么也找不到endpoint1,会返回BindingName_ContractName

code:

 Code:

private ServiceEndpoint CreateServiceEndpoint()
{
    TypeLoader loader = new TypeLoader();
    ServiceEndpoint serviceEndpoint = new ServiceEndpoint(loader.LoadContractDescription(this.contractType));
    if (this.address != null)
    {
        serviceEndpoint.Address = new EndpointAddress(new Uri(this.address), this.identity, new AddressHeader[0]);
    }
    if (this.binding != null)
    {
        serviceEndpoint.Binding = this.binding;
    }
    if (this.configurationName != null)
    {
        new ConfigLoader().LoadChannelBehaviors(serviceEndpoint, this.configurationName);
    }
    ComPlusTypedChannelBuilderTrace.Trace(TraceEventType.Verbose, 0x5001e, "TraceCodeComIntegrationTypedChannelBuilderLoaded", this.contractType, this.binding);
    return serviceEndpoint;
}

完全没有Name的什么事,算不算重大bug, 所以干脆直接配置成"bindingName+_+contractName",以免混淆视听