HttpWebRequest q = (HttpWebRequest)WebRequest.Create("http://www.yunxingwenhua.com.cn/2011011703005.mp3");
q.Method = "post";
q.ContentType = "application/x-www-form-urlencoded";
Stream s = q.GetRequestStream();
BinaryReader b = new BinaryReader(s); //流不可写
FileStream fs = new FileStream("G:\\a.mp3", FileMode.Create, FileAccess.Write);
fs.Write(b.ReadBytes((int)q.ContentLength), 0, (int)q.ContentLength);
fs.Close();
b.Close();
s.Close();请问为什么流不可写,哪儿错了
解决方案 »
- 服务器端下载远程图片,如何获取状态
- 求asp.net短信收发示例
- 如何在ASP.NET的程序里面 将数据转换成PDF
- 请问怎么执行这两句代码时,出现白屏(界面白色)?应该怎么改?
- |M|SQL更新语句:sql = "update sell set send=(case send when 0 then 1 else 0 end) where id=107"问题
- 帮忙解释语句谢谢!id=<%response.write(request.querystrint("id"))
- 非抱怨贴:现在的产品很多都是在不停的堆积功能,堆加业务逻辑
- VS2005对内存有么要求
- 在WEBMATRIX下运行一关于REAPEATER控件的例子DataBinder.Eval(System.ComponentModel.Container.DataItem,"Country")报错“DataItem”不
- 当输入焦点移至一个文本框,就有一个相应的按钮变成默认,这个怎么实现?
- JS中如何获取asp:label呢?
- 关于 月排班表
new WebClient().DownloadFile()