jump to navigation

Deploying .NET 4.0 Application on IIS 6.0 November 21, 2010

Posted by Bilal in Programming, Web.
Tags: , , , , , , , ,
trackback

I had my ASP.NET 2.0 application hosted on Windows 2003 Sever with IIS 6.0. After Visual Studio 2010 or more precisely after .NET Framework 4.0, I upgraded the desktop modules to 4.0 (version 3.0 and 3.5 are superset, not the framework). The transition of desktop application from 2.0 to 4.0 was smooth enough. Although there were some deep level changes required in some scenarios (minor ones) but overall it was simple. The application executed properly in the first attempt.

I updated the Web Modules also but did not deploy them (in production environment only). Recently, it was planned to deploy the upgraded module. I installed the framework 4.0 on the web server and using the existing Publish settings, I published the upgraded application on the server (test server, not making experiments on the production server). On browsing the page, I got a 404 Page not found error. It was really a wired and unexpected situation. I have read about the issue of upgrading from IIS 6.0 to IIS 7.0 specially related to web.config but this transition error was totally not expected.

After a lot of search and attempts, I was able to execute the application. Below are the minimum steps required for it:

  1. In IIS 6 console, right click you project and click the properties and check the ASP.Net tab whether Framework 4 is selected or not. If not select the framework 4.
  2. In IIS 6 single application pool can’t be used for two different frameworks. Add a new pool with any meaningful name. Application Pools is above the Default
    Website node in the main tree hierarchy. (IIS 7 supports)
  3. To assign the application pool, in IIS console open the properties section of the web application, and click on the Home Directory tab and select newly created application pool from the drop-down-list.

Basically Page not found issue is cause of other problem which is set hidden by IIS6. But you need to see the real cause.

  1. For this open IIS6 console and in the main hierarchy, select Web Service Extension node which is right below the Default Website node. You will see the entire ASP.Net framework list over there, by default these frameworks might be set to Prohibited so select ASP.Net Framework 4 and click Allow button.

Browse you website now and it should be working.

If you are having some other errors, check the source link.

Advertisements

Comments»

1. Twitted by bhaider7 - November 21, 2010

[…] This post was Twitted by bhaider7 […]

2. Vinod - February 24, 2011

Thanks it worked… but have problem with publishing the application I get following error message:

Error details:
Remote agent (MSDEPLOYAGENTSERVICE) could not be contacted. Make sure the remote agent service is installed and started on the target computer.
An unsupported response was received. The response header ‘MSDeploy.Response’ was ” but ‘v1’ was expected.The remote server returned an error: (404) Not Found. 0 0 TomTestApplication

3. Sudha Vijayakumar - August 28, 2012

Wonderful 🙂 solved my problem

4. Tip de Programación: Como implementar proyectos .Net con Framework 4 en IIS 6 » www.andysoft.cl - January 11, 2013

[…] Link: https://techblogs.wordpress.com/2010/11/21/deploying-net-4-0-application-on-iis-6-0/ […]

5. rajesh123 - April 3, 2013

Great this solved my problem


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: