Aspnetcore: Issues within Visual Studio when selecting both Azure AD and Docker Linux support

Created on 5 Jun 2020  路  11Comments  路  Source: dotnet/aspnetcore

I'm not sure if this is the correct location as this issue deals with Visual Studio and this repository looks to be largely geared toward dotnet new. If I'm not in the right spot, feel free to close or forward me elsewhere.


Recently, I created a project within Visual Studio. I selected .NET Core MVC. I enabled the options for Azure AD Auth (single organization) and Docker container support with Linux.

Upon publishing my container to an Azure Web app for Containers, I noticed that the redirect URI was specified as always using http.

I opened an issue here: https://github.com/dotnet/aspnetcore/issues/22572

It turns out I needed to do some additional work to enable header forwarding in order for Azure AD auth to work within the container.

I'm hoping that we could get this added to the templating engine so that applications would work out of the box.

I'd be happy to send along a PR if someone points me in the right direction.

Thanks for all you do!

Needs area-middleware

All 11 comments

Hello @SeanKilleen , we are also trying to find the right place. Please share the relevant template name (if you know it) or steps to reproduce. Based on this we can then find the right repo.

Thanks @donJoseLuis!

My steps to recreate were:

  • Open Visual Studio 2019
  • Select to create a new project
  • Select ASP.NET Core Web Application
  • Select Web Application (Model-View-Controller)
  • Under Authentication, select Change and change to Work or School Accounts. Select Cloud - Single Organization as the option and choose the domain from the drop-down. Click OK
  • Leave the checkbox for Enable Docker Support checked and set to Linux.
  • Create the project.

Let me know if I can provide more detail. I think one template (Docker or AD) needs to be modified to detect the enablement of the other one and should add the additional code to forward the headers.

One consideration: This may need to be an optional thing. We may want to add a method within Startup that accomplishes this, along with a comment and/or docs reference.

This makes me think it's likely the template for "Work or School Accounts" auth that should be updated to see if there's a dockerfile in the solution.

Hi @donJoseLuis -- wanted to follow up to make sure you'd seen my reply and that this is no longer labeled as need-customer-info. Thanks!

Greetings @SeanKilleen . Thanks for the ping.
@grinrag + @ladipro , can you please re-assess the issue in this week's triage?

@mkArtakMSFT looks like this is ASP.NET template issue. Could you, please, point me to the right repo, where is the source of template located?

@SeanKilleen this repo contains only _template engine_ source code and couple of templates. The ASP.NET templates are located in a different repo. I asked the guy, who can point us to the right place.

@grinrag this is the right repo for the aspnetcore templates.

What version are you using? This should have been addressed back in 3.0. See https://devblogs.microsoft.com/aspnet/forwarded-headers-middleware-updates-in-net-core-3-0-preview-6/

@bradygaster

This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment. If it is closed, feel free to comment when you are able to provide the additional information and we will re-investigate.

See our Issue Management Policies for more information.

Sorry, I'd missed this in a bunch of notifications.

@Tratcher I was using Visual studio 2019 with latest updates at the time and .NET Core 3.1 installed. When using the templates, I had to manually add the change for it to work.

Are you saying that you're currently unable to reproduce it with the steps I provided?

Thanks for contacting us.
We're moving this issue to the Next sprint planning milestone for future evaluation / consideration. We will evaluate the request when we are planning the work for the next milestone. To learn more about what to expect next and how this issue will be handled you can read more about our triage process here.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

FourLeafClover picture FourLeafClover  路  3Comments

Kevenvz picture Kevenvz  路  3Comments

UweKeim picture UweKeim  路  3Comments

rynowak picture rynowak  路  3Comments

groogiam picture groogiam  路  3Comments