I'm implementing asp.net core 3.1 project and using sql server 2014. My app has got 4 controllers each of which has create, edit and delete actions. All of 3 controllers except one of them works fine whereas when I create or edit via the problematic controller, an error like the following is being shown to me:
An unhandled exception has occurred while executing the reques:
Exception: Microsoft.Data.SqlClient.SqlException (0x80131904): Login failed for user 'NT AUTHORITY\LOCAL SERVICE'. at Microsoft.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, SqlCredential credential, Object providerInfo, String newPassword, SecureString newSecurePassword, Boolean redirectedUserInstance, SqlConnectionString userConnectionOptions, SessionData reconnectSessionData, Boolean applyTransientFaultHandling, String accessToken, DbConnectionPool pool, SqlAuthenticationProviderManager sqlAuthProviderManager) ....
As I mentioned. all of the controllers except one of them has the above error for its actions. That controller is using 3 tables and one of them has one to many relationship with two others and those tables which are at many point have got acomputed column specification with the
I appreciate if anyone can suggests me a solution.
The problem could be in Sql Connection Strings and IIS Application Pool, what are these for your asp.net core application.
User contributions licensed under CC BY-SA 3.0