I have a web site running .net 4.0 and need to run 2 virtual directories under the site that are .net 2.0. I have them separated into their own app pools (main site = App Pool 1, 2 virtual directories = App Pool 2) and the asp.net tab is set properly on main site and the virtual directories.
I see this error when I try to hit the sites in my virtual directories.
Exception type: ConfigurationErrorsException
Exception message: Unrecognized attribute ‘optimizeCompilations’. Note that attribute names are case-sensitive. (D:\\web.config line 92)
I’m running IIS 6.0, server 2003. I know you can do it with multiple virtual directories but it doesn’t seem to work the same with the main site being different than the virtual directories.
Thanks
Robert
I have had this issue in the past when I am trying to run a higher version of the framework in the root and a older version in the VD. In my case it was due to ASP.NET Web.config inheritance. I was able to get around by following the details laid out in this post:
Stopping ASP.NET Web.config Inheritance