question

CraigBuchanan-2733 avatar image
1 Vote"
CraigBuchanan-2733 asked prmanhas-MSFT commented

ASP.net core in container instance

I have an ASP.net app with razor and AzureAD login created when creating the project.

It runs from VS with IISExpress and in local docker.

For now we want to run this app in a container instead of app services.

I have been through app registration, and applied redirect URI's. I know they are picking up because if I remove the localhost entries, I get an error when running in iisexpress/docker.

Have deployed to container registery and created a container instance and running with a public ip.

I have added (xxx123 is the fqn as provided by container instance overview)
https://xxx123.northeurope.azurecontainer.io
https://xxx123.northeurope.azurecontainer.io/signin-oidc
to the redirect uri's alongside the matching https://localhost equivalents.

Going to (non secure) http://xxx123.northeurope.azurecontainer.io I get the following message
AADSTS50011: The reply URL specified in the request does not match the reply URLs configured for the application: '<tenant id>'.

Going to (secure) https://xxx123.northeurope.azurecontainer.io I get a chrome error message that the Site can't be reached. The connection was reset.

No other issues browsing other site.

Would be appreciated if I can at least get an idea if I should harass our Azure admins or if there are changes I need to make in code/deployment/container config.

Thanks
C



[1]: /answers/storage/attachments/88170-image.png

azure-container-instances
image.png (15.2 KiB)
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

@CraigBuchanan-2733 Any updates on the issue?

Please "Accept as Answer" if it helped so it can help others in community looking for help on similar topics.

Thanks

0 Votes 0 ·
CraigBuchanan-2733 avatar image
0 Votes"
CraigBuchanan-2733 answered

I stand to be corrected, but seems HTTPS in containers is not a supported and/or best practice avenue.

Would still love some direction if possible, but diverting focus to app services instead to build a POC to warrant further funding.

C

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

yogyogi avatar image
0 Votes"
yogyogi answered

HTTPS in Containers is supported. I think your asp.net core app is not configured to use HTTPS. Refer ASP.NET Core APP with HTTPS in Docker as it explains about https in docker for asp.net core app.


5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.