Handling XmlDataSource when remote XML source not available
问题 When using an XmlDataSource is there good way to handle exceptions that are caused when the remote XML file is unavailable? I'm somewhat new to .NET and using C#. 回答1: It's really up to you to determine what is suitable for your application when an exception like this is raised. The only thing you shouldn't do is ignore it. Options you have include: Automatically retry a number of times, in case the connection problem is transitory Return an appropriate error message to the user and perhaps