-
Notifications
You must be signed in to change notification settings - Fork 784
Description
Describe the issue
I cloned the repository and started working with the BlazorWebappOidc project. I configured the Entra ID settings, such as the client ID and tenant ID, using the details from my Entra ID tenant account. After running the application locally on the Kestrel server with the HTTPS profile, the Blazor application launched successfully. The interface loaded in the browser, and I was able to log in using my Entra ID account. After a successful callback to my Blazor application URL, I was redirected and received the expected details (Such as Username, email address, etc).
However, when I deployed the same application on an IIS server, I encountered an issue. While the Blazor application opened, when I attempted to log in to my Microsoft Entra ID account, I received a Bad Request - Request Too Long (HTTP Error 400. The size of the request headers is too long) error after the callback.
A clear and concise description of what the issue is about.
To Reproduce
Steps to reproduce the behavior:
- Go to repository and clone BlazorWebappOidc and Open the application in Visual Studio.
- Provide the needed configuration like Tenant ID, Client ID, etc for your Microsoft Azure Entra ID.
- Add an IIS Settings to launchsettings.json to run the application on IIS locally then Run
"iisSettings": { "windowsAuthentication": false, "anonymousAuthentication": true, "iisExpress": { "applicationUrl": "http://localhost:46294", "sslPort": 44381 } },"profiles": { "IIS Express": { "commandName": "IISExpress", "launchBrowser": true, "inspectUri": "{wsProtocol}://{url.hostname}:{url.port}/_framework/debug/ws-proxy?browser={browserInspectUri}", "environmentVariables": { "ASPNETCORE_ENVIRONMENT": "Development" } } }
- Click on login and it will redirect you to the authentication flow then provide the Credentials for login (Entra ID Username and password).
- After the successful callback you get back to the Blazor Application and then you will see the Error
Bad Request - Request Too Long (HTTP Error 400. The size of the request headers is too long.)
Expected behavior
After a successful callback to my Blazor application URL, I was redirected and received the expected details (Such as Username, email address, etc).
Screenshots
Additional context
This is so strange to me why I am getting this issue, I have used the same app registration to do the authentication for the Blazor web assembly application (7.0) and it is working on the IIS Server there is no problem, I am getting the expected details from Entra ID.
But in the BlazorWebappOidc this is not working.
Any advice would be appreciated.
Issue Details
⚠ Do not edit this section. It is required for issue processing.
- Content Source: dotnet/blazor-samples
- GitHub Login: @guardrex