升级到ASP.NET MVC 5和NET 4.5.1后,旧的ASPX页面不起作用

时间:2014-01-28 22:40:18

标签: webforms asp.net-mvc-5 .net-4.5

我有ASP.NET Web应用程序,它结合了MVC4和WebForms以及.NET 4.5.0。我已升级到MVC5和.NET 4.5.1。

ASPX页面停止工作(错误500)。

FileLoadException
    TargetSite = Void GetTypeByName(System.String, Boolean, Boolean, Boolean, System.Runtime.CompilerServices.StackCrawlMarkHandle, IntPtr, Boolean, System.Runtime.CompilerServices.ObjectHandleOnStack)
    Source = mscorlib
    StackTrace =    at System.RuntimeTypeHandle.GetTypeByName(String name, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMarkHandle stackMark, IntPtr pPrivHostBinder, Boolean loadTypeFromPartialName, ObjectHandleOnStack type)
       at System.RuntimeTypeHandle.GetTypeByName(String name, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean loadTypeFromPartialName)
       at System.Type.GetType(String typeName, Boolean throwOnError, Boolean ignoreCase)
       at System.Web.Compilation.BuildManager.GetType(String typeName, Boolean throwOnError, Boolean ignoreCase)
       at System.Web.Configuration.ConfigUtil.GetType(String typeName, String propertyName, ConfigurationElement configElement, XmlNode node, Boolean checkAptcaBit, Boolean ignoreCase)


Is there something different in ASP.NET MVC 5 with old ASPX WebForms pages?

修改

我无法解决此问题,我已将所有更改恢复为MVC4和.NET 4.5.0。

1 个答案:

答案 0 :(得分:0)

这可能会让你走向正确的方向: http://www.asp.net/mvc/tutorials/mvc-5/how-to-upgrade-an-aspnet-mvc-4-and-web-api-project-to-aspnet-mvc-5-and-web-api-2

OR

如果您在某处上传文件并且正在使用FileStream,请确保在尝试使用OleDb之前正确关闭流...如果您不关闭流,则文件将保持锁定状态。