错误提示:Sys.WebForms.PageRequestManagerServer ErrorException: An unknown error occurred while processing the request on the server was 500

错误提示:Sys.WebForms.PageRequestManagerServer ErrorException: An unknown error occurred while processing the request on the server .the status code returned from the server was :500

 

Sys.WebForms.PageRequestManagerServerErrorException: An unknown error occurred while processing the request on the server. The status code returned from the server was: 500 解决办法

Sys.WebForms.PageRequestManagerServerErrorException: An unknown error occurred while processing the request on the server. The status code returned from the server was: 500 解决办法

 
我的解决办法:
在Web.Config
<system.web>
      <pages enableEventValidation="false"/>
</system.web>

转载的解决办法:
Sys.WebForms.PageRequestManagerServerErrorException: An unknown error occurred while processing the request on the server. The status code returned from the server was: 500

在 ScriptManager  内添加 EnablePartialRendering="false" 显示详细的错误信息。

如下:
<asp:ScriptManager ID="ScriptManager1" runat="server" EnablePartialRendering="false"/>

一般的原因都是页面存在潜在的危险字符  在 页首加入 ValidateRequest="false" 

如下:

<%@ Page Language="C#" MasterPageFile="~/MasterPages/CompanyManage.master" AutoEventWireup="true" CodeFile="CompanyIntroEdit.aspx.cs" Inherits="CompanyIntroEdit" Title="Untitled Page" ValidateRequest="false" %>
 
服务器尝试处理请求
 
Sys.WebForms.PageRequestManagerServerErrorException: 在服务器上处理请求时出现未知错解决办法
 

在使用updatepanel 时,上传到服务器出现如下错误:

Sys.WebForms.PageRequestManagerServerErrorException: 在服务器上处理请求时出现未知错误。服务器返回的状态码为: 500

解决办法:

 

一般的原因都是页面存在潜在的危险字符 在 页首加入 ValidateRequest="false"

如下:

<%@ Page Language="C#" MasterPageFile="~/MasterPages/CompanyManage.master" CodeFile="CompanyIntroEdit.aspx.cs" Inherits="CompanyIntroEdit" Title="Untitled Page" ValidateRequest="false" %>


其他解决办法:

在Web.Config
<system.web>
      <pages enableEventValidation="false"/>
</system.web>
Sys.WebForms.PageRequestManagerServerErrorException: An unknown error occurred while processing the request on the server. The status code returned from the server was: 500

在 ScriptManager 内添加 EnablePartialRendering="false" 显示详细的错误信息。

如下:
<asp:ScriptManager ID="ScriptManager1" runat="server" EnablePartialRendering="false"/>

例如:

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" ValidateRequest="false" %>

 

最近做一个页面部份数据定时自动刷新功能,并且不出现刷屏效果时,用到 Ajax 控件时出现了
Sys.WebForms.PageRequestManagerServerErrorException: An unknown error occurred while processing the request on the server. The status code returned from the server was: 500 的问题。

Sys.WebForms.PageRequestManagerServerErrorException: An unknown ...500 的问题。 - yishimengying - yishimengying的博客

网上查找到了几种解决办法

第一种方法:
在 web.config 中加入这句代码,不验证回发事件数据
<system.web> 
<pages enableEventValidation="false"/>
</system.web>
问题:这句代码原本我的web.config中就存在,只是我的本地电脑和一部份电脑不会出现上面的错误,但有的电脑会出现,郁闷中……

第二种方法:

在 ScriptManager 内添加 EnablePartialRendering="false" 显示详细的错误信息。

如下:
<asp:ScriptManager ID="ScriptManager1" runat="server" EnablePartialRendering="false"/>
问题:这种方法会使页面有刷屏效果,我就是要解决刷屏问题,所以未能解决我的问题


第三种方法:
一般的原因都是页面存在潜在的危险字符 在 页首加入 ValidateRequest="false"

如下:

<%@ Page Language="C#" MasterPageFile="~/MasterPages/CompanyManage.master" AutoEventWireup="true" CodeFile="CompanyIntroEdit.aspx.cs" Inherits="CompanyIntroEdit" Title="Untitled Page" ValidateRequest="false" %>

最后一种方法还是比较有效的,目前尚未发现这种错误。


感谢:在此对提供解决方法的朋友表示感谢!!!!


 401错误

Sys.WebForms.PageRequestManagerServerErrorException: An unknown error occurred while processing the request on the server. The status code returned from the server was: 500(401等)

网上说法较多的原因是:
这时候大家可以在web.config的system.web节中加入
<customErrors mode="Off"/>
再执行相关操作就会提示相对准确的错误,我网站提示“操作必须使用可更新的查询”。
跟空间服务商沟通,原来是ASP.NET账户(Network Service)未拥有该目录的写入权限所致。

今天我使用ajax+asp.net2.0也遇到这个问题,我惊奇的发现原来在编辑的内容中出现了“<!-- -->”,后来删除,问题解决。应该是ajax在生成URL时引用了编辑内容部分,而导致错误。

 

posted @ 2013-12-16 16:19  苏苏zhao  阅读(1050)  评论(1)    收藏  举报