【问题标题】:My browser does not show asp.net errors我的浏览器不显示 asp.net 错误
【发布时间】:2014-10-01 11:35:09
【问题描述】:

我需要你的帮助。

当我的 asp.net 代码出现问题时,它只会返回此消息 “呃,哦,出了问题!错误代码:500”,它没有给我具体的错误,所以谁能告诉我如何解决这个问题。

【问题讨论】:

  • 事件日志中有记录吗?
  • 您访问您的应用程序的浏览器是在本地服务器上运行还是在客户端计算机上运行?
  • 检查服务器上的 web.config 文件并查找 CustomErrors 标记。应该有一个条目可以重定向到包含您收到的消息的页面。将模式更改为关闭

标签: asp.net


【解决方案1】:

您需要检查web.config 文件。并查看customeError 标签使用打击设置

 <customErrors mode="Off"/>

这里有更多关于customeError的详细信息
您可以参考 SO
Asp.net - <customErrors mode="Off"/> error when trying to access working webpage

上的类似问题

编辑-1

有关自定义错误的更多详细信息
http://www.codeproject.com/Articles/2345/Custom-Errors-in-ASP-NET

【讨论】:

    【解决方案2】:

    您的代码中可能存在一些服务器无法识别的错误,这可能是您的代码中的拼写错误。 当我使用联接并给出错误的返回值时,我在查询中遇到了这个问题 例如:

    select tia.*,aht.tutor_uid,ucm.name,ucm.contactdetail from tutor_invoice_against_contract as tia
            left join tutor_billing_against_contract as tba on tba.tbill_id = tia.tbill_id
                         left join ad_hoc_teacher_master as aht on aht.contract_id = tia.contract_id
                        where tia.tin_id = '".$id."' 
    

    当我使用 ath 代替 aht 时,它给出了这个

    【讨论】:

      猜你喜欢
      • 2019-05-13
      • 1970-01-01
      • 2017-03-27
      • 2019-06-03
      • 2010-10-30
      • 2017-10-26
      • 1970-01-01
      • 2017-08-24
      • 1970-01-01
      相关资源
      最近更新 更多