Home > other >  Deploy ASP.NET core web app which used Azure AD authentication on linux server
Deploy ASP.NET core web app which used Azure AD authentication on linux server

Time:01-03

When I deploy my asp.net core web app which used Azure AD authentication on a Linux server, it runs using an IP address with a particular port number using HTTP protocol. Azure portal does not allow HTTP protocol with IP address. It has to be HTTPS. How can I run my application with HTTP protocol which is using Azure AD authentication?

I tried to add the new IP address on azure ad portal but it does not allow IP addresses with HTTP protocol(only localhost is allowed for HTTP). If I add HTTPS then I am getting error

The redirect URI 'url' specified in the request does not match the redirect URIs configured for the application ''

I tried to add full path for "CallbackPath" in the appsettings.json file. When I run the application, I get error of

ArgumentException: The path in 'value' must start with '/'. (Parameter 'value')

I want to run my applciation on a linux using ip address with HTTP protocol. How can I solve this problem?

CodePudding user response:

I Tried to reproduce the same in my environment to deploy .Net Web Application on Linux Server:

I created a linux virtual machine, like below.

Azure Portal > Virtual machines > Create > Create a virtual machine.

enter image description here

Connected to Linux VM Using Putty.

Install .Net Core on Linux Server by using below commands, See the :enter image description here

And for this error messgae:

The redirect URI 'url' specified in the request does not match the redirect URIs configured for the application ''

We should check the App registrations in azure portal, not appsettings.json.

  • Related