.Net发出图片Request请求
Stream reader = null; //可能是外部链接 if (imgUrl.ToLower().StartsWith("http://")) { var request = System.Net.WebRequest.Create(imgUrl); var response = request.GetResponse(); reader = response.GetResponseStream(); } else { reader = new FileStream( System.Web.HttpContext.Current.Server.MapPath( imgUrl ), FileMode.Open ); }