Skip to content

New .Net 8.0 with Angular - Cannot Run In IIS Express even after adding Authentication Negotiate, etc #56996

Open

Description

Is there an existing issue for this?

  • I have searched the existing issues

Describe the bug

I am trying to build a Net 8.0 with Angular website that will be hosted internally by IIS so that we can use the Windows Domain sign-in to secure who can access the website. It should not require the user to log into the website. Instead it should get the username from the Windows domain when they signed into the company Windows domain. I have tried many different approaches but ultimately have gotten stuck once I add all the few authentication changes I think I need to make.

For expediency to work through this, what I hope is a relatively straight forward thing, I settled on trying to accomplish this with a fresh Net 8.0 with Angular solution created by Visual Studio 2022 (with recent updates).

After the skeleton solution was auto generated by Visual Studio, I have so far only:

  1. Added the Microsoft.AspNetCore.Authenticate.Negotiate package.
  2. Added lines 12 and 24 to program.cs

image

  1. I also updated the launchSettings.json “windowsAuthentication”: true,
    “anonymousAuthentication”: false,

  2. I then set the server project as the startup project.

When I run it through Visuall Studio 2022 via IIS Express debug option it just seems to hang. Please note it did/does not hang prior to the 4 small changes I just listed.

image

That is all I have done to this point to keep this example as simple as possible.

For reference, Visual Studio reported issue: https://developercommunity.visualstudio.com/t/New-Net-80-with-Angular---Cannot-Run-I/10676716#T-ND10683404

Thank you in advance for your help.

Alvin

Expected Behavior

I should be able to build and run a Net 8.0 with Angular website that will be hosted internally by IIS so that we can use the Windows Domain sign to secure who can access the website. To that end we should be able to use the Visual Studio 2022 new project angular website created by Visual Studio as the foundation for building such a website. And be able to run/debug it in Visual Studio 2022 via ISS Express.

Steps To Reproduce

https://github.com/Alvin-Solor/Net8AngularISSProblem

Could not just load the whole folder on my pc for this visual studio project. So I uploaded all except the the node_modules , bin and obj libraries. I hope those can be re-generated using the code/files that are loaded in this repo.

Exceptions (if any)

Screen just seems to hang.

.NET Version

8

Anything else?

I originally reported this issue to the Microsoft Visual Developer Community site. They referred me to here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    Needs: Attention 👋This issue needs the attention of a contributor, typically because the OP has provided an update.area-networkingIncludes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractionsfeature-spa

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions