I have a webapi in .Net Core 2.1. I have used Microsoft SQL Management Studio that came with Visual Studio 2017 to make a database that the webapi use to handle its data. When I run it (webapi) on VisualStudio it works fine, I can make calls through POSTMAN and I get responses pretty well, but the problem appears when I deploy the webapi on my local IIS. I get this error page :
An error occurred while starting the application. Win32Exception: Unknown error (0x89c50118) Unknown location SqlException: A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 50 - Local Database Runtime error occurred. Cannot create an automatic instance. See the Windows Application event log for error details. ) System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, SqlCredential credential, object providerInfo, string newPassword, SecureString newSecurePassword, bool redirectedUserInstance, SqlConnectionString userConnectionOptions, SessionData reconnectSessionData, bool applyTransientFaultHandling) Win32Exception: Unknown error (0x89c50118)
I have the same connectionString in the appsetting.json because the database is the same when I run the webapi in visual studio, so, I don't know what I'm doing wrong.
Do I need to make any specific configuration on IIS or DataBase? Any help, please?