我在Visual Studio中创建了一个Ajax网站,添加了一个带有文本框和按钮的简单页面,当我单击按钮时作品,当我点击两次我得到错误ASP.NET Ajax ErrorSys.WebForms.PageRequestManagerServerErrorException:在服务器上处理请求时发生未知错误
Sys.WebForms.PageRequestManagerServerErrorException:处理服务器上的请求时发生未知的错误。从服务器返回的状态码为:500
这里是我的网页
<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
编辑〜我添加了第二个按钮的网页,更新面板之外,当我点击了一个在更新面板内,然后在面板外部出现错误
无法打开登录请求的数据库“ASPState”。登录失败。 用户'server \ user'登录失败。 描述:执行当前Web请求期间发生未处理的异常。请查看堆栈跟踪以获取有关该错误的更多信息以及源代码的位置。
异常详细信息:System.Data.SqlClient.SqlException:无法打开登录请求的数据库“ASPState”。登录失败。 用户'server \ user'登录失败。
这是为什么?
编辑〜要解决我的问题,我没有
<sessionState mode="StateServer"
stateConnectionString="tcpip=localhost:42424"
cookieless="false"
timeout="20"/>
我GUSS我们需要看到代码隐藏文件也... – 2008-11-16 19:58:32
在同一个Web服务器和SQL服务器机? – 2008-11-17 05:29:49