I am facing an interesting error. I run my code and when my codebase try to get some data from sqlserver it gives me this error.
‘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: Named Pipes Provider, error: 40 – Could not open a connection to SQL Server)’
But the interesting thing is when I stop the code and run again right after it works with no error.
2-3 mins later when I try to run my code same thing happens again.
5