应用程序发布后,图标文件未打开

时间:2015-08-17 16:49:26

标签: c# .net azure

Image image = Image.FromFile(Path.Combine(Server.MapPath("/Content/Images/"), "mainImage.bmp"));

using (Graphics g = Graphics.FromImage(image))
{
    Icon point = new Icon(Path.Combine(Server.MapPath("/Content/Images/"), "favicon.ico"));
    g.DrawIcon(point, 10, 10); // here is the error
    // FYI: point.ToBitmap() also would give same error
}

我打开一个图标并将其绘制到位图上。在本地运行良好但在发布后无法在Azure站点上运行 错误:"参数无效"。此时point.Widthpoint.Height为零(但在本地等于16)。图标路径是正确的,它由URL" /Content/Images/favicon.ico"。显示。 有人可以帮忙吗?

0 个答案:

没有答案