admin管理员组

文章数量:1122846

I have hosted an aspx Application in IIS version(10.0.19) with the Application Pool Identity configured to a custom user. The credentials of the user in correct. And the application seemed to be working . Until I had introduced a new HttpModule to subscribe to BeginRequest and Error events from the HttpApplication object. Now the App-Pool abruptly stops with the error :

The identity of application pool SampleAppPool is invalid. The user name or password that is specified for the identity may be incorrect, or the user may not have batch logon rights. If the identity is not corrected, the application pool will be disabled when the application pool receives its first request. If batch logon rights are causing the problem, the identity in the IIS configuration store must be changed after rights have been granted before Windows Process Activation Service (WAS) can retry the logon. If the identity remains invalid after the first request for the application pool is processed, the application pool will be disabled. The data field contains the error number.

Does this mean there are different permissions for hosting an Application and subscribing to the ASP.NET HTTP Handling events ?

I have hosted an aspx Application in IIS version(10.0.19) with the Application Pool Identity configured to a custom user. The credentials of the user in correct. And the application seemed to be working . Until I had introduced a new HttpModule to subscribe to BeginRequest and Error events from the HttpApplication object. Now the App-Pool abruptly stops with the error :

The identity of application pool SampleAppPool is invalid. The user name or password that is specified for the identity may be incorrect, or the user may not have batch logon rights. If the identity is not corrected, the application pool will be disabled when the application pool receives its first request. If batch logon rights are causing the problem, the identity in the IIS configuration store must be changed after rights have been granted before Windows Process Activation Service (WAS) can retry the logon. If the identity remains invalid after the first request for the application pool is processed, the application pool will be disabled. The data field contains the error number.

Does this mean there are different permissions for hosting an Application and subscribing to the ASP.NET HTTP Handling events ?

Share Improve this question asked Nov 21, 2024 at 15:33 MorfhineMorfhine 236 bronze badges
Add a comment  | 

1 Answer 1

Reset to default 0

If you set the application pool identity to a custom account,you have to ensure add this user to IIS_USRS group to make it work.

To add a specific user (custom account) to the IIS_USRS group:

  1. Click Start, Administrative Tools, Computer Management.

  2. In the left pane, expand Local Users and Groups.

  3. Select Groups, then double-click IIS_USRS.

  4. Add the custom user that you specified earlier for the process model identity.

  5. Stop and restart the Web services.

More details, please refer to this documention: Event ID 5021 — IIS Application Pool Availability.

本文标签: