Flying bat in a marquee Flying bat in a marquee Flying bat in a marquee Flying bat in a marquee Flying bat in a marquee Flying bat in a marquee Flying bat in a marquee Flying bat in a marquee Flying bat in a marquee Flying bat in a marquee Flying bat in a marquee Flying bat in a marquee Flying bat in a marquee Flying bat in a marquee Flying bat in a marquee Flying bat in a marquee Flying bat in a marquee Flying bat in a marquee Flying bat in a marquee Flying bat in a marquee Flying bat in a marquee Flying bat in a marquee Flying bat in a marquee Flying bat in a marquee Flying bat in a marquee Flying bat in a marquee

Wednesday, June 3, 2009

Unable to create the virtual directory. Configuring the virtual directory for ASP.NET 2.0 failed - Problem and Solution

When you try to create a virtual directory for a Web Application Project using Web Property page options of Visual Studio 2005, the following error message is displayed if IIS settings are not proper. The actual error message displayed by Visual Studio 2005 is

---------------------------
Microsoft Visual Studio
---------------------------
Unable to create the virtual directory. Configuring the virtual directory for ASP.NET 2.0 failed. You may need to manually configure this site for ASP.NET 2.0 in order for your site to run correctly.
---------------------------
OK
---------------------------

How to fix the problem?

Invalid ASP.NET version settings is the cause for this error message. When ASP.NET version of IIS is not same as the version of Visual Studio, Visual Studio fails to create virtual directories.

For example, if you are using Visual Studio 2005 with an IIS configured with ASP.NET v1.1 is an invalid configuration.

In order to solve the problem follow these simple steps

  1. Go to Start Menu, click on Run (alternatively use Win Key + R )
  2. Type INetMgr and press enter to open Internet Information Services Application
  3. Expand the tree node displaying local computer name and navigate to Web Sites-->Default Web Site
  4. Right click on Default Web Site node and select the popup menu option Properties

  1. Navigate to ASP.NET tab in the properties page and set the version to 2.xxxx(for Visual Studio 2005) or 1.xxxx(for Visual Studio 2003)

  1. After configuring ASP.NET settings in IIS, recreate the virtual directory using the Property page of Visual Studio Web Application. Visual Studio successfully creates the virtual folder.

    Namaste!

No comments:

Post a Comment