C#C
C#3y ago
Temptica

❔ ASP.NET api Timeout when fetching data from DB

So I’m working on an ASP.NET Core api with a database. It’s all running on localhost. I used EFC to perform data migration and that worked successfully. I know that my connection string is correct, and that data can be fetched in an instance. But when I perform a .find on my DBContext, I only get a time-put error after 15ish seconds.

"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: TCP Provider, error: 40 - Could not open a connection to SQL Server: Could not open a connection to SQL Server)"

Let me know what other info you need
Was this page helpful?