Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

654
Visualizações
Blazor WASM Net 6 Preview 4 Azure AD - There was an error trying to log you in: 'Cannot read property 'toLowerCase' of undefined'

I have a simple Blazor WASM running Net 6 Preview 4 that I setup using this guide:

https://docs.microsoft.com/en-us/aspnet/core/blazor/security/webassembly/hosted-with-azure-active-directory?view=aspnetcore-6.0

The exact code works perfect with Net 5.0 (using corresponding Net 5.0 assemblies)

However when I upgrade to Net 6 I receive the following Authentication error:

There was an error trying to log you in: 'Cannot read property 'toLowerCase' of undefined'

I can't seem to get anymore detail either. This is published on Azure App Service Self Contained publish.

enter image description here

The code can be found here: https://github.com/aherrick/BlazorWASM.Net6Prev4.AzureAD

over 4 years ago · Santiago Trujillo
2 Respostas
Responde à pergunta

0

A workaround to the issue has been discussed here: https://github.com/dotnet/aspnetcore/issues/33312.

In short the issue is caused by assembly trimming. And the workaround is to exclude Microsoft.Authentication.WebAssembly.Msal from trimming by including this in the client project file:

  <ItemGroup>
    <TrimmerRootAssembly Include="Microsoft.Authentication.WebAssembly.Msal" />
  </ItemGroup>
over 4 years ago · Santiago Trujillo Relatório

0

I had the same issue when trying to sign in. Updating Microsoft.Identity.Web and Microsoft.Identity.Web.UI to latest version(1.22.1) and then deleting the bin and obj folders solved the problem for me.

There was no need to add an ItemGroup with TrimmerRootAssembly.

over 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda