You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm developing a web app with ASP.NET - MVC - NET6. Everything works perfectly when i work in local or i deploy as usually in my tenant.
The problem comes when we are using a custom domain in another tenant, not in the resource, in the application registry and behind that there is a proxy (or at least the external technical team of that tenant told me so).
At the beginning the redirect url of the aplication is correct (external - custom domain), because we can access through that link, but after the login with f5 and ping ID, the app redirects us to the resource link and not to the custom domain. Then we receive an error: "403 forbidden", because it's configurated like that, and no one outside the internal network can access to that link, so we need to use the custom domain.
This is my program.cs code. I can't find a solution for this issue.
var builder = WebApplication.CreateBuilder(args);
var configuration = builder.Configuration;
// Add services to the container.
builder.Services.AddControllersWithViews();
builder.Services.AddAuthentication(OpenIdConnectDefaults.AuthenticationScheme)
.AddMicrosoftIdentityWebApp(builder.Configuration.GetSection("AzureAd"))
.EnableTokenAcquisitionToCallDownstreamApi()
.AddInMemoryTokenCaches();
builder.Services.AddAuthorization(options =>
{
options.FallbackPolicy = options.DefaultPolicy;
});
var app = builder.Build();
if (!app.Environment.IsDevelopment())
{
app.UseExceptionHandler("/Error");
}
app.UseHttpsRedirection();
app.UseStaticFiles();
app.UseRouting();
app.UseAuthentication();
app.UseAuthorization();
app.MapControllerRoute(
name: "default",
pattern: "{controller=Home}/{action=Index}/{id?}");
app.Run();
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi,
I'm developing a web app with ASP.NET - MVC - NET6. Everything works perfectly when i work in local or i deploy as usually in my tenant.
The problem comes when we are using a custom domain in another tenant, not in the resource, in the application registry and behind that there is a proxy (or at least the external technical team of that tenant told me so).
At the beginning the redirect url of the aplication is correct (external - custom domain), because we can access through that link, but after the login with f5 and ping ID, the app redirects us to the resource link and not to the custom domain. Then we receive an error: "403 forbidden", because it's configurated like that, and no one outside the internal network can access to that link, so we need to use the custom domain.
This is my program.cs code. I can't find a solution for this issue.
My appconfig is this one:
Beta Was this translation helpful? Give feedback.
All reactions