有关A generic error occurred in GDI+问题

在部署项目到服务器B时遇到一个错误:A generic error occurred in GDI+。此错误通常与GDI+相关,影响图片保存。通过检查堆栈跟踪,发现异常发生在System.Drawing.Image.Save方法中。解决方法是调整目标文件夹的权限,给予所有用户完全控制,以确保程序能够正常运行。执行这些步骤后,程序在服务器B上成功运行。
摘要由CSDN通过智能技术生成

在开发项目的时候遇到这样一个问题:

程序在本机可以运行,然后放到服务器A也可以运行,可是放到服务器B上,就无法运行,报错如下:

A generic error occurred in GDI+.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Runtime.InteropServices.ExternalException: A generic error occurred in GDI+.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below. 
Stack Trace:


[ExternalException (0x80004005): A generic error occurred in GDI+.]
   System.Drawing.Image.Save(String filename, ImageCodecInfo encoder, EncoderParameters encoderParams) +460940
   System.Drawing.Image.Save(String filenam

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值