A generic error occurred in GDI+, JPEG Image to MemoryStream

前端 未结 30 1492
再見小時候
再見小時候 2020-11-22 06:47

This seems to be a bit of an infamous error all over the web. So much so that I have been unable to find an answer to my problem as my scenario doesn\'t fit. An exception ge

30条回答
  •  长发绾君心
    2020-11-22 07:08

    One other cause of this error and that solve my problème is that your application doesn't have a write permission on some directory.

    so to complete the answer of savindra : https://stackoverflow.com/a/7426516/6444829.

    Here is how you Grant File Access to IIS_IUSERS

    To provide access to an ASP.NET application, you must grant access to the IIs_IUSERS.

    To grant read, write, and modify permissions to a specific File or Folder

    1. In Windows Explorer, locate and select the required file.

    2. Right click the file, and then click Properties.

    3. In the Properties dialog box, click the Security tab.

    4. On the Security tab, examine the list of users. (If your application is running as a Network Service, add the network service account in the list and grant it the permission.

    5. In the Properties dialog box, click IIs_IUSERS, and in the Permissions for NETWORK SERVICE section, select the Read, Write, and Modify permissions.

    6. Click Apply, and then click OK.

    this worked for me in my IIS of windows server 2016 and local IIS windows 10.

提交回复
热议问题