无法使IErrorHandler工作 [英] Can't make IErrorHandler work
本文介绍了无法使IErrorHandler工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个样本WCF服务
我的合同:
Hi,
I have a sample WCF service
My Contract:
使用 System.ServiceModel; |
命名空间 < font style ="font-size:11px"> ServiceImplemention |
{ |
[ServiceContract] |
public 界面 IService | { |
[OperationContract] |
string PerformErrorOperation(); |
} |
} |
using System.ServiceModel; |
namespace ServiceImplemention |
{ |
[ServiceContract] |
public interface IService |
{ |
[OperationContract] |
string PerformErrorOperation(); |
} |
} |
推荐答案
您需要类型规范中的完整程序集名称:
< 添加 名称 = " errorHandler" 类型 = " ServiceImplemention。 ErrorHandlerElement,ServiceImplemention" />
应为:
< add 名称 = " errorHandler" ; type = " ServiceImplemention.ErrorHandlerElement,ServiceImplemention,Version = 1.0.0.0,Culture = neutral,PublicKeyToken = null" />
-Scott
You need the full assembly name in the type specification:
<add name="errorHandler" type="ServiceImplemention.ErrorHandlerElement, ServiceImplemention"/>
should be:
<add name="errorHandler" type="ServiceImplemention.ErrorHandlerElement, ServiceImplemention, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null"/>
-Scott
这篇关于无法使IErrorHandler工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文