IIS - Configuration Error problem in iis7 - Asked By gopal krish on 06-Feb-12 01:13 AM

hi..
i configured two asp.net application and one is having 4.0 frame work and another one is 2.0 frame work.

now i created new web site in iis7 and i selected .net4.0 project after that i created virtual directory for 2.0 application inside the 4.0 application.

when i try to access my 2.0 application i received configuration error.


Configuration Error

Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately. 

Parser Error Message: Unrecognized attribute 'targetFramework'. Note that attribute names are case-sensitive.

 Source Error: 

Line 14: 
Line 15:   <system.web>
Line 16:     <compilation debug="false" targetFramework="4.0" />
Line 17: 
Line 18:     <authentication mode="Forms">

Source File: E:\websites\cr4\web.config    Line: 16 


Version Information: Microsoft .NET Framework Version:2.0.50727.4963; ASP.NET Version:2.0.50727.4971 



but when i access my 4.0 application it is working fine but when i try to access my 2.0 application it takes my 4.0 application frame config file.

so how to hanlde this issue..
need ur suggetsions.

regards
gopal.s
Web Star replied to gopal krish on 06-Feb-12 01:19 AM
If you creating application with 4.0 framework than you must specify tragret framework to 4.0 in setting for that application

Try to check the properties on the website for ASP.NET 4.0 like so:
In IIS >  Right click on WebSite > Properties > ASP.NET > Version > "Should read 4.0.21006" not 2.0

if you are developing with 2.0 framework than only set target framework to 2.0
gopal krish replied to Web Star on 06-Feb-12 01:27 AM
hi..

i set two application pool for my 4.0 and 2.0 application which is having versions as .4.0 and 2.0.

but it point 4.0 web.config file if i called my 2.0 application.
note:
my 2.0 application is residing in my 4.0 application as virtual directory.

regards
gopal.s
dipa ahuja replied to gopal krish on 06-Feb-12 02:15 AM
Web Star replied to gopal krish on 06-Feb-12 06:13 AM
No one application should specify with one pool in IIS and there must be set correct vertion of .net framework which it needed.