由于目标计算机积极拒绝,无法连接。 127.0.0.1:49420
说明: 执行当前 Web 请求期间,出现未处理的异常。请检查堆栈跟踪信息,以了解有关该错误以及代码中导致错误的出处的详细信息。
异常详细信息: System.Net.Sockets.SocketException: 由于目标计算机积极拒绝,无法连接。 127.0.0.1:49420
源错误:
行 26: string cmdtxt = "SELECT COUNT(*) from [User] WHERE Username='" + TextBox1.Text + "' and Password='" + TextBox2.Text + "'";
行 27: localhost.WebServiceS ws = new localhost.WebServiceS();
行 28: int i = ws.CommandSqlSELECT(ConnectionString, cmdtxt);
行 29: if (i == 1)
行 30: {
源文件: d:\学年论文\1\Admin.aspx.cs 行: 28
堆栈跟踪:
[SocketException (0x274d): 由于目标计算机积极拒绝,无法连接。 127.0.0.1:49420]
System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress) +239
System.Net.Sockets.Socket.InternalConnect(EndPoint remoteEP) +35
System.Net.ServicePoint.ConnectSocketInternal(Boolean connectFailure, Socket s4, Socket s6, Socket& socket, IPAddress& address, ConnectSocketState state, IAsyncResult asyncResult, Int32 timeout, Exception& exception) +224
[WebException: 无法连接到远程服务器]
System.Net.HttpWebRequest.GetRequestStream(TransportContext& context) +1878753
System.Net.HttpWebRequest.GetRequestStream() +13
System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters) +103
localhost.WebServiceS.CommandSqlSELECT(String SQLConnectionString, String Cmdtxt) +65
Admin.Button1_Click(Object sender, EventArgs e) in d:\学年论文\1\Admin.aspx.cs:28
System.Web.UI.WebControls.Button.OnClick(EventArgs e) +111
System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +110
System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +10
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +36
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1565