3

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.

3 Answers 3

4

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.

Sign up to request clarification or add additional context in comments.

2 Comments

Thank you. I checked and it read ApplicationPoolIdentity for the value of the Identity property. However, when I try to give this account FullControl permission on my project's root folder, I cannot find this account name in the Windows active directory.
Give the appropriate rights to the Network Service account. Good luck.
1

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.

Comments

1

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.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.