WEB项目打包后出现“系统错误,WebClient 请求期间发生异常”
在VS2003中生成解决方案运行是没有这种错误的运行正常,功能是生成图片:
private Bitmap DownloadImage(string url)
{
string ext=url.Substring(url.LastIndexOf("."));
string name=Globals.GetDownloadSavePath(CountString+DateTime.Now.Ticks.ToString("X")+ext);
System.Net.WebClient myWebClient = new System.Net.WebClient();
myWebClient.DownloadFile(url,name);
Bitmap img=new Bitmap(name);
AddTemplateFile(name);
return img;
}
WEB项目打包安装后有的机正常生成图片,有的机出现“系统错误,WebClient 请求期间发生异常”。
是怎么回事?帮我解决一下吧,各位~~!
谢谢~~!