在使用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"/>

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

如下:

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

相关文章:

  • 2021-06-07
  • 2022-12-23
  • 2021-07-25
  • 2021-12-06
  • 2022-12-23
  • 2022-01-21
  • 2021-10-19
  • 2021-05-30
猜你喜欢
  • 2022-12-23
  • 2021-08-03
  • 2022-01-24
  • 2022-12-23
  • 2021-12-02
  • 2021-09-22
相关资源
相似解决方案