Authentication using azure Entra ID in .NET 8 Blazor web app deployed on IIS Server

Kuldeep Y 41 Reputation points
2024-08-23T13:16:33.6633333+00:00

Hello

I have created a Blazor Web Application in .NET 8 Where I have get a Server and a Client Project
In this I Want to apply Azure Entra ID (OIDC) authentication.
I have done app Registration on Azure portal and have Client ID, Tenant ID, Secret etc.
for this I have replicated the https://github.com/dotnet/blazor-samples code and done some of my required modifications but not in the main code flow.

when I run the project through visual studio on https profile it worked fine, and I am able to authenticate but when I deployed it IIS Server and run the application it throws error like sometimes

Too much large Header 400
or
It says to change ASP Net Environment to Development, I have done this but did not work.

Above error only shows when application run on IIS

any help would be appreciated
Thanks

ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
4,573 questions
Blazor
Blazor
A free and open-source web framework that enables developers to create web apps using C# and HTML being developed by Microsoft.
1,584 questions
C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
10,962 questions
Microsoft Entra ID
Microsoft Entra ID
A Microsoft Entra identity service that provides identity management and access control capabilities. Replaces Azure Active Directory.
21,904 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Bruce (SqlWork.com) 65,576 Reputation points
    2024-08-23T17:36:07.35+00:00

    most likely the cookie header is too large (too many claims). either the header setting are different for your dev instance, or you use a different user login.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.