Server application unavailable

Source: Internet
Author: User
Tags configuration settings
You can install and run both. NET 1.1 and. NET 2.0 on the same computer. Be careful!

 Does your project occasionally encounter server application unavailable errors? Or this error is reported continuously!

Today, my friend upgraded the project from 1.1 to 2.0 and released it to the company's server with Windows 2003 installed. As a result, the project in 2.0 never runs successfully. It even caused an error in. NET Framework 1.1-based web programs serving the entire company on the server. He felt very strange. He was running very well on his computer. How could he not do it as soon as he got to the server?
The process of releasing the 2.0 web program is as follows:

1. Create a directory on the server and copy the files of all published web programs to the new directory.
2. Create a new virtual directory on the server's IIS and configure it as an application that can execute scripts (the process is the same as that of creating a. NET Framework 1.1 program .) Then, configure the. NET Framework of this virtual directory to 2.0.
After success, the following error occurs when you access the configured program:

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.

Administrator note:An error message detailing the cause of this specific request failure can be found in the application event log of the Web server. Please review this log entry to discover what caused this error to occur.

Then I asked for help. After carefully reading the IIS Help documentation, I found that this error was caused by the IIS6 application isolation mechanism. The default application isolation mechanism of IIS is called:"Working Process Isolation Mode"In this mode, applications are divided into multiple groups, each group is an "Application pool", and each application pool is isolated from each other. The benefits of isolation are security, stability, and so on. Each application pool in IIS is managed by a "worker process", that is, "w3wp.exe ". If you run multiple applications in the application pool, we can see multiple w3wp.exe. The created virtual directories are directed to the "ultultapppool" in iis6.

The cause of the above error is :.. NET Framework 2.0 program and. net framework1.1 (or 1.0) programs are put into the same application pool (ultapppool pool by default), that is, managed by the same worker process: w3wp.exe, however, a single working process cannot manage different programs (or different versions of programs) at the same time. If you first access. net Framework 1.1 page, the worker first loads and manages the assembly of Version 1.1. net Framework 2.0 web application page, the server application unavailable error is returned. In contrast, if w3wp.exe in the development application pool has accessed the 2.0 web application before it is started (the application assembly has been loaded at this time. net Framework 1.1 web assembly). When you access the Web application page of 1.0 or, a Chinese prompt such as "server application unavailable" will also appear. (You can use w3wp.exe to test .)

My friend didn't see this error on his development machine because he was developing based on. net Framework 2.0 project, always only access this 2.0 web program, and this has never accessed other web programs. There are already 1.0 projects on a friend's server, and they have been used all the time. This error has never been encountered before. In fact, most people only access the project being developed when developing a project. It is very likely that this problem has been ignored, but an error occurred during the release, making it messy.

Solution: Create an application pool in IIS and select your application pool. net framework2.0 virtual directory, click "properties"-> select the application pool you just created in "application pool", and click "OK ".

If your computer is mainly used to learn, develop, and test web programs, you can create an application pool similar to "dotnet2.0, all new 2.0 virtual directories will point to this application pool.

[Updated on February 16, 2005]: If you directly create a web site on IIS by using vs 2005ide, ASP is automatically added to. NET 2.0 application pool, and point the newly created web size virtual directory to the newly created application pool.

 

 

How to create an application pool
How to Create application pools
Important this feature of IIS 6.0 is available only when running in worker process Isolation Mode.

With IIS 6.0 running in worker process isolation mode, you can group web applications into application pools. application pools allow specific configuration settings to be applied to groups of applications, and the worker processes servicing those applications. any web directory or virtual directory can be assigned to an application pool.

By creating new application pools and assigning web sites and applications to them, you can make your server more efficient and reliable, and your other applications always available, even when the applications in the new application pool terminate.

Important you must be a member of the Administrators group on the local computer to perform the following procedure (or procedures), or you must have been delegated the appropriate authority. as a security best practice, log on to your computer using an account that is not in the Administrators group, and then use the run as command to run IIS manager as an administrator. from the command prompt, type RunAs/User: administrative_accountname "MMC % SystemRoot % \ system32 \ inetsrv \ IIS. MSC ".

To create a new application pool

In IIS manager, expand the local computer, right-click application pools, point to new, and then click application pool.
In the application pool ID box, type the name of the new application pool.
Under application pool settings, click either use default settings for new application pool or use existing application pool as template.
If you selected use existing application pool as template, from the application pool name list box, click the application pool to be used as a template.
Click OK.

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.