C# Ways2SSMS服务显示连接到服务器时出错

C# Ways2SSMS服务显示连接到服务器时出错,c#,asp.net,sms,sms-gateway,C#,Asp.net,Sms,Sms Gateway,最近,我试图学习如何使用ways2sms网关发送短信 在我成功输入我的用户名(即我的手机号码)和通过我的手机号码发送短信认证所需的密码后。 提示以下错误:连接到服务器时出错。 可能是什么问题: 我在:行遇到错误 { this.response = (HttpWebResponse)this.req.GetResponse(); } try { this.req = (HttpWebRequest)WebRequest.Create("http://www

最近,我试图学习如何使用ways2sms网关发送短信

在我成功输入我的用户名(即我的手机号码)和通过我的手机号码发送短信认证所需的密码后。 提示以下错误:连接到服务器时出错。 可能是什么问题:

我在:行遇到错误

{ this.response = (HttpWebResponse)this.req.GetResponse(); }

try
        {
            this.req = (HttpWebRequest)WebRequest.Create("http://wwwd.way2sms.com/auth.cl");

        this.req.CookieContainer = new CookieContainer();
        this.req.AllowAutoRedirect = false;
        this.req.Method = "POST";
        this.req.ContentType = "application/x-www-form-urlencoded";
        this.strNewValue = "username=" + ckuser + "&password=" + ckpass;
        this.req.ContentLength = this.strNewValue.Length;
        StreamWriter writer = new StreamWriter(this.req.GetRequestStream(), Encoding.ASCII);
        writer.Write(this.strNewValue);
        writer.Close();
        this.response = (HttpWebResponse)this.req.GetResponse();
        this.cookieCntr = this.req.CookieContainer;
        this.response.Close();
        this.req = (HttpWebRequest)WebRequest.Create("http://wwwd.way2sms.com//jsp/InstantSMS.jsp?val=0");
        this.req.CookieContainer = this.cookieCntr;
        this.req.Method = "GET";
        this.response = (HttpWebResponse)this.req.GetResponse();
        responseee = new StreamReader(this.response.GetResponseStream()).ReadToEnd();
        int index = Regex.Match(responseee, "custf").Index;
        responseee = responseee.Substring(index, 0x12);
        responseee = responseee.Replace("\"", "").Replace(">", "").Trim();
        this.response.Close();

        pnlsend.Visible = true;
        lblErrormsg.Text = "connected";
    }
    catch (Exception)
    {
        lblErrormsg.Text = "Error connecting to the server...";
        Session["error"] = "Error connecting to the server...";
        Server.Transfer("login.aspx");


    }

实际的例外情况是什么message@ChrisBint远程服务器返回错误:(404)未找到。@Miles\u To\u Go\u B4\u I\u Die除了用户id、密码之外,您是否在请求中发送唯一的标识id?请看这里@Coder:您建议使用的是PHP&我希望使用.NET(无论是C#还是VB)