0

에 프로세스 오류 내가 노력하고 내가 오류가 내 서버에 내 ASP.NETcore 1.1 시동 : ASP.NET 코어 1.1 HTTP 오류 502.5 - 시작

HTTP Error 502.5 - Process Failure

Common causes of this issue:

The application process failed to start The application process started but then stopped The application process started but failed to listen on the configured port

내가 이벤트 뷰어를 확인했습니다.

Application: MyApp.exe Framework Version: v4.0.30319 Description: The process was terminated due to an unhandled exception. Exception Info: System.IO.FileLoadException at MyApp.Program.Main(System.String[])

MyApp.Program.Main

public class Program 
    { 
     public static void Main(string[] args) 
     { 
      Console.Title = "IdentityServer"; 

      var host = new WebHostBuilder() 
       .UseKestrel() 
       .UseUrls("http://localhost:5000") 
       .UseContentRoot(Directory.GetCurrentDirectory()) 
       .UseIISIntegration() 
       .UseStartup<Startup>() 
       .Build(); 

      host.Run(); 
     } 
    } 

이는 신원 서버 4 코드를 기반으로합니다.

Stdout

Unhandled Exception: System.IO.FileLoadException: Could not load file or assembly 'Microsoft.AspNetCore.Hosting, Version=1.1.0.0

가 내 프로젝트에 NuGet을 통해 Microsoft.AspNetCore.Hosting을 추가했습니다. Microsoft.AspNetCore.Hosting.dll은 내 게시 된 파일에 있습니다 ...

더 많은 파고를 한 후에이 게시물을 발견했습니다. Can't load Microsoft.AspNetCore.Hosting 1.1.0.0 #1826. app.AddBrowserLink();을 삭제할 것을 제안합니다. AddBrowserLink()은 내 코드에서 전혀 사용되지 않습니다.

코드를 주석으로 작성하여 기존 .NET에 기반한 .NET Core가 아닌 프로젝트를 참조 할 때 오류가있는 것으로 보입니다.

내가 비주얼 스튜디오 2017

+0

'Microsoft.AspNetCore.Server.Kestrel'에 대한 참조를 추가해 보셨습니까? – Mashton

답변

관련 문제