• 在使用updatepanel 时,上传到服务器出现如下错误: Sys.WebForms.PageRequestManagerServerErrorException: 在服务器上处理请求时出现未知错误。服务器返回的状态码为: 500


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

  • 相关阅读:
    Python中的魔法方法【技能突破】
    Python简明教程:面向对象【新手必学】
    No such file or directory
    LaTeX Error: File ''picins.sty'' not Found.
    GCC编译过程中的各种not declared in this scope
    20.有效的括号-力扣
    c++标准库bitset文件
    c++标准库windows.h文件
    warning: control reaches end of non-void function
    c++标准库iostream文件
  • 原文地址:https://www.cnblogs.com/Areas/p/2658913.html
Copyright © 2020-2023  润新知