ASP.NET Ajax ErrorSys.WebForms.PageRequestManagerServerErrorException: An unknown error occurred while processing the request on the server

I created an Ajax website in Visual Studio, added a simple page with a text field and buttons, when I click on the button once, everything works, when I click twice I get an error

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

Here is my page

<form id="form1" runat="server">
    <asp:ScriptManager ID="ScriptManager1" runat="server" />
    <div>
        <asp:UpdatePanel ID="UpdatePanel1" runat="server">
            <ContentTemplate>
                <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
                <asp:Button ID="Button1" runat="server" Text="Button" OnClick="Button1_Click" />
            </ContentTemplate>
        </asp:UpdatePanel>
    </div>
</form>
        Protected Sub Button1_Click (ByVal sender As Object, ByVal e As System.EventArgs)
        TextBox1.Text = "aaa"
    End sub

Edit ~ I added a second page to the page, outside the update panel, and when I clicked it inside the update panel, and then outside the panel, I got an error

"ASPState", . . 'server\user'. : -. .

: System.Data.SqlClient.SqlException: "ASPState", . . 'server\user'.

?

~ ,

<sessionState mode="StateServer"
stateConnectionString="tcpip=localhost:42424"
cookieless="false"
timeout="20"/>
+3
3

: http://forums.asp.net/t/1044963.aspx

TextBox1.Text = "aaa" , .

0

, , SQL-, , . InProc?

0

in web.config add this

validateRequest="false" enableEventValidation="false"

to page section

0
source

Source: https://habr.com/ru/post/1699639/


All Articles