No exception details for SqlException with EF core are shown

asp.net-core-2.0 entity-framework entity-framework-core

Question

In our asp.net core application we don't have any detailed exception message in the log files related to SQL. All we see is the following:

Exception thrown: 'System.Data.SqlClient.SqlException' in System.Data.dll

Do you have an idea why there is no detailed information about the sql exception available?

For a test I have started the application localy and changed the password in the DB connection string to a non working value. And even in this case I can't see clear information about the issue. So I guess that I miss some configuration option of the entityframework which filters out the details of the issue.

1
0
6/1/2018 12:58:19 PM

Accepted Answer

My bad! The answer is so stupid simple: I just forgot to look in the log file. The application that I am using has set up a logging framework which also logs the entity framework exceptions in details. On the other side the console window in visual studio does only show the general SqlClient.SqlException.

0
6/4/2018 4:03:41 AM


Related Questions





Related

Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow
Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow