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.
Even with all calls and constructions wrapped in Exception try/catches, we can not catch errors like "System.ServiceModel.EndpointNotFoundException"
We have开发者_如何学JAVA the exact same code running in Silverlight clients, and errors are caught in try/catch blocks.
Question: Is there another place/method I need to use in order to catch WCF errors when consuming in MonoTouch?
I don't know if I understood your question well... :)
In my opinion, in the handler for the async request, check if the error is null or not.
if(e.Error != null)
{
// insert code here to fix the error
// in a similar way you do with catch block
}
else
{
// normal execution
}
Hope it helps you!! Best regards.
This appears to be a bug. The framework team is fixing it.
精彩评论