错误信息 : There was an error processing the request

本文介绍了一个使用ASP.NET AJAX 1.0开发的网站在页面提交时遇到的问题及解决办法。当服务器端出现异常时,客户端会收到通用错误提示而无法获取具体的异常信息。解决方法是在web.config中将customErrors模式设置为Off。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

服务器环境:Win 2003 / IIS6 / ASP.NET AJAX 1.0 / C# 2.0

使用ASP.NET AJAX 1.0开发的一个网站,在页面提交的时候会出现如下错误信息。

There was an error processing the request

在网上搜索了一下找到了
http://dotnetslackers.com/columns/ajax/AspNetAjaxExceptionLogging.aspx
Another interesting thing I found when working with client exceptions is, when a server side exception (Web Service, Update Panel) is generated you will find the actual exception message, type, stack trace of that exception in JavaScript. Once you set the customErrors mode to On in the web.config file (recommended) when deploying the website, you'll obtain the generic message "There was an error processing the request" and no exception type and stack trace. I think this is unfortunate; at least the exception message and type should be present on the client side. May be the ASP.NET AJAX Team will consider this in future release. 

解决的方法很奇怪。

需要设置 web.config 中的customErrors为Off

<customErrors mode="Off">

具体原因不清楚。
有了解这方面信息的吗?

转载于:https://www.cnblogs.com/hawkjin/archive/2008/01/28/1056317.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值