Hi, I created an Ajax website in Visual Studio, added a simple page with a textbox and button, when I click the button once everything works, when I click it twice I get the 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 button to the page, outside of the update panel and when I clicked the one inside the update panel and then the one outside of the panel I got the error
Cannot open database "ASPState" requested by the login. The login failed. Login failed for user 'server\user'. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Data.SqlClient.SqlException: Cannot open database "ASPState" requested by the login. The login failed. Login failed for user 'server\user'.
Why is this?
Edit ~ To resolve my issue I did
<sessionState mode="StateServer"
stateConnectionString="tcpip=localhost:42424"
cookieless="false"
timeout="20"/>