Article ID: 2023222 - View products that this article applies to.
If you use Visual Studio 2010 to create an ASP.NET 2.0 web application as a sub-web underneath an a web application that is targeting ASP.NET 4, your ASP.NET 2.0 application will not run. If you attempt to view the sub-web in your browser, it will show the following error:
In ASP.NET, by default a web application will inherit the configuration settings of its parent. In the case of an ASP.NET 2.0 web application that inherits from an ASP.NET 4 web application, the web.config section “<compilation debug="false" targetFramework="4.0" />
You can choose to have child applications not inherit the targetFramework attribute by placing the following inside of your parent application:
<location path="" inheritInChildApplications="false" >
Note that this will affect other applications that you expect to inherit these compilation settings.
Alterntiavely, you can:
(http://go.microsoft.com/fwlink/?LinkId=151500)for other considerations.
Contact us for more help
Connect with Answer Desk for expert help.