After Microsoft Visual Studio. NET or Microsoft. NET Framework is installed on the domain controller or backup domain controller, if you try to run an ASP. NET application Program , The browser will display the following error message:
Server application unavailable
The Web application you are attempting to access on this web server is currently unavailable.
Please hit the "refresh" button in your web browser to retry your request.
In addition, the system application event log records the following events:
Aspnet_wp.exe cocould not be launched because the username and/or password supplied in the processmodel section of the config file are invalid.
Aspnet_wp.exe cocould not be started.
Hresult for the failure: 80004005
This issue involves Internet Information Service (IIS) version 5.0 or later.
<Reason>
By default, ASP. NET uses a weak account (the local computer account named ASPnet) to run its auxiliary processes to provide a safer environment. All user accounts on the domain controller or backup domain controller are domain accounts, not local computer accounts. Because of this, aspnet_wp.exe cannot be started because it cannot find a local account named "localmachinename \ ASPnet. To provide a valid user account on the domain controller, you must specify an explicit account in the <processmodel> section of the machine. config file or use the system account.
Note: If you try debugging before you try to browse the page (click the start button), the problem will be identical.
<Solution>
To solve this problem, use one of the following methods:
Create a weak account with the correct permissions and use the account in the <processmodel> section of the machine. config file.
In the <processmodel> section of the machine. config file, set the username attribute to system.
The <processmodel> section of the machine. config file uses the administrator account.
NOTE: If ASP. NET applications are allowed to run as system or administrator accounts, serious security problems may occur. If any work und is used Code You can access the domain controller and domain settings. Executable files started from the aspnet_wp.exe process run in the same context, and they can also access the domain controller.
Therefore, Microsoft recommends the first work und. To use the first work und, perform the following steps:
1. Create a user account named aspuser on the computer and add the account to "user group.
Note: If you have changed the password of the ASPNET account created by the. NET Framework, you can also use this account. You must know the password of this account, because you need to add the password to the <processmodel> section in the subsequent steps.
2. Grant The "Log on as a batch job" user permission to the aspuser or ASPNET account. Make sure that this change is displayed in "Local Security Policy" settings.
Note: To grant this account the "Log on as a batch job" user permission, you must authorize this user permission in each of the following security policies (starting with "Control Panel"/"Administrative Tools ):
Domain Controller Security Policy
Domain Security Policy
Local Security Policy
Note: You must restart the server to make these changes take effect.
3. Make sure that the aspuser or ASPNET account has the permission to access all directories and files necessary to start the aspnet_wp.exe process and provide services for ASP. NET pages.
4. Open the machine. config file. The file path is % SystemRoot % \ Microsoft. NET \ framework \ v1.0.3705 \ config.
5. In the <processmodel> section of the machine. config file, change the username and password attributes to the account name and password created in step 1. Example: username = "domainname \ aspuser" Password = "aspuserpassword"
6. Save the changes made to the machine. config file.
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.