Authorization filter in Azure App service redirect to default domain rather than custom domain

104 Views Asked by At

I have Azure app service which built in .NET 6 core. That app service has custom domain which is accessible for all. But default domain not accessible for all and it threw 403 forbidden error.

Now my issue is when I use Authorize filter on some controller methods then application redirected me to its default domain like https://app-xxxxx.azurewebsites.net/Home/Login so it throws Error 403 - Forbidden exception. It should redirect me its custom domain https://dev.xxxxx.com/Home/Login.

 [Authorize]
 public ActionResult Dashboard()
 {}

How can I tell app to redirect to its custom domain? Can someone help me regarding this? I am working in .NET 6 core c#.

0

There are 0 best solutions below