Reputation: 51
Can ASP.Net 4.0 and ASP.Net 2.0/3.0/3.5 coexist under the SAME WEBSITE/WEB PROJECT? I'm not asking if they can coexist on the same server, which I know they can.
The base site is ASP.Net 2.0. I know we can set up ASP.Net 3.5 application under the same site as a sub application since they are using the same CLR. Wondering if we can do the same by putting ASP.Net 4.0 project/application as a Sub App/Virtual Directory under the ASP.Net 2.0 root site (so the sub app will have their own application pool, eg, under CLR 2.0, CLR 4.0 etc).
Many thanks in advance.
Upvotes: 5
Views: 2176
Reputation: 3213
Yes it will work, the only thing you would need to modify your web.config in the parent directory and add attribute inheritInChildApplications="false".
<location path="." inheritInChildApplications="false">
<system.web>
...
</system.web>
</location>
Upvotes: 5