Does your. NET 2.0 really work with 1.1 safely on the same computer? Beware of server application unavailable error __.net

Source: Internet
Author: User
everyone installs and runs. NET 1.1 and. NET 2.0 two friends on the same computer be careful.

  does your project occasionally have a Server application unavailable error? Or always make this mistake continuously!

Today, my friend. The project, upgraded from 1.1 to 2.0, is published to a server where the company has Windows 2003 installed, and the results of 2.0 are never successfully run. It even caused an error in the. NET Framework 1.1-based Web program that is being serviced on the server for the entire company. He felt very strange, on his computer clearly running a good ah, how to a server on the die.
His process for publishing 2.0 Web programs is as follows:

1, create a directory on the server, and then copy all the published Web program files to this new directory.
2, create a new virtual directory on the server's IIS and configure it as a script-capable application (the procedure is the same as the program that created the. NET Framework version 1.1). Then, configure the. NET Framework for this virtual directory to 2.0.
When you're done, you start accessing the program you just configured, and you get the following error:

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 is found in the application event log of the Web Server. Please review this log entry to discover what caused this error to occur.

After asking me for help, after reading the IIS Help document, I found that the error was caused by the IIS6 application isolation mechanism. The IIS default application isolation mechanism is called:"Worker process isolation mode"In this mode, the application is divided into groups, each group is an "application pool", and each application pool is isolated from each other. The benefits of isolation are, of course, safe, stable, and so on. Each application pool in IIS is managed separately by a "worker process", i.e. "W3wp.exe". If you have programs running in multiple application pools, we can see multiple w3wp.exe. Our new virtual directories are all by default directed to IIS6 's "DefaultAppPool", so by default, no matter how many asp.net programs you run, you can see only one w3wp.exe process in Windows Task Manager.

The reason for this error is that the. NET Framework 2.0 program is placed in the same application pool as the. NET Framework1.1 (or 1.0) program (by default into the DefaultAppPool pool), that is, by the same worker process: W3wp.exe is managed, and a single worker process cannot manage different programs (or different versions of programs) at the same time. If you first access a page of the. NET Framework 1.1, the worker process loads and manages the 1.1 version of the assembly, and then accesses the Web Program page of the. NET Framework 2.0, and the Server application unavailable error comes out. Conversely, if you access the Web program for 2.0 before the w3wp.exe of the default application pool has been started (when the application set has already loaded the. NET framework2.0 Web assembly), and then access the 1.1 or 1.0 Web Program page, the same will also occur. "The server application is not available" such as Chinese prompts. (You can end up with the previous w3wp.exe for testing.) )

My friend did not make this mistake on his development machine because when he was developing a project based on the. NET Framework 2.0, he had been accessing only this 2.0 Web program, and had never visited another Web program. The friend's server already has 1.0 of the project, and has been used by someone. This error has never been encountered before today, in fact, most people in the development of a project, only access to the project under development. It is possible to ignore this problem, and when the release of the time there are errors, make a fuss.

Workaround: Create a new application pool in IIS, and then select your virtual directory based on. NET framework2.0, point "Properties", select the newly created application pool in the application pool and click OK.

If your computer is primarily for learning, developing, and testing Web applications, you can build an application pool similar to the one called "dotnet2.0", and all of the new 2.0 virtual directories later point to this application pool.

    [2006-03-16 UPDATE]: If you create a Web site on IIS directly, VS 2005 automatically adds the ASP.net 2.0 application pool and points the newly created Web Size virtual directory to the new application pool.

Related Article

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.