日期:2014-05-17  浏览次数:21066 次

WINCE下 提交POST的数据,服务器怎么接收不到
本人开发平台wince,开发软件vs2005.最近想在wince上发送请求到服务器,但是服务器却接收不到我的post数据,我的代码如下:

                    HttpWebRequest request = (HttpWebRequest)WebRequest.Create(new Uri(Url));

                    byte[] Eparam = Encoding.ASCII.GetBytes(postDATE); // 转化
                    MessageBox.Show(Encoding.ASCII.GetString(Eparam, 0, Eparam.Length));

                    request.Method = "post";
                    request.ContentType = "application/x-www-form-urlencoded";
                    request.ContentLength = Eparam.Length;

                    Stream questStream = null;   
                    try
                    {
                        questStream = request.GetRequestStream();
                        questStream.Write(Eparam, 0, Eparam.Length);
                        questStream.Flush();
                    }
                    //处理异常
                    catch (Exception ex)
                    {
                        return ex.Message.ToString();
                    }
                    finally
                    {
                        questStream.Close();
                    }
请求大侠。告知原因。