How to fix StackOverflowException after upgrading from .Net 6 to .Net 8

Abhishek, Burra 30 Reputation points
2024-04-26T06:39:38.71+00:00

Hello,

 

I have upgraded 5 projects in my solution from .Net 6 to .Net 8 using upgrade assistant in Visual Studio.

When I run the solution, StackOverflowException is being thrown and Swagger is not loading. Looks like onchangetokenfired() method is being called many times resulting in infinite loop.

 

Please help in fixing this issue.

User's image

User's image

Developer technologies ASP.NET ASP.NET Core
Developer technologies .NET Other
{count} vote

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.