Deploy .NET Core ASP.NET Website - HTTP Error 502.5 - Process Failure

北慕城南 提交于 2019-12-07 12:03:17

问题


I'm trying to publish the template project "ASP.NET Core Web Application (.NET Framework)" from Visual Studio 2015 to IIS.

I use the Visual Studio publish to File System feature.

I'm using Windows 10.

I followed the guide from here.

  • I set up a website in IIS and changed the Application Pool .NET CLR Version to No Managed Code
  • I instaled the .NET Core Windows Server Hosting bundle
  • I restarted my machine.

I get this error:

I added a logs folder, but no logs get created.

Any ideas on how I can solve this?

EDIT:

Output of running the .exe from powershell:

PS C:\TestCoreWebsite> .\Web_CoreWebNetFramework.exe Hosting environment: Production Content root path: C:\TestCoreWebsite Now listening on: http://localhost:5000 Application started. Press Ctrl+C to shut down.

Then I navigate to http://localhost:5000 and the sample site works.


回答1:


Found the solution:

In the root web.config change:

processPath="%LAUNCHER_PATH%"

to:

processPath=".\Web_CoreWebNetFramework.exe"



回答2:


I ran the following command in cmd

C:\fullpath\dotnet C:\fullpath\PROJECT.dll

on the command prompt, which gave me a much more meaningful error:

"The specified framework 'Microsoft.NETCore.App', version '1.0.1' was not found. - Check application dependencies and target a framework version installed at: C:\Program Files\dotnet\shared\Microsoft.NETCore.App - The following versions are installed: 1.0.0 - Alternatively, install the framework version '1.0.1'.

I Installed the correct net core and the project worked correctly




回答3:


With VisualStudio 2017, open up the .csproj file and add to the first block:

<RuntimeFrameworkVersion>1.0.4</RuntimeFrameworkVersion>

Usually the result will be:

<PropertyGroup>
    <TargetFramework>netcoreapp1.1</TargetFramework>
    <RuntimeFrameworkVersion>1.0.4</RuntimeFrameworkVersion>
</PropertyGroup>


来源:https://stackoverflow.com/questions/39752807/deploy-net-core-asp-net-website-http-error-502-5-process-failure

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!