Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/asp.net-core/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
通过IIS部署ASP.Net核心web应用程序_Iis_Asp.net Core_.net Core - Fatal编程技术网

通过IIS部署ASP.Net核心web应用程序

通过IIS部署ASP.Net核心web应用程序,iis,asp.net-core,.net-core,Iis,Asp.net Core,.net Core,通过IIS部署ASP.Net Core 2.0 web应用程序时遇到问题。我的应用程序通过VS构建和运行,但我无法使IIS实例正常工作 我收到以下错误消息: 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 ap

通过IIS部署ASP.Net Core 2.0 web应用程序时遇到问题。我的应用程序通过VS构建和运行,但我无法使IIS实例正常工作

我收到以下错误消息:

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 
所有故障排除步骤都不起作用。当我通过命令行运行以下命令时,我认为问题不在于应用程序本身:

"C:\Program Files\dotnet\dotnet.exe" C:\inetpub\wwwroot\MyApp\MyApp.dll
应用程序正在运行,我可以在

我已经完成了所有的步骤,但仍然没有取得任何进展

这就是我的WebHostBuilder方法的外观:

var host = new WebHostBuilder()
              .UseKestrel()
              .UseContentRoot(Directory.GetCurrentDirectory())
              .UseIISIntegration()
              .UseStartup<Startup>()
              .UseApplicationInsights()
              .Build();
host.Run();
我在Startup.cs中使用以下设置:

services.Configure<IISOptions>(options =>
{
    options.AutomaticAuthentication = true;
});

这个错误可能有很多原因

在您的IIS服务器上安装了吗? 您的应用程序池配置是否正确? 您的站点绑定是否正确? 检查计算机上的安装运行时是否与您尝试在项目上运行的运行时相同
您是否安装了此处找到的.NET Core托管捆绑包:?是的,我已按照中的步骤进行了操作。在安装托管捆绑包后,您是否完全重新启动了计算机?是的,完全重新启动并重新启动了IIS。在部署到服务器之前,我将作为测试部署到我的本地计算机,以便它具有运行时,根据指南,应用程序池设置为无托管代码。绑定应该是什么?它们必须和标准的.Net站点有什么不同吗?我现在不在我的机器旁,明天再看一看。谢谢你的帮助。这毕竟是一个绑定问题。我试着从我的机器上删除默认网站并清空绑定,该网站在localhost上工作/你知道我如何让它在另一个地址工作吗?找到了它,主机文件中的条目被注释掉了-非常令人沮丧。谢谢你的帮助。