问题描述
大家好,
我有一个非常简单的WCF服务,该服务由网页使用.我正在使用对象数据源来填充列表视图.后面的代码中没有代码.这一切都是由向导完成的.这个周末,由于洪水造成的停电,服务所在的服务器已关闭.由于服务已关闭,因此无法加载托管在异地的网页.今天,我正在尝试添加错误处理,该错误处理仍将让页面加载并且仅不填充列表视图.这比我想的要困难得多.我在哪里/应该如何捕捉例外?我所做的就是添加服务引用,然后使用向导访问对象数据源和列表视图.我仍然希望网页加载,并且不想转到自定义错误页面.这似乎应该很容易.我是否缺少明显的东西?这是一个ASP.NET 3.5网站.
谢谢,
Chuck
Hi All,
I have a really simple WCF service that is consumed by a web page. I''m using an object datasource to populate a listview. I have no code in the code-behind. It was all done with the wizards. This weekend, due to a power outage caused by a flood, the server where the service resides was down. The webpage, hosted offsite, would not load because the service was down. Today, I''m trying to add error handling that will still let the page load and just not populate the listview. This has been more difficult that I thought it would be. Where/How should I catch the exception? All I did was add a service reference and then use wizards for the object datasource and listview. I still want the webpage to load and don''t want to go over to a custom error page. This seems like it should be easy. Am I missing something obvious? It''s an ASP.NET 3.5 website.
Thanks,
Chuck
推荐答案
这篇关于WCF服务不可用-断电-什么错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!