简体   繁体   English

.net核心2.0角度默认应用程序部署到IIS远程服务器失败,出现502.3错误

[英].net core 2.0 angular default app deploy to IIS remote server failing with 502.3 error

I am using Visual studio 2017 default angular app. 我正在使用Visual Studio 2017默认角度应用程序。 I have also installed DotNetCore.2.0.8-WindowsHosting.exe on local machine as well as remote server. 我还已经在本地计算机以及远程服务器上安装了DotNetCore.2.0.8-WindowsHosting.exe。 I was able to deploy that to IIS on local machine, but when I copy Publish Profile (from bin\\release\\PublishOutput folder) to the remote server and connect it to IIS with No Managed code app pool setting, it throws below error (captured in Failed Request tracing) 我能够将其部署到本地计算机上的IIS,但是当我将发布配置文件(从bin \\ release \\ PublishOutput文件夹)复制到远程服务器,并使用无托管代码应用程序池设置将其连接到IIS时,它抛出以下错误(捕获)在失败的请求跟踪中)

<EventData> <Data Name="ContextId">{80000004-0002-E300-B63F-84710C7967BB}</Data> <Data Name="ModuleName">AspNetCoreModule</Data> <Data Name="Notification">128</Data> <Data Name="HttpStatus">502</Data> <Data Name="HttpReason">Bad Gateway</Data> <Data Name="HttpSubStatus">3</Data> <Data Name="ErrorCode">2147942413</Data> <Data Name="ConfigExceptionInfo"></Data> </EventData>

In fiddler Response Header is - 在提琴手中,响应标题为-

HTTP/1.1 502 Bad Gateway Content-Type: text/html Server: Microsoft-IIS/8.5 X-Powered-By: ASP.NET Date: Thu, 14 Jun 2018 17:33:23 GMT Content-Length: 1477 HTTP / 1.1 502错误的网关内容类型:文本/ html服务器:Microsoft-IIS / 8.5 X-Powered-通过:ASP.NET日期:2018年6月14日星期四17:33:23 GMT内容长度:1477

And error is - 错误是-

502 - Web server received an invalid response while acting as a gateway or proxy server. 502-Web服务器在充当网关或代理服务器时收到无效响应。

There is a problem with the page you are looking for, and it cannot be displayed. 您要查找的页面有问题,无法显示。 When the Web server (while acting as a gateway or proxy) contacted the upstream content server, it received an invalid response from the content server. 当Web服务器(充当网关或代理)联系上游内容服务器时,它从内容服务器收到无效响应。

There are no errors found in Event Viewer. 在事件查看器中没有发现错误。 It says 它说

Application 'MACHINE/WEBROOT/APPHOST/TEST' started process '6844' successfully and is listening on port '13118'. 应用程序“ MACHINE / WEBROOT / APPHOST / TEST”已成功启动进程“ 6844”,并且正在侦听端口“ 13118”。

Also, I am not able to capture the stdoutlogs , somehow it's not registering. 另外,我无法捕获stdoutlogs ,以某种方式没有注册。 I have enabled it on web.config file stdoutLogEnabled="true" and given the permission to the logs folder at root directory to the specific app pool. 我已经在web.config文件stdoutLogEnabled="true"上启用了它,并授予了特定应用程序池根目录下的logs文件夹的权限。

I have installed DotNetCore.2.0.8-WindowsHosting.exe on server. 我已经在服务器上安装了DotNetCore.2.0.8-WindowsHosting.exe。 Also, app works on local machine if accessed through IIS port but not with dotnet command (5000 port). 此外,如果通过IIS端口(但不是通过dotnet命令(5000端口)访问),则该应用程序可在本地计算机上运行。 With dotnet command it throws error locally and also on the server. 使用dotnet命令会在本地以及服务器上引发错误。 But I am only looking to get it working with IIS on the server. 但是我只是想让它与服务器上的IIS一起使用。

About FDD and SCD, which one is the standard practice for Angular SPA's? 关于FDD和SCD,Angular SPA的标准做法是哪一种?

I don't see nodejs on server at c:\\program files. 我在c:\\ program文件的服务器上看不到nodejs。 How do I package code with all dependencies? 如何打包具有所有依赖关系的代码? How do I even find out what I should be including in the package? 我什至如何找出包装中应包含的内容? This is my first Angular app, so sorry for basic questions. 这是我的第一个Angular应用,非常抱歉。

My program.cs file - 我的program.cs文件-

   public static IWebHost BuildWebHost(string[] args) =>
        WebHost.CreateDefaultBuilder(args)
            .UseStartup<Startup>()
            .Build();

My web.config 我的web.config

 <configuration>
  <system.webServer>
    <handlers>
      <add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModule" resourceType="Unspecified" />
    </handlers>
    <aspNetCore processPath="dotnet" arguments=".\testApp.dll" stdoutLogEnabled="true" stdoutLogFile=".\logs\stdout" requestTimeout="00:50:00">
    <environmentVariable name="ASPNETCORE_ENVIRONMENT" value="Development" />
    </aspNetCore>
        <tracing>
            <traceFailedRequests>
                <add path="*">
                    <traceAreas>
                        <add provider="ASPNET" areas="AppServices" verbosity="Verbose" />
                        <add provider="WWW Server" areas="Authentication,Security,Filter,StaticFile,CGI,RequestNotifications,Module,FastCGI,WebSocket,Rewrite,RequestRouting" verbosity="Verbose" />
                    </traceAreas>
                    <failureDefinitions statusCodes="401.3-600" />
                </add>
            </traceFailedRequests>
        </tracing>


  </system.webServer>
</configuration>

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 .NET Core 发布到 IIS - HTTP 错误 502.3 - 错误网关 - 指定的 CGI 应用程序遇到错误并且服务器终止了该进程 - .NET Core publish to IIS - HTTP Error 502.3 - Bad Gateway - The specified CGI application encountered an error and the server terminated the process 插入数据库时​​出现.NET Core Error 502.3 - .NET Core Error 502.3 while inserting into database 错误 500:在 Windows 服务器 2016 上将 .net Core 6 应用程序托管到 IIS - Error 500: Hosting .net Core 6 app into IIS on Windows Server 2016 VS 2017 .Net Core 2.0,Angular 4,错误:System.Net.Http.WinHttpException:与服务器的连接异常终止 - VS 2017 .Net Core 2.0, Angular 4, Error: System.Net.Http.WinHttpException: The connection with the server was terminated abnormally 当在 IIS 中发布 .net 核心 web 应用程序的示例项目时,出现 Z293C9EA246FF99875DC6F62A5601 内部服务器错误。 - When Publish sample project of .net core web app in IIS getting HTTP Error 500.19 Internal Server Error .net Core 2.0上的Angular CLI - Angular CLI on .net Core 2.0 在IIS上运行.NET Core 2.0,给出404 - Run .NET Core 2.0 on IIS giving 404 angular and .net core 2.2 Web.config file issue when deploy on IIS windows 10 - angular and .net core 2.2 Web.config file issue when deploy on IIS windows 10 部署多项目.Net Core App到Windows服务器 - Deploy multi-project .Net Core App to Windows server .NET Core 2.0 使用 IIS 仅将 DLL 文件发布到生产服务器 - .NET Core 2.0 publishing only DLL files to production server using IIS
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM