0

im faceing an error CS0234: The type or namespace name 'Mvc' does not exist in the namespace 'System.Web' (are you missing an assembly reference?) when i Remove below section from child web.config

<compilation debug="true" strict="true" explicit="true"  targetFramework="4.0" />

can some one plz help on this

Guffa
  • 687,336
  • 108
  • 737
  • 1,005
  • Why did you remove it? Is it any of it that conflicts with another config? – Guffa Jun 02 '14 at 08:59
  • i have follwed the steps given in this http://stackoverflow.com/questions/3314469/asp-net-4-0-how-do-i-fix-the-compilerversion-iis-error/23989618#23989618 in my case, I was trying to run a child application using 4.0, but the parent application needed to still use 2.0. Wrapping the compilers information in the parent web.config with a please help me – user3698502 Jun 02 '14 at 09:02
  • If they run as a single applicaton or in the same application pool, they need to use the same framework. To use separate framworks the child site has to run as a separate application in a different application pool. – Guffa Jun 02 '14 at 09:07
  • i am using two different application pools for parent and child – user3698502 Jun 02 '14 at 09:10
  • Removing the framework version from the config will make IIS determine the version from the application pool and other settings in the config. Apparently this makes it choose a different version. The reason for the error message may be that MVC is not installed for that framework version, or not correctly registered for that framework version in IIS. Anyhow, removing the setting from the config doesn't seem like the right thing to do if you actually want to use framework 4. – Guffa Jun 02 '14 at 09:52

0 Answers0