91

I am using windows authentication without impersonation on my company's intranet website with IIS7.

Under IIS7, what account is used to access the folder which contains my web app using these settings?

Would it be IIS_IUSRS? Or NETWORK SERVICE? Or another I don't know about?

Andrew
  • 10,088
  • 14
  • 48
  • 62
  • Possible duplicate of [IIS AppPoolIdentity and file system write access permissions](https://stackoverflow.com/questions/5437723/iis-apppoolidentity-and-file-system-write-access-permissions) – KyleMit Oct 24 '17 at 18:44

6 Answers6

131

In IIS 7 (not IIS 7.5), sites access files and folders based on the account set on the application pool for the site. By default, in IIS7, this account is NETWORK SERVICE.

Specify an Identity for an Application Pool (IIS 7)

In IIS 7.5 (Windows 2008 R2 and Windows 7), the application pools run under the ApplicationPoolIdentity which is created when the application pool starts. If you want to set ACLS for this account, you need to choose IIS AppPool\ApplicationPoolName instead of NT Authority\Network Service.

Thomas
  • 61,164
  • 11
  • 91
  • 136
  • 35
    Note that it's not literally `IIS AppPool\ApplicationPoolName` , but `IIS AppPool\`. – Jeff S Dec 09 '12 at 07:44
  • 21
    In IIS 7.5, the default Identity for an Application Pool is ApplicationPoolIdentity. ApplicationPoolIdentity represents a Windows user account called "IIS APPPOOL\AppPoolName", which is created when the Application Pool is created, where AppPoolName is the name of the Application Pool. The "IIS APPPOOL\\[AppPoolName]" user is by default a member of the IIS_IUSRS group. So you need to grant write access to the IIS_IUSRS group – Be.St. Feb 15 '13 at 16:15
  • People on more recent versions of Windows may find this article useful for configuring 'AppPool\DefaultAppPool' account if they have a similar problem: http://www.iis.net/learn/manage/configuring-security/application-pool-identities. This also helps avoid the error which I got after updating from Windows 8 to 8.1, where is says: "An error occurred loading a configuration file: Failed to start monitoring changes to [full file path] because access is denied.". – Matty J Apr 16 '14 at 05:49
  • I have gave full permission to the Application Pool .. but still getting the denied access. – Yousi Oct 09 '14 at 12:41
26

http://forums.iis.net/t/1187650.aspx has the answer. Setting the iis authentication to appliction pool identity will resolve this.

In IIS Authentication, Anonymous Authentication was set to "Specific User". When I changed it to Application Pool, I can access the site.

To set, click on your website in IIS and double-click "Authentication". Right-click on "Anonymous Authentication" and click "Edit..." option. Switch from "Specific User" to "Application pool identity". Now you should be able to set file and folder permissions using the IIS AppPool\{Your App Pool Name}.

David
  • 812
  • 1
  • 10
  • 26
Nat
  • 269
  • 3
  • 2
  • 3
    This helped tremendously. If you do not change the Anonymous Authentication from "Specific User" to "Application pool identity" your permission changes will not reflect when setting the IIS AppPool\{Your App Pool Name} permissions. – David Nov 23 '15 at 13:40
  • OH MY GOD. No one seems to pickup on this. This just solved hours of digging. – Joe Swindell Mar 29 '17 at 12:26
  • +1 for teaching me how to fish. Finding out what user IIS uses is more valuable than stating what the user currently is in a specific version of IIS. – Remi Despres-Smyth Mar 03 '21 at 18:01
19

Running IIS 7.5, I had luck adding permissions for the local computer user IUSR. The app pool user didn't work.

Kenny Evitt
  • 8,023
  • 5
  • 59
  • 84
18

If it's any help to anyone, give permission to "IIS_IUSRS" group.

Note that if you can't find "IIS_IUSRS", try prepending it with your server's name, like "MySexyServer\IIS_IUSRS".

Pierre Arlaud
  • 3,644
  • 3
  • 26
  • 38
JohnnyFun
  • 3,068
  • 2
  • 15
  • 15
3

Worked for me in 30 seconds, short and sweet:

  1. In IIS Manager (run inetmgr)
  2. Go to ApplicationPool -> Advanced Settings
  3. Set ApplicationPoolIdentity to NetworkService
  4. Go to the file, right click properties, go to security, click edit, click add, enter Network Service (with space, then click 'check names'), and give full control (or just whatever permissions you need)
Jason Hitchings
  • 578
  • 6
  • 9
1
  1. Working on IIS 7.5 and Windows 7 i couldnt give permission APPPOOL/Mypool
  2. IUSR and IIS_IUSRS permissions not working for me
  3. I got to problem this way:

    -Created console application with C#
    -This appliaction using createeventsource like this

    if(!System.Diagnostics.EventLog.SourceExists(sourceName)) System.Diagnostics.EventLog.CreateEventSource(sourceName,logName);

    -Build solution and get .exe file

    -Run exe as administator.This create log file.

NOTE: Dont remember Event viewer must be refresh for see the log.

I hope this solution helps someone :)