Skip to content

Conversation

gunsh
Copy link
Contributor

@gunsh gunsh commented Nov 13, 2020

This fixes inability of middleware to listen on "ng serve --ssl" which solves #27790

Addresses #27790

}

private static async Task<AngularCliServerInfo> StartAngularCliServerAsync(
private static async Task<Uri> StartAngularCliServerAsync(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The AngularCliServerInfo class seems to be unused now and could be removed.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have just removed it.

Copy link

@asadsahi asadsahi Nov 13, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This fix isn't working as reproduced with the code of this PR in following repo:

https://github.com/asadsahi/dotnet-angular11

@dnfadmin
Copy link

dnfadmin commented Nov 13, 2020

CLA assistant check
All CLA requirements met.

@Tratcher Tratcher removed their request for review November 13, 2020 21:15
@captainsafia
Copy link
Member

Thanks for taking the time to put together this PR, @gunsh!

It seems like this PR now requires that the Angular development server be started with SSL enabled?

Also, I notice this change (angular/angular-cli#19412) has been merged into the Angular CLI. Does the issue still repro with this change?

@asadsahi
Copy link

@captainsafia possibly that may fix the issue, but will have to wait until next angular cli release. I wanted to raise this issue on angular repo first, but when I tried angular cli 11 project on its own it worked fine.

Making angular cli started in ssl just for this error to go away is not ideal.

This issue only occurs when using angular 11 with .net 5. Therefore, my thinking is still that .net spa middleware has some fix in it.

@captainsafia
Copy link
Member

Got it. This change seems functionally fine. Can you share the scenarios it was validated against? For example, does it work with versions of Angular other than Angular 11.

@halter73 halter73 added area-blazor Includes: Blazor, Razor Components area-mvc Includes: MVC, Actions and Controllers, Localization, CORS, most templates and removed area-middleware area-blazor Includes: Blazor, Razor Components labels Nov 25, 2020
@BrennanConroy BrennanConroy added the community-contribution Indicates that the PR has been added by a community member label Jan 22, 2021
@captainsafia captainsafia changed the base branch from release/5.0 to main February 10, 2021 21:03
@captainsafia
Copy link
Member

From the referenced issue, it looks like updating the CLI version resolves the issue with SSL connections so I don't think we should backport this to 5.0.

But this change (reading the URL of the app from the output) is worthwhile enough to include in 6.0, IMO.

@captainsafia captainsafia merged commit f048038 into dotnet:main Feb 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-mvc Includes: MVC, Actions and Controllers, Localization, CORS, most templates community-contribution Indicates that the PR has been added by a community member
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants