.NET - Auth0 login - web proxy

Hi everyone,

The Auth0 login works well in my ASP.NET MVC Application on my dev environment.

(Auth0 ASP.NET Core MVC SDK Quickstarts: Add Login to your ASP.NET MVC application)

But this is not working in the production environment (IONOS server), just like some other external services, because of the server and proxy configuration.

I got this code :

[HttpGet]
public async Task Login()
{
	try
	{
		var authenticationProperties = new LoginAuthenticationPropertiesBuilder()
			.WithRedirectUri("/")
			.Build();

		await this.HttpContext.ChallengeAsync(Auth0Constants.AuthenticationScheme, authenticationProperties);
	}
	catch(Exception e)
	{
		this.LogException(e);
	}
}

And I think I need to be able to setup a web proxy so this code can work. This is how it’s made for my other external services :

HttpClientHandler handler = new HttpClientHandler
{
    Proxy = new WebProxy
    {
        Address = new Uri("xxxxxxxx")
    }
};

Do you know how it can be done with the Auth0 .NET Api ?

Thank you for your help!

Best regards,

Antoine.