2012-08-27 11 views
11

Hice un sitio web usando VS 2012 y MVC4, es mi trabajo localhost pero cuando publiqué y puse mi host no funcionó. Las confiuraciones de IIS son iguales. Pero me da estas líneas de error:Asp.net MCV4 framework issue

Esto es un 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"> 

Gracias por su consejo de antemano

+1

No soy experto en este tema en particular, pero ¿es esto realmente el error completo? –

+0

He reparado líneas de error. – nermik

+14

¿Está .NET 4.5 instalado en su servidor? – jrummell

Respuesta

5

Usted tiene que actualizar su grupo de aplicaciones a .NET en IIS 4.0. Probablemente esté configurado en 2.0 actualmente.

8

tuve problema similar instalar nopCommerce 2.80 en el servidor. Uso la red IIS7. 4.0 grupo integrado. Y acaba de instalar .net 4.5 desde la sección Productos de WebMatrix-> Frameworks. Se requerirá reiniciar. Luego comenzó a funcionar.

12

Cambiar esta etiqueta a 4,0:

<compilation targetFramework="4.0" /> 

y eliminar la etiqueta:

<httpRuntime targetFramework="4.5" /> 
+0

Acabo de tener el mismo problema y me di cuenta de que 'httpRuntime' era el bloque que estaba bloqueando. –

1

Sólo tiene que actualizar su marco .NET para Ver 4,5 en el servidor IIS 7.5 que hace que el uso de el instalador web de Microsoft hacer una búsqueda de .NET y luego instalar .NET Framework versión 4.5 y todas las aplicaciones que se dirigen a esa versión funcionarán

0

tiene que instalar .NET Framework 4.5, entonces funciona bien. El atributo "targetframework" no es reconocido por .net framework 4.0. Por lo tanto, ejecute el siguiente comando en el símbolo del sistema y compruebe si .net versión 4.5 está instalada en la máquina de hosting o no. Si no es así, instale .NET Framework 4.5.it funcionará correctamente. ejecute este comando en cmd de la siguiente manera.

wmic /namespace:\\root\cimv2 path win32_product where "name like '%%.NET%%'" get version