.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
 
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
david stephan

Home >> Articles >> ASP.NET >> Post New Resource Bookmark and Share   

 Subscribe to Articles

Configuring ASP.NET website with IIS

Posted By:Mohammad Elsheimy       Posted Date: January 30, 2011    Points: 75    Category: ASP.NET    URL: http://www.dotnetspark.com  

The problem arises when you install IIS after installing ASP.NET. Configuring ASP.NET website with IIS. If you do this, IIS will configure itself for the ASP.NET version that ships with your Windows edition that might be an older version (e.g. version 2.0) and you won't be able to run any web application built using a later version of ASP.NET.
 

This article is available in my blog

Problem


The problem arises when you install IIS after installing ASP.NET. If you do this, IIS will configure itself for the ASP.NET version that ships with your Windows edition that might be an older version (e.g. version 2.0) and you won't be able to run any web application built using a later version of ASP.NET.

Solution


The solution is simply to reconfigure ASP.NET for IIS. You don't need to reinstall ASP.NET or the .NET Framework; you just need to reapply ASP.NET configuration to the IIS.

When you open the IIS Manager, you can check Application Pools and see which version of ASP.NET is currently configured. Here, we have IIS installed after ASP.NET, so the IIS is configured for version 2.0 (as you can see in figure 1.)

Figure 1 - IIS Application Pools Configuration - .NET 2.0

To solve this, we'll get help from the aspnet_regiis.exe tool that will reconfigure IIS to the version of ASP.NET you choose. This tool is located in %windir%\Microsoft.NET\Framework\v (replace with the version of .NET Framework you like to use.)

Let's get this done. Open the Command Prompt in administrative mode (Start->Cmd->Ctrl+Shift+Enter) and go to the .NET Framework directory mentioned before.

Now, run the ASP.NET IIS Registration tool using the following command:

aspnet_regiis.exe -i

When the tool finishes its job, you'll get a message inform you that everything was completed successfully.

Now go to IIS Manager again and check the Application Pools. You can now find that IIS is configured for ASP.NET 4.0 which is installed on that machine (see figure 2.)

Figure 2 - IIS Application Pools Configuration - .NET 4.0

Enjoy your day!
 Subscribe to Articles

     

Further Readings:

Responses

No response found. Be the first to respond this post

Post Comment

You must Sign In To post reply
Find More Articles on C#, ASP.Net, Vb.Net, SQL Server and more Here

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend