# Error in new .NET 6 project

**URL:** <https://community.auth0.com/t/error-in-new-net-6-project/98461>\
**Category:** Get Help\
**Tags:** classic-universal-login-experience, login-experience\
**Created:** [January 19, 2023, 12:50am UTC](https://community.auth0.com/t/error-in-new-net-6-project/98461 "2023-01-19T00:50:44Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![kennethversaw](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/kennethversaw/32/7522_2.png) [@kennethversaw](https://community.auth0.com/u/kennethversaw)\
**Post date:** [January 19, 2023, 12:50am UTC](https://community.auth0.com/t/error-in-new-net-6-project/98461/1 "2023-01-19T00:50:44Z")

</div>

I am following the quick start guide with a brand new .NET 6 project. I can click Login and be taken to the Auth0 login dialog, but upon returning I receive this error:

SecurityTokenSignatureKeyNotFoundException: IDX10503: Signature validation failed. Token does not have a kid. Keys tried: ‘System.Text.StringBuilder’.  
Exceptions caught:  
‘System.Text.StringBuilder’.  
token: ‘System.IdentityModel.Tokens.Jwt.JwtSecurityToken’.

System.IdentityModel.Tokens.Jwt.JwtSecurityTokenHandler.ValidateSignature(string token, TokenValidationParameters validationParameters)

Exception: An error was encountered while handling the remote login.

Microsoft.AspNetCore.Authentication.RemoteAuthenticationHandler.HandleRequestAsync()

Please help

---

<div class="post-metadata">

**Author:** ![konrad.sopala](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/konrad.sopala/32/13516_2.png) [@konrad.sopala](https://community.auth0.com/u/konrad.sopala)\
**Post date:** [January 19, 2023, 10:22am UTC](https://community.auth0.com/t/error-in-new-net-6-project/98461/2 "2023-01-19T10:22:28Z")

</div>

Hey there!

Can you share a link to the quickstart so we can help you troubleshoot that? Thank you!

---

<div class="post-metadata">

**Author:** ![kennethversaw](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/kennethversaw/32/7522_2.png) [@kennethversaw](https://community.auth0.com/u/kennethversaw)\
**Post date:** [January 19, 2023, 10:47pm UTC](https://community.auth0.com/t/error-in-new-net-6-project/98461/4 "2023-01-19T22:47:06Z")

</div>

Sure thing. It is the [ASP.NET](http://ASP.NET) MVC Documentation here: [Auth0 ASP.NET Core MVC SDK Quickstarts: Add Login to your ASP.NET MVC application](https://auth0.com/docs/quickstart/webapp/aspnet-core/interactive)

---

<div class="post-metadata">

**Author:** ![konrad.sopala](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/konrad.sopala/32/13516_2.png) [@konrad.sopala](https://community.auth0.com/u/konrad.sopala)\
**Post date:** [January 20, 2023, 10:51am UTC](https://community.auth0.com/t/error-in-new-net-6-project/98461/5 "2023-01-20T10:51:48Z")

</div>

Perfect! Thanks for sharing that! Can I ask you to raise it as a GitHub issue here:

> **[Issues · auth0-samples/auth0-aspnetcore-mvc-samples](https://github.com/auth0-samples/auth0-aspnetcore-mvc-samples/issues)**
>
> Auth0 Integration Samples for ASP.NET Core MVC Web Applications - Issues · auth0-samples/auth0-aspnetcore-mvc-samples

this way we’ll be able to handle it most effectively and work with the direct repo maintainers on it. Once you have a link to it make sure to share it here so we can ping them. Thank you!

---

<div class="post-metadata">

**Author:** ![kennethversaw](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/kennethversaw/32/7522_2.png) [@kennethversaw](https://community.auth0.com/u/kennethversaw)\
**Post date:** [January 20, 2023, 10:46pm UTC](https://community.auth0.com/t/error-in-new-net-6-project/98461/6 "2023-01-20T22:46:03Z")

</div>

Thanks Konrad. I added this issue:

> <https://github.com/auth0-samples/auth0-aspnetcore-mvc-samples/issues/77>
>
> I cloned the project and pulled it to my local environment. I changed the Target… Framework to :
> 
> \<TargetFramework\>net6.0\</TargetFramework\>
> 
> Then I ran the project. It started and clicked "Login". It took me to the Auth0 login window. After I clicked Login it returned:
> 
> An unhandled exception occurred while processing the request.
> SecurityTokenSignatureKeyNotFoundException: IDX10503: Signature validation failed. Token does not have a kid. Keys tried: 'System.Text.StringBuilder'.
> Exceptions caught:
> 'System.Text.StringBuilder'.
> token: 'System.IdentityModel.Tokens.Jwt.JwtSecurityToken'.
> System.IdentityModel.Tokens.Jwt.JwtSecurityTokenHandler.ValidateSignature(string token, TokenValidationParameters validationParameters)
> 
> Exception: An error was encountered while handling the remote login.
> Microsoft.AspNetCore.Authentication.RemoteAuthenticationHandler\<TOptions\>.HandleRequestAsync()

I cloned the quickstart and changed it to use .net 6 and am seeing the same error.

---

<div class="post-metadata">

**Author:** ![konrad.sopala](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/konrad.sopala/32/13516_2.png) [@konrad.sopala](https://community.auth0.com/u/konrad.sopala)\
**Post date:** [January 25, 2023, 5:42am UTC](https://community.auth0.com/t/error-in-new-net-6-project/98461/7 "2023-01-25T05:42:24Z")

</div>

Thanks for doing that! I’ll ping the repo maintainers in a few minutes!

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/auth0/original/3X/b/5/b560f266932fcce5d57f09a6595bd50518cae3f3.jpeg) [@system](https://community.auth0.com/u/system)\
**Post date:** [February 8, 2023, 5:42am UTC](https://community.auth0.com/t/error-in-new-net-6-project/98461/8 "2023-02-08T05:42:52Z")

</div>

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
