Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Asp.net MCV4 framework issue

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:

This is error;

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">

Thank you for your advice in advance

like image 967
nermik Avatar asked Aug 27 '12 14:08

nermik


People also ask

Can I delete Microsoft ASP.NET MVC 4 runtime?

YES. However, you absolutely do NOT want to remove the folder Controllers, because its existence is how ASP.NET MVC works in 99.99% of all apps.

Does ASP.NET work with .NET framework?

ASP.NET Web Forms applications: ASP.NET Web Forms are only available in . NET Framework. ASP.NET Core can't be used for ASP.NET Web Forms.

Which framework is best for ASP.NET MVC?

Angular is the most-popular, most-used and most-discussed JavaScript Framework in context of web applications, and that too ASP.NET MVC applications. Angular was developed by Google and was first released in 2009 under the MIT license. Since inception, it has been used widely for UI-centric web application development.

Is ASP.NET MVC deprecated?

ASP.NET MVC is no longer in active development.


2 Answers

Change this tag to 4.0:

<compilation targetFramework="4.0" />

and remove this tag:

<httpRuntime targetFramework="4.5" />
like image 184
mariom64 Avatar answered Oct 06 '22 01:10

mariom64


I had similar issue installing nopCommerce 2.80 on server. I use IIS7 net. 4.0 integrated pool. And just installed .net 4.5 from WebMatrix Products->Frameworks section. Restart will be required. Then it started to work.

like image 28
ikutsin Avatar answered Oct 06 '22 01:10

ikutsin