成功部署Asp.net Core 2.0到本地IIS但不起作用

时间:2018-04-18 07:45:52

标签: asp.net-core-2.0 asp.net-core-webapi

我正在使用这些工具 :1)VS2017社区版2)Win10 PC与IIS 10

问题:我一直收到Status 502.3 Bad Gateway。请帮忙。我的安装步骤有问题吗?

Detailed Error Information from Postman:

Module             AspNetCoreModule
Notification       ExecuteRequestHandler
Handler            aspNetCore
Error Code     0x80072ee2
Requested URL      http://192.168.x.x:8383/api/values
Physical Path      C:\PublishedTestCoreWebApi\CoreWebApiTest1\api\values                                    
Logon Method       Anonymous
Logon User     Anonymous

我按照这些步骤将Asp.net Core 2.0 Web Api Code First部署到本地IIS。

创建Asp.net Core 2.0 Web Api Code First(DB)

之后
I did the following:

1) Install Microsoft.Net core 2.0.6-windows server Hosting

2) Create a Folder with name below in C-drive for Publishing the WebApi Project 

   C:\PublishedTestCoreWebApi\CoreWebApiTest1

3) Launch IIS (with inetmgr) in local PC

3.1) create an Application Pool with following info:

Name: NoManagedCodePoolTest1
.NET CLR version : No Managed Code
Managed pipeline mode: Integrated

3.2) Create a website in IIS with these info:

sitename : myAspCoreWebApi 
Application pool : NoManagedCodePoolTest1
Physical path:  C:\PublishedTestCoreWebApi\CoreWebApiTest1
Binding:
Type: http
IPAddress : (use the local IpAddr like: 192.168.x.x)
Port : 8383
Host name : leave it blank

2.3) Check the Website created contains AspNetCoreMudule: Yes.


3) Open TCP Port: 8383 on Firewall for the Website

4) configure SQL Server
There is only one Sqlserver in PC with its name :Sql2017Express ( so this is named instance)
4a) Open Port 49XXX on Firewall for SQl Server
4b) Configure Port 49xxx for SQL Server thru SQL Server Configuration manager with the settings:

Named Pipes : Disabled
TCP/IP : Enabled.

Double click the TCP to show the DialogBox and make changes on

IPALL:
TCP Dynamic Ports : Blank
TCP Port : 49xxx

0 个答案:

没有答案