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

The described procedure doesn't work

Open mcurko opened this issue 7 years ago • 15 comments

When I follow the procedure described under "Use the Windows Authentication app template for a new project", I end up with a message in the browser "This site can’t be reached". I did try to change code/configuration in various ways (Google-ing, stackoverflow, etc.) but I couldn't make the Windows authentication work with ASP:NET Core. Please take a look and correct the article so that we can have a basic frame for starting working with Windows authentication.

I'm using: Microsoft Visual Studio Enterprise 2017 (Version 15.9.9) Microsoft .NET Core SDK 2.2.104 (x64)


Document Details

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

mcurko avatar Mar 20 '19 09:03 mcurko

This was recently tested. cc @guardrex

Rick-Anderson avatar Mar 21 '19 17:03 Rick-Anderson

Then it's likely that there are other important prerequisites/conditions not mentioned in the article, necessary for the example to work.

mcurko avatar Mar 22 '19 06:03 mcurko

I'm still out-of-town at a conference (no laptop with me), but I'll be flying back on Saturday and will try to look on Sunday.

guardrex avatar Mar 22 '19 15:03 guardrex

I couldn't get to this immediately. I'm still ⛏ digging myself out. I'll look asap ... hopefully within a day or two.

guardrex avatar Mar 26 '19 04:03 guardrex

@Rick-Anderson As far as I can tell, putting 3.0 preview on here and trying to run IIS Express with the dev cert is what's breaking. The app will run directly on Kestrel at https://localhost:5001.

I'm going to upgrade the VS here when it releases, and I'll try again and see what happens.

I did note one strange thing while playing with this ...

The test app that I set up for this didn't consume launchSettings.json when I ran the app with dotnet run. We've documented it for a long time, and I remember it working. https://docs.microsoft.com/aspnet/core/fundamentals/environments#development

guardrex avatar Mar 26 '19 19:03 guardrex

Just to confirm that unfortunately the described process does not work. After deploying the application under IIS the Windows User is not detected. Hope you are planning a quick fix. Environments: Microsoft Visual Studio Enterprise 2017 (Version 15.9.10) Microsoft .NET Core SDK 2.2.105 (x64) .Net Hosting 2.2.3

aleph0mc avatar Mar 28 '19 21:03 aleph0mc

@aleph0mc Yes, I'm going to update VS when it releases on April 2 (next Tuesday).

I'll move the priority on this up and get to it quickly.

guardrex avatar Mar 28 '19 21:03 guardrex

@guardrex Thanks!

aleph0mc avatar Mar 28 '19 21:03 aleph0mc

I'm installing VS 2019 now to work this issue. Could take a while tho ... need to install a big Win10 update first and Disk Cleanup this drive. 😅

guardrex avatar Apr 02 '19 21:04 guardrex

It's fighting me a little bit. The workaround in https://github.com/aspnet/AspNetCore/issues/8378 didn't work.

However, going through my shiny new VS 2019 IIS Express does result in a request for credentials, so it's working there.

I have a feeling that when I get my IIS back in a good state that it's going to work. Preview 4 will fix the problem with the hosting bundle installer. I may wait until Preview 4 to get my ANCM woes sorted.

guardrex avatar Apr 03 '19 04:04 guardrex

When you say "Preview 4", do you refer to .net core 3?

mcurko avatar Apr 03 '19 05:04 mcurko

@guardrex You mentioned VS2019 and that's fair enough, but what about VS2017? Thx.

aleph0mc avatar Apr 03 '19 12:04 aleph0mc

Yes, Preview 4 for .NET Core 3. They will have the hosting bundle installer fixed for Preview 4, which should fix my broken IIS/ANCM state ... get the right ANCM in the right spot. I tried the workaround last night, but it ended in :boom:. I'll try the workaround again today with fresh eyes and :coffee: :coffee: :coffee:.

I was hoping that the VS2019 install would fix my broken IIS/ANCM state. Nope ... didn't do it. IIS Express in VS2019 works fine—the app runs correctly with a prompt for credentials. So IIS Express is consuming the launchSettings.json file setting for WinAuth and the auth middleware is functioning correctly in that case. IIS/ANCM should have the same result once I get it running.

I'll post back later today (Wednesday) with an update.

guardrex avatar Apr 03 '19 14:04 guardrex

Ok ... my IIS is back. Will see what's what now.

guardrex avatar Apr 03 '19 22:04 guardrex

Working here ...

Capture

@mcurko try again with a fresh app following our guidance in the IIS topic. The problem with your app is probably related to an IIS misconfiguration of some sort.

Troubleshooting is here :point_right: Troubleshoot ASP.NET Core on IIS.

Common errors over here :point_right: Common errors reference for Azure App Service and IIS with ASP.NET Core.

Don't close this issue tho even if you get it working. I DO need to make some updates to the topic, and this issue will auto-close when the PR merges.

guardrex avatar Apr 03 '19 22:04 guardrex