環(huán)境:
Windows2003 Enterprise Edition
IIS6.0+VS2008
問題:
把web項目部署到IIS后,發(fā)現(xiàn)web服務器不能使用
方法:
重新注冊IIS(無效)
把ASP.NET的版本改成2.0(仍然無效)
很明顯,拒絕訪問,十有八九是權限不夠,查看網(wǎng)站目錄,果真如此
發(fā)現(xiàn)WEB目錄沒有權限,加上IIS_WPG組后,IIS正常運行。
關于IIS_WPG(國外網(wǎng)站的描述)
The IIS_WPG group is a user group provided by IIS 6.0. IIS_WPG group membership provides the minimum set of user rights and permissions required to run an application. It provides a convenient way to use a specific user account, which would be a member of IIS_WPG, for the application pool identity without having to manually assign the user rights and permissions to that account. In a case where the user account is not in the IIS_WPG group and it does not have the appropriate permissions, the worker process serving the application pool will fail to start.
Note By default, the IIS_WPG group does not have the right to start CGI processes. If you create a new account and add it to the IIS_WPG group to run as a worker process identity, you still must assign this new account two user rights to start CGI processes. These user rights are Adjust memory quotas for a process and Replace a process level token.
總結:
在windows2003中IIS6中,網(wǎng)站目錄不具備基本的權限,需要我們手動的添加IIS_WPG組;而有很多朋友,直接修改網(wǎng)站的應用程序池的安全帳戶為“本地系統(tǒng)”,來提高權限,此方法不可取。
轉自:http://www.cnblogs.com/wmj/