Enabling Write Access to A folder in IIS



Issue
Sometimes in web development, we may want to grant WRITE access to a folder probably for file upload purposes or mostly in my own case, PDF file generation purposes. The challenge however, is that all folders are read only which means your application will always throw errors whenever you attempt a write operation.

Solution
  1. Locate the folder in windows explorer
  2. Right click on the folder and select properties
  3. In the securities tab, click edit, then click add in the new dialog box that shows up
  4. Type IIS AppPool\ApplicationPoolName (you need to replace ApplicationPoolName with the name of the application pool in IIS that your web app is running under)
  5. Click Check Names to resolve the name, then click Ok 
  6. Under permissions for ..., check Modify under allow. 
  7. Click Ok on all dialog boxes


Note
Some people will grant Modify or Full Control right to Everyone for the folder, note that this posses a huge security risk and should never be your approach to resolving the issue

Comments

Popular posts from this blog

Resize or Crop Image before Upload Using HTML5 File API

Get Creative With Data Tables: Row Click Events

Exception from HRESULT: 0x80131040