The trouble is that that is a generic error message which just says "your code failed" and give you no more info than that.
We can't fix that for you, because we have no idea what your code does, let alone how it does it - and the number of different ways your app could fail and give you the error is enormous, from trying to convert user input values that are badly types, through the wrong DB connection string, to running out of stack space, and thousands of other reasons!
So start by trying to find out where the error happens:
ASP.NET Error Handling | Microsoft Docs[
^]
When you have that, you can start narrowing down the problem to start fixing it - but without actual info, you are just working in the dark.