AspNetCore.Docs icon indicating copy to clipboard operation
AspNetCore.Docs copied to clipboard

This localhost page can’t be found

Open kayakingcoder opened this issue 7 years ago • 11 comments

Hi, I'm in the same position as Itsey who said "I don't see how this works" in the closed issues.

At no point does the article tell us to create a virtual directory / application in IIS that points to the .Net Core application, so I don't understand how they should be linked? I don't mind, but it doesn't work. I've confirmed that "Development time IIS support" is ticked in VS Installer In IIS I have added an https binding with hostname "localhost" to "Default Web Site" and selected the IIS Express certificate. In my .Net core project, I've added a launch profile with launchURL "https://localhost/TradeTribes" similar to how you have "https://localhost/WebApplication1" in the article.

"IIS": {
  "commandName": "IIS",
  "launchBrowser": true,
  "launchUrl": "https://localhost/TradeTribes",
  "environmentVariables": {
    "ASPNETCORE_ENVIRONMENT": "Development"
  }
}

Debug configuration is selected and IIS profile is selected before I click the run/debug button...

But when I debug through VS 2017, I get a 404 on "https://localhost/TradeTribes"

Versions: VS: 15.9.7 .Net Core: 2.2.104 IIS: 1803 (OS Build 17134.1)

Any idea what I'm missing?


Document Details

⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

kayakingcoder avatar Feb 21 '19 02:02 kayakingcoder

At no point does the article tell us to create a virtual directory / application in IIS that points to the .Net Core application

Correct ... you don't.

AFAIK, the procedure described by the topic works. I would've suggested re-walking the steps carefully, but it seems like you've done that already.

@shirhatti Do you know if it requires an IIS restart or a VS restart? Have you heard of anything that commonly trips this up?

guardrex avatar Feb 21 '19 04:02 guardrex

You know, I was going to ask yesterday whether .Net Core 2.2 could be my problem as only 2.1 and older are listed in VS Installer, but somehow it slipped my mind.

Turns out I had to install the IIS Hosting Bundle for .net core 2.2 and all is well with the world https://docs.microsoft.com/aspnet/core/host-and-deploy/iis/#install-the-net-core-hosting-bundle

kayakingcoder avatar Feb 21 '19 18:02 kayakingcoder

@shirhatti, you didn't list the hosting bundle as required. I had it installed locally when I ran the steps of the topic, so idk the behavior without it.

guardrex avatar Feb 21 '19 18:02 guardrex

😕 That's odd. Installing the hosting bundle shouldn't be required. We install ANCM as part of VS if you select that optional component.

shirhatti avatar Feb 21 '19 19:02 shirhatti

Also, you don't have to create a vdir as Visual Studio does that for you.

shirhatti avatar Feb 21 '19 19:02 shirhatti

@kayakingcoder We'll probably need a reliable repro in order for engineering to dig into this further. I'll keep an :eye: out for more reports on this topic's guidance failing. Thanks for reporting it.

guardrex avatar Feb 21 '19 19:02 guardrex

Just FYI @jkotalik. In case you think something is amiss

shirhatti avatar Feb 21 '19 19:02 shirhatti

Thanks y'all. I don't have the resources or skill to uninstall everything and try to recreate this scenario. All I know is that my VS Installer doesn't mention 2.2 anywhere (it only has entries like ".Net Core 2.1 development tools"), so I'm not sure why you'd expect it to install the 2.2 hosting bundle.

Anyway, thanks for your help.

kayakingcoder avatar Feb 21 '19 19:02 kayakingcoder

... I looked :eyes: and the components listed aren't clear wrt ANCM. Here's what's shown for the two workloads ...

capture

Not critical, but it might have been good to list for the .NET Core x-plat bits under "Included" a checkmark entry for "ASP.NET Core Module."

Wouldn't matter wrt this issue tho.

I still wonder if a restart of VS and/or IIS is required ... and we don't say to do that currently in this topic if it is required. VS may restart tho with a workload change automatically ... not sure ... don't recall.

guardrex avatar Feb 21 '19 19:02 guardrex

I'm going to close due to inactivity and no further engineering notes. We'll keep an :eye: on this topic tho for any further reports.

guardrex avatar Feb 26 '19 02:02 guardrex

I have allready hosted api on IIS but My image and media not showing on browser, it shows This localhost page can’t be found

ansarieqbal avatar Aug 08 '19 12:08 ansarieqbal