Ajax Sys.WebForms.PageRequestManagerServerErrorException

Ajax Sys.WebForms.PageRequestManagerServerErrorException

一点背景。我有一个 IIS8 服务器。让我们称此服务器为 ABC。 在服务器 ABC 中。我有两个网站。一个叫做 websiteA 和 websiteB。他们是相同的网站。只有细微差别,因为 websiteB 主要用于测试和开发目的。

能否请您帮我解决 WebsiteA 上的问题? 该错误是一般错误:

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

WebsiteB 不会出现此错误。我比较了 ASPX 页面以确保它们完全相同。

你能帮我解决服务器上的500错误吗?我不知道怎么...

这是 ASPX 页面顶部 ajax 的注册程序集:

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>

这是我的工具包的片段

<asp:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server" EnablePageMethods="True"></asp:ToolkitScriptManager>

哇。我修好了这个。因此,为了好玩,我开始从页面中删除内容。 我删除的第一个是这个位。因为在不到一年前我添加了这个位。

         <asp:UpdatePanel ID="UpdatePanel1" runat="server">
                <ContentTemplate>
                </ContentTemplate>
            </asp:UpdatePanel>

然后我收到一条不同的错误消息: 我现在收到此错误:

System.Web.HttpException: Maximum request length exceeded

犯了一些 google 的那个错误,然后繁荣!我得到这个计算器 link: Maximum request length exceeded。我听从了建议,我的问题就消失了!霍瑞

解决方案是将其添加到我的 web.config! (加粗的是我新加的东西)

System.webserver是新位

executionTimeout="100000" maxRequestLength="214748364"

<configuration>
  <system.web>
    <compilation debug="true" strict="false" explicit="true" targetFramework="4.5" />
    <httpRuntime targetFramework="4.5" executionTimeout="100000" maxRequestLength="214748364"  />
    <customErrors mode="Off"/>
  </system.web>
  <system.webServer>
    <security>
      <requestFiltering>
        <requestLimits maxAllowedContentLength="1073741824" />
      </requestFiltering>
    </security>
  </system.webServer>
</configuration>