简体   繁体   中英

ASP.NET Core 6 Minimal web API Deploy To IIS

I tried to deploy my web API of .NET 6 in IIS SERVER in windows machine. I have done all the necessary configurations:

  • Adding IIS_USERS Access to web.config
  • creating pool with no managed code
  • installing ASP.NET Core Module/Hosting Bundle
  • Install .NET 6 SDK

After doing all these steps, I get this:

No web page was found for the web address: http://localhost:5100/swagger/index.html.

When I compare it to ASP.NET core 3.1, I see that the minimal api doesn't generate a runtimes folder.

Anyone knows how to solve this problem?

I have faced same issue and now it is working OK

In publish settings, I have

Configuration: Release Target Framework: net6.0 Deployment Mode: Self-contained (this was framework-dependant before) Target Runtime: win-x64

Give it a try

Just set the IIS port for the site.

That worked for me

From the left-side menu of the IIS manager, right-click on sites, then choose 'Add Website'. Configure the app and in Binding set the port to a valid one as shown in the image 1 .

If you already have the site configured, you can right-click on the site and go to 'edit bindings'

Add Web Site Dialog image

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM