file/directory permissions when running IIS Express 7.5 / VS2010 sp1 RRS feed

  • Question

  • User-1242214802 posted

    Hi All: I have a project in VS 2010 sp1 that I'm debugging using IIS Express 7.5 (on Windows 7 Pro sp1). Everything works properly until I try to save an uploaded file that overwrites an existing file in the project (a JPG file in this case).

    If I publish the website to an IIS webserver and give the AppPool appropriate permissions, the file is overwritten without a problem, but when I try to do the same thing locally, I receive:

    System.IO.IOException: The process cannot access the file 'C:\Users\me\Documents\Visual Studio 2010\Projects\mysite\mysite\images\52.jpg' because it is being used by another process.

    I'm assuming this is a directory permissions issue? But I can't figure out how to set the permissions in IIS Express to allow "change" as well as "read/write" for this file directory? I tried granting Network Service and IIS_USRS change permissions but it didn't help.

    I went so far as to shut down the Visual Studio project and restart the IIS Express process manually (using the handy IISEMgr app), but I still receive the error...so again I presume it's a permissions error?

    Thursday, August 16, 2012 7:12 PM

All replies

  • User-1242214802 posted

    I also have a related follow-up question...I have a listview with a  "delete" command, and in the "itemdeleted" event I'm deleting an image related to the row being deleted (using System.IO.File.Delete). In testing my code, I deleted about a dozen table rows and the corresponding image files.

    I do not receive a permissions error when deleting the file, but the reference to the image file remains in the solution explorer (with an "X" in the icon), and if I try to publish the project, I receive an error that the file is missing (because I deleted it).

    Is there a way to get VS to update the references to folder contents in Solution Explorer to remove the files that have been deleted? I found that I had to manually select each deleted file and "delete from project".

    Friday, August 17, 2012 10:05 AM
  • User-782232518 posted


    IIS Express and IIS are different things. So your steps to change the ACLs have missed the point.

    Another thing to notice that your second post is regarding a different issue, and the good manner is to always post that as a separate question.

    Friday, October 9, 2015 6:07 AM
  • User-1242214802 posted

    Thanks for your reply to a 3 yr old post, and neither providing a solution nor pointing people to a post that answers the question. And you're criticizing me for poor netiquette? Thanks for nothing Yell

    Friday, October 9, 2015 9:08 AM