如何从我的网页中收到错误消息

时间:2010-06-16 20:18:19

标签: web-services iis web

我有一个网页,当我在远程计算机上运行时,我收到消息说远程错误cannot be viewed

当我在我的网络服务器机器上查看它时,我收到一条消息:

Internet Explorer cannot display the webpage 

  • Most likely causes:
  • You are not connected to the Internet. 
  • The website is encountering problems. 
  • There might be a typing error in the address.  

What you can try: 
     Check your Internet connection. Try visiting another website to make sure you are connected.  

     Retype the address.  

     Go back to the previous page. 

我可以google好,所以它不是互联网连接....但是这条消息没有给我任何工作。如何获得有关我的网页无法正常工作的更多信息?

我尝试访问IIS Mananger并右键单击该站点并选择浏览。但我的网站是一个HTTPS网站,因此不起作用。

任何想法都会很棒。

2 个答案:

答案 0 :(得分:3)

快速而肮脏的修复方法是编辑ASP应用程序的web.config,就像错误消息所示,以便您可以看到远程计算机上的错误。我还会检查服务器日志,看看是否有任何报告。

确保customErrors标记的mode属性设置为"Off"

<!-- Web.Config Configuration File -->

<configuration>
    <system.web>
        <customErrors mode="Off"/>
    </system.web>
</configuration>

在生产中删除它,因为您不希望外人看到这些错误消息并获取有关应用程序工作的信息,这是一个安全风险。

<强>更新

至于您在本地IE上的错误,请确保选项

view friendly http error messages已停用。在IE8中它位于:

工具&gt;互联网选项&gt;先进

这可能会解决IE显示含糊信息的问题。

答案 1 :(得分:0)

尝试在本地运行相同的代码。您可以编写异常日志。并可以查看该日志。这些服务器上禁用了这些服务,以确保您网站的安全。