0
在我的登台服务器中我安装了.net版本4.5,并开发了我的asp.net mvc web应用程序。无法在asp.net版本4.0上部署我的asp.net MVC web应用程序
现在,当我部署的应用程序的生产对生产它的web.config文件引发的错误: -
parser Error Message: The 'targetFramework' attribute in the <compilation> element of the Web.config file is used only to target version 4.0 and later of the .NET Framework (for example, '<compilation targetFramework="4.0">'). The 'targetFramework' attribute currently references a version that is later than the installed version of the .NET Framework. Specify a valid target version of the .NET Framework, or install the required version of the .NET Framework.
Source Error:
Line 63: </caching>
Line 64: <customErrors mode="RemoteOnly" />
Line 65: <compilation targetFramework="4.5">
Line 66: <assemblies>
Line 67: <add assembly="System.Data.Entity, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
Source File: C:\inetpub\wwwroot\web.config (file:///C:/inetpub/wwwroot/web.config) Line: 65
_____
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.1 So
我检查对生产的.NET版本,它是4.0而不是4.5。
所以现在我会做生产服务器上的以下内容: -
- 我会下载&生产安装.NET版本4.5。
- 重新启动生产服务器过夜。
那么这将解决这个问题,或者我有重新部署我的整个asp.net mvc在IIS上它采取新的.net版本?
是的,只要在部署应用程序时应用程序池设置为使用4.5而不是4.0 – Gjohn
,所以我不想修改我的代码,所以我将在生产环境中安装.nt verison 4.5以使我的代码因为... –
所以在安装4.5版本之后它会工作吗?而不需要重新部署一个东西? –