Asp.net MCV4 framework issue

后端 未结 7 542
清酒与你
清酒与你 2020-12-09 05:15

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 err

相关标签:
7条回答
  • 2020-12-09 05:54

    You just need to upgrade your .NET framework to ver 4.5 in your IIS 7.5 server you do that using the Microsoft web installer do a search for .NET and then installed the .NET framework version 4.5 and the all the apps that target that version will work

    0 讨论(0)
  • 2020-12-09 05:55

    Chances are IIS doesn't have 4 installed (or if it is the site isn't specified to use it). Assuming you're running IIS7 have a look at this post:

    • How to add ASP.NET 4.0 as Application Pool on IIS 7, Windows 7
    0 讨论(0)
  • 2020-12-09 06:02

    you have to install .net framework 4.5 then it will works fine. "targetframework" attribute is not recognized by .net framework 4.0. So run the following command on command prompt and check either .net version 4.5 in installed on hosting machine or not.if not then install .net framework 4.5.it will work fine. run this command on cmd as follows.

    wmic /namespace:\\root\cimv2 path win32_product where "name like '%%.NET%%'" get version
    
    0 讨论(0)
  • 2020-12-09 06:04

    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.

    0 讨论(0)
  • 2020-12-09 06:06

    Run this: Microsoft .NET Framework Repair Tool

    • Make sure you run in offline mode if you need to run against servers that are firewalled off from the internet.
    0 讨论(0)
  • 2020-12-09 06:07

    Change this tag to 4.0:

    <compilation targetFramework="4.0" />
    

    and remove this tag:

    <httpRuntime targetFramework="4.5" />
    
    0 讨论(0)
提交回复
热议问题