PDA HTTP POST方式 急

qgj1655 2009-02-26 10:58:22
我在桌面程序中用这段代码是正常的,可在PDA使用时 aa.GetResponse();时就出错了,什么原因,请大家帮帮忙,
            System.Net.WebRequest aa = System.Net.WebRequest.Create("http://192.168.1.174/WebSite30/Default.aspx");
aa.Method = "POST";
aa.ContentType = "application/x-www-form-urlencoded";


byte[] by = new byte[] { 55, 77, 88 };

aa.ContentLength = by.Length;
System.IO.Stream newStream = aa.GetRequestStream();
newStream.Write(by, 0, by.Length);
newStream.Close();

System.Net.WebResponse bb = aa.GetResponse(); //
label1.Text = bb.GetResponseStream().ReadByte().ToString();
...全文
88 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
儿大不由爷 2009-02-26
  • 打赏
  • 举报
回复
你用PDA的IE访问http://192.168.1.174/WebSite30/Default.aspx看看
qgj1655 2009-02-26
  • 打赏
  • 举报
回复

能连网,我在服务器端是写了是个创建文件并返回一个值的事件,
执行时,服务器端是创建了文件的
我在桌面程序上的demo是正常的
错误是:
An error message cannot be displayed because an optional resource assembly containing it cannot be found
儿大不由爷 2009-02-26
  • 打赏
  • 举报
回复
你的PDA能连上网么?
看看具体的返回错误呀
88csdn 2009-02-26
  • 打赏
  • 举报
回复
你给PDA分配IP了?确定能访问192.168.1.174?
An error message cannot be displayed because an optional resource assembly containing it cannot be found
是因为设备上缺少System.SR.dll,在C:\Program Files\Microsoft Visual Studio 8\SmartDevices\SDK\CompactFramework\2.0\v2.0\WindowsCE\Diagnostics
中找到System_SR_CHS_wm.cab,安装在设备上就可以看到异常信息了~~~

7,656

社区成员

发帖
与我相关
我的任务
社区描述
Windows Phone是微软发布的一款手机操作系统,它将微软旗下的Xbox LIVE游戏、Zune音乐与独特的视频体验整合至手机中。
社区管理员
  • Windows客户端开发社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧