无法上传图片

问题描述:



当我上传图片时.它显示错误:"bitmap.Save(theFilename,System.Drawing.Imaging.ImageFormat.Jpeg)".但是它可以在本地服务器上工作.

Hi

when i am uploading an image. it showing the error: "bitmap.Save(theFilename, System.Drawing.Imaging.ImageFormat.Jpeg)". But it works in local server. not working in web.

Itz纯粹是因为文件访问/安全问题.您可以通过try .. catch块在.NET框架中使用FileAccessException.

Itz purely becaz of the file access/security issue. You can use FileAccessException using .NET framework through try.. catch block.

try
{
... ur code
}
catch (FileAccessException ex)
{
}