locked
Can't save uploaded image to folder and Image doesn't exist when running under iis RRS feed

  • Question

  • User2131089582 posted

    I have project to upload image and view image on asp.net.  everything work as i expected. i can upload image and saved to my folder then saved the folder to database, then from database i can show or view the image.

    Unfortunately, after publishing to IIS and run the web UNDER IIS , image that i uploaded won't saved to folder and also the image that contains on my folder can't be viewed when running web under IIIS.

    I tried to search in stackoverflow how to solve it and everyone said it's about permission i have tried option to set the security permission but nothing works

    security

    my folder to save image

    If you can help i'm really appreciate your help, Thanks

    Tuesday, November 20, 2018 7:57 AM

All replies

  • User-271186128 posted

    Hi  hocamahdi99,

    Unfortunately, after publishing to IIS and run the web UNDER IIS , image that i uploaded won't saved to folder and also the image that contains on my folder can't be viewed when running web under IIIS.

    Do you meet any error? Please check the image folder path and make sure the image path correctly. 

    When you save images to the folder, please try to use the Server.MapPath("~/MyImagesFolder") to get the folder path.

    I tried to search in stackoverflow how to solve it and everyone said it's about permission i have tried option to set the security permission but nothing works

    Besides, whether you are using windows authentication or form authentication? and can you tell up the IIS version?

    Here are some related threads about IIS folder permission, you could refer to them:

    IIS7 folder permissions for web application

    IIS AppPoolIdentity and file system write access permissions

    Best regards,
    Dillion

    Wednesday, November 21, 2018 5:41 AM