zoukankan      html  css  js  c++  java
  • compilation targetFrameworkMoniker=".NETFramework,Version=v4.0

    把应用程序升级至.NET Framework 4.0之后,出现一个问题,即是Web.config文件中的Compilation 节点配置不正确。
    需要在Compilation 添加一个属性targetFrameworkMoniker,另外,还要把这个节点内的属性有包含3.5的删除。最终结果: <compilation debug="false" targetFrameworkMoniker=".NETFramework,Version=v4.0"> 

    Server Error in '/' Application.


    The application domain or application pool is currently running version 4.0 or later of the .NET Framework. This can occur if IIS settings have been set to 4.0 or later for this Web application, or if you are using version 4.0 or later of the ASP.NET Web Development Server. The <compilation> element in the Web.config file for this Web application does not contain the required 'targetFrameworkMoniker' attribute for this version of the .NET Framework (for example, '<compilation targetFrameworkMoniker=".NETFramework,Version=v4.0">'). Update the Web.config file with this attribute, or configure the Web application to use a different version of the .NET Framework.

    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

    Exception Details: System.Configuration.ConfigurationErrorsException: The application domain or application pool is currently running version 4.0 or later of the .NET Framework. This can occur if IIS settings have been set to 4.0 or later for this Web application, or if you are using version 4.0 or later of the ASP.NET Web Development Server. The <compilation> element in the Web.config file for this Web application does not contain the required 'targetFrameworkMoniker' attribute for this version of the .NET Framework (for example, '<compilation targetFrameworkMoniker=".NETFramework,Version=v4.0">'). Update the Web.config file with this attribute, or configure the Web application to use a different version of the .NET Framework.

    Source Error:

    An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.


    Stack Trace:

    [ConfigurationErrorsException: The application domain or application pool is currently running version 4.0 or later of the .NET Framework. This can occur if IIS settings have been set to 4.0 or later for this Web application, or if you are using version 4.0 or later of the ASP.NET Web Development Server. The <compilation> element in the Web.config file for this Web application does not contain the required 'targetFrameworkMoniker' attribute for this version of the .NET Framework (for example, '<compilation targetFrameworkMoniker=".NETFramework,Version=v4.0">'). Update the Web.config file with this attribute, or configure the Web application to use a different version of the .NET Framework.]
            System.Web.Compilation.MultiTargetingUtil.InitializeTargetFrameworkNameFor20Or35() +3027367
            System.Web.Compilation.MultiTargetingUtil.InitializeTargetFrameworkName() +101
            System.Web.Compilation.MultiTargetingUtil.EnsureFrameworkNamesInitialized() +95
            System.Web.Compilation.BuildManager.Initialize() +192
            System.Web.Compilation.BuildManager.InitializeBuildManager() +246
            System.Web.HttpRuntime.HostingInit(HostingEnvironmentFlags hostingFlags, PolicyLevel policyLevel, Exception appDomainCreationException) +484
            [HttpException (0x80004005): The application domain or application pool is currently running version 4.0 or later of the .NET Framework. This can occur if IIS settings have been set to 4.0 or later for this Web application, or if you are using version 4.0 or later of the ASP.NET Web Development Server. The <compilation> element in the Web.config file for this Web application does not contain the required 'targetFrameworkMoniker' attribute for this version of the .NET Framework (for example, '<compilation targetFrameworkMoniker=".NETFramework,Version=v4.0">'). Update the Web.config file with this attribute, or configure the Web application to use a different version of the .NET Framework.]
            System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +9597080
            System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +91
            System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +324
            

     


    Version Information: Microsoft .NET Framework Version:4.0.20506; ASP.NET Version:4.0.20506.1

  • 相关阅读:
    2020-2021-1 20209323 《linux内核原理与分析》第十二周作业
    2020-2021-1 20209323《Linux内核原理与分析》第九周作业
    2020-2021-1 20209323 《Linux内核原理与分析》 第八周作业
    2020-2021-1 20209323《Linux内核原理与分析》第七周作业
    2020-2021-1 20209323《Linux内核原理与分析》第六周作业
    2020-2021-1 20209323《Linux内核原理与分析》第五周作业
    2020-2021-1 20209323《Linux内核原理与分析》第四周作业
    2020-2021-1 20209323 《linux内核原理与分析》第三周作业
    2020-2021-1 20209323 《linux内核原理与分析》第二周作业
    软工实践个人总结
  • 原文地址:https://www.cnblogs.com/insus/p/1559239.html
Copyright © 2011-2022 走看看