[英].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.