我试图在服务器上设置我的应用程序的新版本,但是当我尝试访问该网站时,出现HTTP错误(502.5-进程失败)。
num_people = 4;
num_problems = 3;
value = [ 3.0, 7.2, 1.2 ];
cost = array2d(PROBLEMS, PEOPLE,
[
2.3, 6.2, 1.2, 4.2, % cost for the 4 people for problem-1
5.1, 3.2, 2.3, 7.8, % cost for the 4 people for problem-2
1.5, 1.7, 4.2, 1.2, % cost for the 4 people for problem-3
]);
threshold = 10.0;
日志:
stdout
如果我尝试使用dotnet cmd启动exe:
Expression: [Recursive resource lookup bug]
Description: Infinite recursion during resource lookup within System.Private.CoreLib. This may be a bug in System.Private.CoreLib, or potentially in certain extensibility points such as assembly resolve events or CultureInfo names. Resource name: ArgumentNull_Generic
在我的>dotnet Maquetteur.Web.exe
Failed to load the dll from [C:\temp\MaquetteurWinServer2012_new\hostpolicy.dll], HRESULT: 0x7BF030
An error occurred while loading required library hostpolicy.dll from [C:\temp\MaquetteurWinServer2012_new\]
中:
csproj
还有我的发布者文件:
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>netcoreapp2.0</TargetFramework>
<UserSecretsId>3a51662b-79e6-4d37-be0c-c1e406dae19c</UserSecretsId>
<RuntimeIdentifiers>win7-x64;linux-x64;win8-x64</RuntimeIdentifiers>
<Version>0.2.0</Version>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="AutoMapper" Version="6.2.2" />
<PackageReference Include="CoreCompat.System.Drawing" Version="1.0.0-beta006" />
<PackageReference Include="jQuery.filedrop" Version="1.0.1" />
<PackageReference Include="jQuery.UI" Version="1.12.1.1" />
<PackageReference Include="jQuery.UI.Combined" Version="1.12.1" />
<PackageReference Include="jQWidgets.AspNetCore.Mvc.TagHelpers" Version="2.0.1" />
<PackageReference Include="Microsoft.ApplicationInsights.AspNetCore" Version="2.3.0" />
<PackageReference Include="Microsoft.AspNetCore.All" Version="2.0.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" 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.4" />
<PackageReference Include="MySql.Data" Version="8.0.11" />
<PackageReference Include="NLog.Web.AspNetCore" Version="4.5.4" />
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="2.0.0" />
<PackageReference Include="NSwag.Core" Version="11.17.17" />
<PackageReference Include="SoapCore" Version="0.9.7" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="2.5.0" />
<PackageReference Include="Swashbuckle.AspNetCore.Swagger" Version="2.5.0" />
<PackageReference Include="Swashbuckle.AspNetCore.SwaggerGen" Version="2.5.0" />
<PackageReference Include="Swashbuckle.AspNetCore.SwaggerUI" Version="2.5.0" />
<PackageReference Include="ZXing.Net" Version="0.16.4" />
</ItemGroup>
<ItemGroup>
<DotNetCliToolReference Include="Microsoft.EntityFrameworkCore.Tools.DotNet" Version="2.0.0" />
<DotNetCliToolReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Tools" Version="2.0.0" />
</ItemGroup>
<ItemGroup>
<Content Update="nlog.config">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
</ItemGroup>
<ProjectExtensions>
<VisualStudio>
<UserProperties appsettings_1json__JSONSchema="" />
</VisualStudio>
</ProjectExtensions>
</Project>
我尝试了不同的方法来解决我的问题而没有成功... 我可以在Visual Studio中以“调试和发布”模式启动它。
我认为Identity Core存在问题,因为我在此新版本中添加了它。在使用Identity之前,我在服务器上设置新版本没有任何问题。
规格:
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<WebPublishMethod>FileSystem</WebPublishMethod>
<PublishProvider>FileSystem</PublishProvider>
<LastUsedBuildConfiguration>Release</LastUsedBuildConfiguration>
<LastUsedPlatform>Any CPU</LastUsedPlatform>
<SiteUrlToLaunchAfterPublish />
<LaunchSiteAfterPublish>True</LaunchSiteAfterPublish>
<ExcludeApp_Data>False</ExcludeApp_Data>
<ProjectGuid>7a5caaf4-d505-435a-8215-a59e69b5fe5e</ProjectGuid>
<publishUrl>C:\temp\MaquetteurWinServer2012</publishUrl>
<DeleteExistingFiles>False</DeleteExistingFiles>
<TargetFramework>netcoreapp2.0</TargetFramework>
<RuntimeIdentifier>win8-x64</RuntimeIdentifier>
</PropertyGroup>
</Project>
我可能错过了一些信息。
您知道为什么我会发生此错误吗?
答案 0 :(得分:0)
我找到了解决问题的方法。
是导致此问题的NLOG dll。我检查了新版本与另一个版本之间的变化,其中之一是NLOG实现。我删除了它,发布了一个新版本并将其放在我的服务器上。它的工作没有错误! 我不知道该dll是否与我的设置不兼容,或者我在program.cs中使用不当。我将需要做一些测试以尝试再次实现此dll ...或只是找到其他日志记录dll:)