Reputation: 33850
What Windows user account does an ASP.NET MVC 4 app run under?
When I deploy my MVC app to IIS 7, it isn't writing exceptions to the log file. I stepped into the source while the application was deployed and found that it didn't have rights/the required privileges to write to the log file.
So, I want to grant more privileges to the account that the app is running under.
Upvotes: 3
Views: 976
Reputation: 5966
Using IIS 8.5?
The ApplicationPoolIdentity is a member of the IIS_IUSRS group. If you need to give the app direct access to the file system set the ACLs for IIS_IUSRS.
However, exposing the file system to the web required very careful consideration.
Upvotes: 1
Reputation: 3043
Go to:
IIS > Application Pools > (right-click) the Application Pool > Advance Settings... > (Under Process Model) Identity.
You can change it if you want. It should be ApplicationPoolIdentity.
Upvotes: 4
Reputation: 5023
That's just depend on what's the path you're going to write. For example, if you're deploying your asp.net website use default "Network Service" account, you should grant the right permission to it.
To get the account you're currently using, you can check the identity of the app pool for your website.
Upvotes: 1