MonoTouch - Silverlight 工具制作的 WCF 服务 - 无法捕获异常 [英] MonoTouch - WCF Services made by Silverlight tool - Can't catch exceptions
问题描述
使用 Silverlight 服务生成器创建服务类:
Using the Silverlight service generator a service class is created:
slsvcutil.exe http://localhost/zzz/zzzz.svc?wsdl
/namespace:"*,General" /d:z:\desktop /noConfig /ser:DataContractSerializer
然后创建这个类并调用异步方法.
This class then is created and the async methods called.
即使所有调用和构造都包含在 Exception try/catches 中,我们也无法捕获诸如System.ServiceModel.EndpointNotFoundException"之类的错误
Even with all calls and constructions wrapped in Exception try/catches, we can not catch errors like "System.ServiceModel.EndpointNotFoundException"
我们在 Silverlight 客户端中运行完全相同的代码,并且在 try/catch 块中捕获错误.
We have the exact same code running in Silverlight clients, and errors are caught in try/catch blocks.
问题:在 MonoTouch 中使用时,是否需要使用其他地方/方法来捕获 WCF 错误?
Question: Is there another place/method I need to use in order to catch WCF errors when consuming in MonoTouch?
推荐答案
这似乎是一个错误.框架团队正在修复它.
This appears to be a bug. The framework team is fixing it.
这篇关于MonoTouch - Silverlight 工具制作的 WCF 服务 - 无法捕获异常的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!