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

我的梦境 提交于 2019-12-10 18:53:01

问题


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.


回答1:


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.




回答2:


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.




回答3:


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.



来源:https://stackoverflow.com/questions/15565826/what-windows-account-does-an-asp-net-4-application-run-under

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!