简体   繁体   中英

What Windows account does an ASP.NET 4 application run under?

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.

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.

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.

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM