Quantcast
Channel: ASP.NET Core
Viewing all articles
Browse latest Browse all 9386

Why my website can not works in IIS of Windows Server 2019?

$
0
0

I have a website made by asp.net core 3.1.

It is the first time I publish it on Windows server 2019 Datacenter 1809(17763.1158).

However, it doesn't work but the IE reports ''Can’t reach this page' error on the page.

I run the .exe file in the directory of the project on the server computer. It starts a command-line and showed these:

info: Microsoft.Hosting.Lifetime[0]
Now listening on: http://localhost:5000
info: Microsoft.Hosting.Lifetime[0]
Now listening on: https://localhost:5001
info: Microsoft.Hosting.Lifetime[0]
Application started. Press Ctrl+C to shut down.
info: Microsoft.Hosting.Lifetime[0]
Hosting environment: Production
info: Microsoft.Hosting.Lifetime[0]
Content root path: C:\Project

I access the http://localhost:5000. All works well now.

I have not only ensured set the .NET CLR version to No Managed Code but also ensured there is an AspNetCoreModuleV2 in the module.

I doubt whether it is the problem of DNS or URL. After I set the Host Name to null to make the website only works locally, it still no works.

What's wrong with it? How can I solve this? Thank you.

---------------------------------

PS: Here is some information with dotnet --info of the server computer

Microsoft Windows [Version 10.0.17763.1158]
(c) 2018 Microsoft Corporation. All rights reserved.

C:\Users\Administrator>dotnet --info
.NET Core SDK (reflecting any global.json):
Version: 3.1.201
Commit: b1768b4ae7

Runtime Environment:
OS Name: Windows
OS Version: 10.0.17763
OS Platform: Windows
RID: win10-x64
Base Path: C:\Program Files\dotnet\sdk\3.1.201\

Host (useful for support):
Version: 3.1.3
Commit: 4a9f85e9f8

.NET Core SDKs installed:
3.1.201 [C:\Program Files\dotnet\sdk]

.NET Core runtimes installed:
Microsoft.AspNetCore.App 3.1.3 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.NETCore.App 3.1.3 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.WindowsDesktop.App 3.1.3 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]

To install additional .NET Core runtimes or SDKs:
https://aka.ms/dotnet-download

C:\Users\Administrator>


Viewing all articles
Browse latest Browse all 9386

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>