我部署了我的.Net核心项目窗口服务器2012 R2 64位,这发生了:部署.NET的核心项目,窗口服务器2012 R2
HTTP错误502.5 - 过程失效根据微软的指导,他们说,这是因为平台与RID冲突。
(https://docs.microsoft.com/en-us/aspnet/core/publishing/iis?tabs=aspnetcore2x#common-errors)
我已通过该指南中的每一步已经来但不能修复它。那么有谁知道如何解决这个问题?如果可以,我将不胜感激。谢谢。
注意:我已经给出了发布文件夹的完整权限,并且还安装了ASPNetCoreModule v2.0,net core sdk 2.0。我的IIS版本是8.5。
这里是我的.csproj:
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>netcoreapp2.0</TargetFramework>
<RootNamespace>_MyAppAPI</RootNamespace>
<AssemblyName>_MyAppAPI</AssemblyName>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
<DocumentationFile></DocumentationFile>
</PropertyGroup>
<ItemGroup>
<Content Remove="wwwroot\swagger\authen\basic-auth.js" />
<Content Remove="wwwroot\swagger\ui\custome.css" />
</ItemGroup>
<ItemGroup>
<Folder Include="Middleware\" />
<Folder Include="Logs\" />
<Folder Include="Models\appapi\" />
<Folder Include="wwwroot\lib\" />
<Folder Include="wwwroot\logs\" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.All" Version="2.0.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="2.0.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="2.0.0" />
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="2.0.0" />
<PackageReference Include="Serilog.Extensions.Logging.File" Version="1.1.0" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="1.0.0" />
</ItemGroup>
<ItemGroup>
<DotNetCliToolReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Tools" Version="2.0.0" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="wwwroot\swagger\authen\basic-auth.js" />
<EmbeddedResource Include="wwwroot\swagger\ui\custome.css" />
</ItemGroup>
</Project>
而且web.config文件生成后:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<system.webServer>
<handlers>
<add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModule" resourceType="Unspecified" />
</handlers>
<aspNetCore processPath="dotnet" arguments=".\_MyAppAPI.dll" stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout" />
</system.webServer>
</configuration>
<!--ProjectGuid: 2510f4bb-368b-4ab2-96e1-5d06b14d677e-->
我碰到了这样:IIS fails to run ASP.NET Core site - HTTP Error 502.5 似乎正是我的问题。但是我无法在任何地方找到.exe文件。 :(
你能告诉我们更多关于你是如何发布应用程序吗?你能不能给我们csproj? –
@IvanMilosavljevic嗨。我只需更新我的csproj文件和web.config。 –
你如何部署/发布项目? –