Asp.net MCV4 框架问题 [英] Asp.net MCV4 framework issue
本文介绍了Asp.net MCV4 框架问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我使用 VS 2012 和 MVC4 创建了一个网站,它在我的本地主机上工作,但是当我发布并放置我的主机时它不起作用.IIS 配置是相同的.但它给了我这个错误行:
I made a web site using VS 2012 and MVC4, it is work my localhost but when i published and put my host it doesn't work. IIS confiurations are same. But it gives me this error lines:
这是错误;
Configuration Error
Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.
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 20: </appSettings>
Line 21: <system.web>
Line 22: <compilation targetFramework="4.5" />
Line 23: <httpRuntime targetFramework="4.5" />
Line 24: <authentication mode="Forms">
提前感谢您的建议
推荐答案
将此标签更改为 4.0:
Change this tag to 4.0:
<compilation targetFramework="4.0" />
并删除此标签:
<httpRuntime targetFramework="4.5" />
这篇关于Asp.net MCV4 框架问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文