Mein Problem ist, wenn ich sie auf dem Produktionsserver (IIS) veröffentliche. Ich binde es an http://PRODSERVERNAME:2212/ und gehe dann in Azure, um den Anwendungsproxy einzurichten. Die Proxy-URL lautet https://appproxydotnetcoretest-companyn ... proxy.net/. Die interne URL ist http://PRODSERVERNAME:2212/.
Wenn ich zur App-Proxy-URL navigiere, wird sie zur Microsoft-Authentifizierungsseite weitergeleitet, aber wenn sie zurück zu http://PRODSERVERNAME:2212/ umleitet, und nicht zur Proxy-URL. Ich habe keine Probleme, dies mit .NET Framework zum Laufen zu bringen, aber ich kann es anscheinend nicht für .NET Core zum Laufen bringen.
Meine Program.cs-Datei hat sich seit ihrer Generierung bei der Erstellung der App nicht geändert. Meine appsettings.json-Datei lautet wie folgt:
Code: Select all
{
"AzureAd": {
"Instance": "https://login.microsoftonline.com/",
"Domain": "CompanyName.onmicrosoft.com",
"TenantId": "2bxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx65",
"ClientId": "cfxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx35",
"CallbackPath": "/signin-oidc",
"ClientSecret": "vDxxxxxxxxxxxxxxxxxxxxxxxxxxnm"
},
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft.AspNetCore": "Warning"
}
},
"AllowedHosts": "*",
"MicrosoftGraph": {
"BaseUrl": "https://graph.microsoft.com/v1.0",
"Scopes": "user.read"
}
}
Code: Select all
AADSTS50011: The redirect URI 'http://PRODSERVERNAME:2212/signin-oidc' specified in the request does not match the redirect URIs configured for the application 'cf77c6a2-1ec8-4b55-8b27-6d9dc196c735'. Make sure the redirect URI sent in the request matches one added to your application in the Azure portal. Navigate to https://aka.ms/redirectUriMismatchError to learn more about how to fix this.Code: Select all
http://localhost:5239/signin-oidc
https://localhost:7090/signin-oidc
https://localhost:44372/signin-oidc
http://localhost:52128/signin-oidc
https://DEVSERVERNAME:2212/signin-oidc
https://appproxydotnetcoretest-companyname.msappproxy.net/
Mobile version