When my large ASP.NET 4 Web application starts after updating files, it frequently reports what appear to be bogus and random errors. For example, it suddenly complained about an Entity Framework Profiler assembly that had been working fine (and worked fine later – keep reading):Inheritance security rules violated by type: 'HibernatingRhinos.Profiler.Appender.ProfiledDataAccess.ProxiedDataReader'. Derived types must either match the security accessibility of the base type or be less accessible. Source:/WebAuth/finance.aspx When I removed the ‘offending’ assembly and dirtied the web.config file, the site worked again until the next change to an .aspx page. Then, the failure to load was blamed on MVC even though this is not an MVC application:Could not load file or assembly 'System.Web.Mvc, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified. Source:/dashboard.aspx Note that these strange errors are happening on the live site as well as on my development machine. I really suspect that Entity Framework 4 is implicated somehow. The stack trace for both the preceding errors is virtually identical:Stack Trace: at System.Reflection.RuntimeModule.GetTypes(RuntimeModule module) at System.Reflection.RuntimeModule.GetTypes() at System.Reflection.Assembly.GetTypes() at System.Data.Metadata.Edm.ObjectItemConventionAssemblyLoader.LoadTypesFromAssembly() at System.Data.Metadata.Edm.ObjectItemAssemblyLoader.Load() at System.Data.Metadata.Edm.AssemblyCache.LoadAssembly(Assembly assembly, Boolean loadReferencedAssemblies, ObjectItemLoadingSessionData loadingData) at System.Data.Metadata.Edm.AssemblyCache.LoadAssembly(Assembly assembly, Boolean loadReferencedAssemblies, KnownAssembliesSet knownAssemblies, EdmItemCollection edmItemCollection, Action`1 logLoadMessage, Object& loaderCookie, Dictionary`2& typesInLoading, List`1& errors) at
Visual Studio/Silverlight/Tooling version
What category (if any) best represents this feedback?
Steps to reproduce
Product Language
Operating System
Operating System Language
Actual results
Expected results