MVC 4 app is not working properly on Windows 10?

0

My laptop was switched from Windows 7 to Windows 10 and Im doing MVC 4 development on it with VS 2012 Profesional. The problem is the after reinstallation the application in not stable on local machine. The problem are:

Behavior 1) while opening project in VS 2012 profesional error apears:

ASP.NET 4.0has been not registred on the Web server. You need to manuallyconfigure your Web Server for ASP.NET 4.0 in order to your site work correctly

I tried aspnet_regiis -i but it gives

C:\WINDOWS\system32>aspnet_regiis -i Microsoft (R) ASP.NET RegIIS w wersji 4.0.30319.0 Administracyjny program narzędziowy do instalowania i odinstalowywania platformy ASP.NET na komputerze lokalnym. Copyright (C) Microsoft Corporation. Wszelkie prawa zastrzeżone. Rozpoczęto instalowanie platformy ASP.NET (4.0.30319.0). Ta opcja jest nieobsługiwana w tej wersji systemu operacyjnego. Administratorzy powinni zainstalować/odinstalować program ASP.NET 4.5 z usługami IIS 8, używając okna dialogowego Włącz lub wyłącz funkcje systemu Windows, narzędzia do zarządzania Menedżer serwera albo narzędzia wiersza polecenia dism.exe. Aby uzyskać więcej szczegółowych informacji, zobacz http://go.microsoft.com/fwlink/?LinkID=216771. Zakończono instalowanie platformy ASP.NET (4.0.30319.0).

So I installed ASP.NET 4.5 but still error appears ..

Behavior 2) Application compiles properly and runs in debug mode but:) .... images are not displayed. When I try to open one image directly like this http://localhost:30246/Content/images/logo.svg error appears:

Error Code: 0x800700b7

Description (transalted from polish):

Cannot add duplicate entry for collection with type mimeMap” with unique key value „fileExtension” set to „.json”

Code:

  112:     <staticContent>
  113:       <mimeMap fileExtension=".json" mimeType="application/json" />
  114:     </staticContent>
c#
asp.net-mvc-4
visual-studio-2012
windows-10
asked on Stack Overflow Aug 27, 2015 by P.K. • edited Aug 27, 2015 by P.K.

1 Answer

0

My fix:)

I go to IIExpress configuration file C:\Users\XXX\Documents\IISExpress\configapplicationhost.xml and commented out JSON entry:

        <mimeMap fileExtension=".js" mimeType="application/javascript" />
     <!--   <mimeMap fileExtension=".json" mimeType="application/json" /> -->
        <mimeMap fileExtension=".jsonld" mimeType="application/ld+json" />

Project still give warning while opening but it seems to work.

answered on Stack Overflow Aug 27, 2015 by P.K.

User contributions licensed under CC BY-SA 3.0