Winform Http上传文件失败,是不是文件太大?
下雪的雨 2013-05-23 11:40:54 有两个 txt 格式的文件:
1.txt 大小:8 bytes
2.txt 大小:25.6MB
两个文件都放在当前项目中的 Data 文件下
代码:
WebClient myWebClient = new WebClient();
//可以成功上传
myWebClient.UploadFile("http://localhost:64830/WebForm1.aspx","Post",@"H\Table_6.23\TABLE\App\Data\1.txt");
//上传失败
myWebClient.UploadFile("http://localhost:64830/WebForm1.aspx","Post",@"H\Table_6.23\TABLE\App\Data\3.txt");
错误:远程服务器返回错误:(500)内部服务器错误
怎么解决?