Sys.WebForms.PageRequestManagerServerErrorException: An unknown error occurred while processing……

来源:互联网 发布:2017交通安全事故数据 编辑:程序博客网 时间:2024/05/19 02:06

sys.WebForms.PageRequestManagerServerErrorEsception: AnKnown 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"%>
原创粉丝点击